I hope you can help me out with the pinouts.
My radio is a InAir9B and I have connected it up like this:
9B -> pi (Pin#)
-----------------
SI -> MOSI (#19)
SO -> MISO (#21)
CK -> SCLK (#23)
CS -> GPIO6 (#22)
RT -> GPIO0(#11)
DO ->
D1 ->
D2 ->
D3 ->
How does the above relate to:
// Pin mapping
lmic_pinmap pins = {
.nss = 6,
.rxtx = UNUSED_PIN, // Not connected on RFM92/RFM95
.rst = 0, // Needed on RFM92/RFM95
.dio = {7,4,5}
};
When I run TTN sample: ( Comments?)
[1b5e] (1489220428) Sat Mar 11 08:20:28 2017
[63607] (1489220448) Sat Mar 11 08:20:48 2017
OP_TXRXPEND, not sending[c5086] (1489220468) Sat Mar 11 08:21:08 2017
OP_TXRXPEND, not sending[126b04] (1489220488) Sat Mar 11 08:21:28 2017
OP_TXRXPEND, not sending[188582] (1489220508) Sat Mar 11 08:21:48 2017
OP_TXRXPEND, not sending[1ea000] (1489220528) Sat Mar 11 08:22:08 2017
As you can see, all values corresponds with the TheThingsNetwork Console, but ttn-otaa hang on EV_JOINING.
Also the spi-scan reports correctly the Dragino GPS/Lora HAT
Anyone with some suggestions to try? Could this mean there isn’t any Lora-gateway reporting to the TTN? According to the TTN-Map there should be multiple TTN-Gateways in range on our university campus.
Using a Raspberry Pi 3 Model B with the latest Raspbian.
It depends on how this gateways you see on the map are configured. As someone mentioned above, e.g. single channel gateways wouldn’t might not work with OTAA.
Maybe just for testing you could try ABP as activation, just to ensure, that not your node is the problem.
I also ordered a Arduino module from Dragino. Lets try if this will give better results. Otherwise I’ll setup the Rpi + Dragino HAT as Single Channel gateway.
Keep you posted.
BTW, does somebody found a nice library/framework for the Dragino Rpi HAT?
I implemented Hardware Abstraction Layer (HAL) code for LMIC 1.6 targeted to Raspberry Pi for Dragino GPS/Lora HAT.
Having that done, I now can use LMIC 1.6 and this HAL to write node applications on the RPi.
Joining the TTN using OTAA works using a fully-functional Kerlink IoT Gateway(LMIC examples/join)
Sending periodic sensor values to TTN works (LMIC examples/periodic)
I plan to provide the code for the HAL on github soon.
Ok it turns out that the nearest gateway (400 meters away) has a really poor RSSI and SNR values…
I just ordered bigger antenna’s (5dBi), because I’m unsure if the low link budget is due to my setup (Dragino Rpi HAT and Dragino Arduino Shiel with the same antenna) or it’s due to the poor gateway setup at my university.
As suggested @matthijshere increasing clock error for receive windows solved all my OTAA join with LMIC (on Arduino Zero) but may apply on RPI, worth trying this fix (here 1% error more) you can con even on 2% or 3%
For users of a Dragino LoRa/GPS HAT (for Raspberry Pi) I have implemented a Hardware Abstraction Layer for the IBM LMIC 1.6 communication stack. This is similar to the solution of Ernst de Vreede, but as a difference it is based on IBM LMIC 1.6, which seems to be the most recent version of this communication stack. I tried not to touch the LMIC stack itself but only provide a HAL for RPi + LoRa HAT. I also tried not to put too much CPU load on the RPi when waiting for incoming messages.
You my friend are a legend for making it clear that it will only work with a proper gateway. I struggled for days to get nodes working with single channel gateways
Thank you very much for your Dragino LoRa/GPS HAT Hardware Abstraction Layer for the IBM LMIC library.
I’m trying to use it on my rPi 3 and Dragino HAT but I encounter some problems
I thing I have all prerequisites to run your Hello example but unfortunately it doesn’t work
# ./build/hello.out
000000000 HAL: Initializing ...
000000001 HAL: Set radio RST pin to 0x00
000000001 HAL: Wait until 000000002 ms
000000002 HAL: Set radio RST pin to 0x02
000000002 HAL: Wait until 000000007 ms
000000008 HAL: Failed. Aborting.
I’m suspecting a pin problems …
I hope, you (or someone else here ) can help me to get it work.