Difference between revisions of "Dragino Lora/GPS HAT"

From ArmadeusWiki
Jump to: navigation, search
(LoRa™)
(LoRa™)
Line 12: Line 12:
  
 
* Testing that chip is recognised with python spidev:
 
* Testing that chip is recognised with python spidev:
 +
** Bring chip out of reset:
 +
<pre class="apf">
 +
# 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
 +
</pre>
 +
** activate it:
 +
<pre class="apf">
 +
# echo 97 > /sys/class/gpio/export
 +
# echo out > /sys/class/gpio/gpio97/direction
 +
# echo 0 > /sys/class/gpio/gpio97/value
 +
</pre>
 +
** read ID (register 0x42):
 
<source lang="python">
 
<source lang="python">
 
import spidev
 
import spidev

Revision as of 16:52, 27 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™

  • 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]

GPS

Links


LoRa is a registered trademark of Semtech.

RaspberryPi is a registered trademark of RaspberryPi Foundation.