Node based on Raspberry?

link isnt broken, it was correct at the time or writing a year ago. TTN urls have changed and that has made it invalid. The page is still there on a new url https://www.thethingsnetwork.org/community/thatcham/post/pi-zero-node

Hi, I am currently in the same position where my program is giving: EV_JOINING. Is there anyon who got any progress?
Cu, Remko.

@pe1mew Just double check your appKey, appEui, and devEui and make sure that your appEUI is reverse ordered :slight_smile:

Hi @cambierr, that is in the right order.

Can you double check that devEUI, appEUI, and appKEy shown just before EV_JOINING are the same as the one shown in your TTN console ? I just tested with a clean PI2 + RFM95W and I got no problems

HI @ernestopace

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

Thanks in advance.

Marcell

I took a chance and connected the pinouts like this:

9B -> pi (Pin#)
-----------------
SI -> MOSI (#19)
SO -> MISO (#21)
CK -> SCLK (#23)
CS -> GPIO6 (#22)
RT -> GPIO0(#11)
DO -> GPIO7(#7) - amended
D1 -> GPIO4 (#16) - amended
D2 -> GPIO5 (318) - amended
D3 ->

This gave me this:

Event EV_TXCOMPLETE, time: 6
[62c72] (1489221370) Sat Mar 11 08:36:10 2017

Event EV_TXCOMPLETE, time: 25
[c470e] (1489221390) Sat Mar 11 08:36:30 2017

Event EV_TXCOMPLETE, time: 45
[1261ab] (1489221410) Sat Mar 11 08:36:50 2017

Guess Iā€™m on the right track with the node.

Hi

I get this error with Dragino LoRa/GPS Hat 1.1 and Raspberry 3:

OP_TXRXPEND, not sending[4f984c] (1489955694) Sun Mar 19 21:34:54 2017

or:

[386a] (1489955815) Sun Mar 19 21:36:55 2017

OhOh. Unknown interrupt flags for FSK
FAILURE
radio.c:630

Sometimes it sends one packet. What could be the solution?

Thank you

1 Like

Hi,

Is there a Dragino Lora/GPS Hat node code for raspberry with bcm2835 library and not with OTAA but ABP?

Thank you

Iā€™m facing the same issues as you describe.

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.

2 Likes

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.

Guys

As suggested @matthijs here 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%

LMIC_setClockError(MAX_CLOCK_ERROR * 1 / 100);

Works perfectly with Loraspi board with RFM95

1 Like

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.

Find the code in github at https://github.com/wklenk/lmic-rpi-lora-gps-hat

The following LMIC examples are working yet with this HAL and TTN:

  • examples/hello - Not using radio at all
  • examples/join - Join the TTN using OTAA (over the air activation)
  • examples/periodic - Join and periodically send a sensor value to TTN.

I would appreciate to get feedback if this stack also works for you, and if it was easy to use this piece of software.

Note: I tested it with a Kerlink IoT Gateway. Single Channel Gateways wonā€™t work.

6 Likes

Iā€™ll test this next week more extensively!

Quick look: https://github.com/wklenk/lmic-rpi-lora-gps-hat/blob/master/examples/ping/main.c still contains your keys/ids!

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 :slight_smile:

I use the LMIC stack for some nodes, and it works great with my single channel gateway!

Your SGC works great. Is there any chance that you port it to Pi 1/2/Zero?