Another question , because I have some problems connecting and sending the first payloads to TTN. I am using the ttn-otaa.cpp example with a Dragino Lora Hat. I defined my PINS like in the example:
Do I need to wire the PINs in any special way? I found some other examples where the DIO0, DIO1 and DIO2 pins needed a dedicated wiring to the GPIO pins. I think my AppEUI, DevEUI and AppKey is correct (lsb, msb, etc.), but could that be the reason?
90% of my join failed was due to incorrect keys, ttn-otaa program should shows them exactly the same way as the TTN dashboard (no reverse LSB/MSB displayed) should match the 3 and I’ve done this to avoid scratching my head !!!
Did you created your device first on TTN dashboard and see it orange mark because not activated ?
If spi_scan see your device and ttn-otaa says nothing such as device not found, it’s that the wiring is good but you could also check reset line of device SX1272 should be 0 and SX1276 High, to be sure do not wire reset but on this hat not sure you can;-)
The key’s are correct, they are the same as in the TTN. Do I have to do some wiring at the pins (connecting to DIO1 and DIO2)? I use the pin config as it is in the example:
Then after change run make and execute the new build file
root@pi03(rw):~/arduino-lmic/examples/raspi/spi_scan# ./spi_scan
Checking register(0x42) with CS=GPIO07 => Nothing!
Checking register(0x10) with CS=GPIO07 => Nothing!
Checking register(0x42) with CS=GPIO08 => Nothing!
Checking register(0x10) with CS=GPIO08 => Nothing!
Checking register(0x42) with CS=GPIO25 => SX1276 RF95/96 (V=0x12)
Checking register(0x10) with CS=GPIO25 => Nothing!
Checking register(0x42) with CS=GPIO26 => Nothing!
Checking register(0x10) with CS=GPIO26 => Nothing!
root@pi03(rw):~/arduino-lmic/examples/raspi/spi_scan#
But it’s just for spi_scan, ttn-otaa should works with your settings, just tested with current repo with Dragino HAT V1.0, no problem, are you sure you’ve got a working gateway around there ?
Tanks for your response. SPI scan now works and shows result: Checking register(0x42) with CS=GPIO25 => SX1276 RF95/96 (V=0x12)
ttn-otaa still stucks at EV_JOINING
Yes, I have a running gateway. It’s also built with a raspberry and a dragino hat using the single channel packet forwarder (https://github.com/hallard/single_chan_pkt_fwd). Gateway shows up as “active” in my ttn console, so i think gaetway should work.
EUI UPLINK DOWNLINK LAST_SEEN
********* active N/A now
Is there a possibility to see why it isn’t working (log files)?
I’m using Dragino HAT v1.1. Maybe this is the problem? Or whats the difference to v1.0?
Many thnaks for your answer. I’m already using the new TTN environment. Gateway is connected to router.eu.thethings.network and in the TTN console i created a gateway and an application with a device (node).
If I run the ttn-otaa on the node, following is displayed in the log of the gateway:
Jan 03 17:17:25 raspberrypi single_chan_pkt_fwd[4907]: stat update: 2017-01-03 17:16:17 GMT 1 packet received
Jan 03 17:17:25 raspberrypi single_chan_pkt_fwd[4907]: stat update: 2017-01-03 17:16:47 GMT 1 packet received
Jan 03 17:17:25 raspberrypi single_chan_pkt_fwd[4907]: stat update: 2017-01-03 17:17:17 GMT 1 packet received
Jan 03 17:17:25 raspberrypi single_chan_pkt_fwd[4907]: Packet RSSI: -35, RSSI: -100, SNR: 9, Length: 23 Message:'.v...~..p...,>.'.oB.*.e'
Jan 03 17:17:25 raspberrypi single_chan_pkt_fwd[4907]: rxpk update: {"rxpk":[{"tmst":3616271931,"freq":868.1,"chan":0,"rfch":0,"stat":1,"modu":"LORA","datr":"SF7BW125","codr":"4/5","rssi":-35,"lsnr":9.0,"size":23,"data":"AHYdAPB+1bNwAATuLD7rJ7hvQqYqBGU="}]}
Afterwards in the TTN console (console.thethingsnetwork.org) the received messages of the gateway are counted up:
So if I understand this correct, messages from the node are sent to the gateway and somehow also forwarded to ttn, or why else should messages be counted up?
But the device (node) in my application still shows up as inactive and ttn-otaa still stucks at EV_JOINING:
I have already spent several weeks now, trying to get this running. But I don’t see where possibly my mistake is. Do I have to do some more config in the ttn console?
Does anyone already got this running (new ttn environment, two raspberry, one as gateway, one as node, with dragino hat)?
Are you using a single channel gateway? Then you are probably out of luck for OTAA as the software on most single channel gateways does not transmit. OTAA requires the gateway to transmit data to the node. Try ABP.
Yes I’m using a single channel gateway. So the alternative would be to build another gateway than a single channel to use OTAA?
Or is there a working example of a single channel gateway with OTAA (of course with dragino hat)?
There should be code for an ESP8266 based single channel gateway that does send data. I’m not sure the production back-end will still send data to single channel gateways. (@htdvisser should this still work?)