Difference between revisions of "Dragino Lora/GPS HAT"

From ArmadeusWiki
Jump to: navigation, search
(LoRa™)
(LoRa™)
Line 39: Line 39:
 
[255, 255]
 
[255, 255]
 
</source>
 
</source>
 +
 +
===Tested Software===
 +
* https://github.com/tftelkamp/single_chan_pkt_fwd
 +
<pre class="host">
 +
$ make lora-forwarder
 +
</pre>
 +
<pre class="apf">
 +
# 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
 +
</pre>
  
 
==GPS==
 
==GPS==

Revision as of 16:46, 31 October 2016

Page under construction... Construction.png Informations on this page are not guaranteed !!

Instructions to use Dragino Lora/GPS HAT on OPOS6ULDev (thanks to RaspberryPi™ compatible connector).

[1]

LoRa™

  • RESET is connected to RPi GPIO0 which is gpio24 on OPOS6UL
  • nSS is connected to RPi GPIO6, which is gpio97 on OPOS6UL
  • DIO0 is connected to RPI GPIO7, which is gpio10 on OPOS6UL
  • 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

GPS

Links


LoRa is a registered trademark of Semtech.

RaspberryPi is a registered trademark of RaspberryPi Foundation.