Difference between revisions of "Dragino Lora/GPS HAT"
From ArmadeusWiki
(→LoRa™) |
(→Tested Software) |
||
Line 55: | Line 55: | ||
# echo out > /sys/class/gpio/gpio24/direction | # echo out > /sys/class/gpio/gpio24/direction | ||
# echo in > /sys/class/gpio/gpio10/direction | # echo in > /sys/class/gpio/gpio10/direction | ||
+ | </pre> | ||
+ | |||
+ | * http://wiki.dragino.com/index.php?title=Use_Lora/GPS_HAT_%2B_RaspberryPi_to_set_up_a_Lora_Node | ||
+ | <pre class="host"> | ||
+ | $ make lmic-pi | ||
+ | </pre> | ||
+ | <pre class="apf"> | ||
+ | # modprobe spidev | ||
+ | # echo 10 > /sys/class/gpio/export | ||
+ | # echo 18 > /sys/class/gpio/export | ||
+ | # echo 19 > /sys/class/gpio/export | ||
+ | # echo 24 > /sys/class/gpio/export | ||
+ | # echo 97 > /sys/class/gpio/export | ||
+ | # echo out > /sys/class/gpio/gpio97/direction | ||
+ | # echo out > /sys/class/gpio/gpio24/direction | ||
+ | # echo in > /sys/class/gpio/gpio10/direction | ||
+ | # echo in > /sys/class/gpio/gpio18/direction | ||
+ | # echo in > /sys/class/gpio/gpio19/direction | ||
</pre> | </pre> | ||
Revision as of 12:47, 9 November 2016
Page under construction... Informations on this page are not guaranteed !!
Instructions to use Dragino Lora/GPS HAT on OPOS6ULDev (thanks to RaspberryPi™ compatible connector).
Contents
LoRa™
- RESET is connected to RPi GPIO0 which is gpio24 on OPOS6UL set as output
- nSS is connected to RPi GPIO6, which is gpio97 on OPOS6UL set as output
- DIO0 is connected to RPi GPIO7, which is gpio10 on OPOS6UL set as input
- on recent models (like the one we tested) DIO1 is connected to RPi GPIO4, which is gpio18 on OPOS6UL set as input
- on recent models (like the one we tested) DIO1 is connected to RPi GPIO5, which is gpio19 on OPOS6UL set as input
- Uses HOPERF RFM96W module (clone of Semtech's SX1276 ?) which is controlled through SPI bus.
# modprobe spidev
- Testing that chip is recognised with python spidev:
- Bring chip out of reset:
# echo 24 > /sys/class/gpio/export # echo out > /sys/class/gpio/gpio24/direction # echo 0 > /sys/class/gpio/gpio24/value # echo 1 > /sys/class/gpio/gpio24/value
- activate it:
# echo 97 > /sys/class/gpio/export # echo out > /sys/class/gpio/gpio97/direction # echo 0 > /sys/class/gpio/gpio97/value
- read ID (register 0x42):
import spidev
spi = spidev.SpiDev()
spi.open(3,0)
to_send=[0x42,0x00]
spi.xfer(to_send)
[255, 255]
Tested Software
$ make lora-forwarder
# modprobe spidev # echo 10 > /sys/class/gpio/export # echo 24 > /sys/class/gpio/export # echo 97 > /sys/class/gpio/export # echo out > /sys/class/gpio/gpio97/direction # echo out > /sys/class/gpio/gpio24/direction # echo in > /sys/class/gpio/gpio10/direction
$ make lmic-pi
# modprobe spidev # echo 10 > /sys/class/gpio/export # echo 18 > /sys/class/gpio/export # echo 19 > /sys/class/gpio/export # echo 24 > /sys/class/gpio/export # echo 97 > /sys/class/gpio/export # echo out > /sys/class/gpio/gpio97/direction # echo out > /sys/class/gpio/gpio24/direction # echo in > /sys/class/gpio/gpio10/direction # echo in > /sys/class/gpio/gpio18/direction # echo in > /sys/class/gpio/gpio19/direction
GPS
Links
- http://www.dragino.com/products/module/item/106-lora-gps-hat.html
- http://wiki.dragino.com/index.php?title=Lora/GPS_HAT
LoRa is a registered trademark of Semtech.
RaspberryPi is a registered trademark of RaspberryPi Foundation.