Otaa connection to things network


(Deepakjayan) #1

I tried to connect my SX1276 (RFM95 compatible) LoRa module to THE THINGS NETWORK using OTAA activation method. I downloaded MCCI LORAWAN LMIC Library (version 2.3.2). The LoRa module was connected to arduino UNO. The APPEUI AND DEVEUI were written into the code in little endian mode and the APPKEY in big endian mode. European frequency was set in the " lmic_project_config.h " file. Since I am using adruino UNO , I disabled ping and beacons . Otherwise it could not be stored in adruino UNO flash memory as mentioned in “Mobilefish Lorawan tutorials” . No other changes were made in the code.
lmic_project_config
I have attached the code along with the output in the serial monitor. I could not connect to TTN. The message ‘EV_TXSTART’ appears in the serial monitor. We waited for 40 minutes. Only this message appears in the serial monitor.
ttn_otaaa
output_serial

The output appearing in the serial monitor has been attached herewith. What could be the possible reason for not getting connected to TTN? Please reply.


#2
  • did you wire it yourself or do you use a ‘hat’ (like dragino )
  • are you sure the pinmapping in your code is right

(Deepakjayan) #3

Yes, I made all the connections by myself. The wiring was done as shown in lorawan tutorial video by "MOBILEFISH.com"Actually the same setup was working for ABP activation method.It didn’t work only for OTAA.


#4

please show your whole code (as txt… not a picture) and format it


(Jezd) #5

Are you sure you have a gateway in range? is it your gateway? do you have the console view of the join requests being made?

EDIT ok so ABP is working which is basically one way process, as per BoRRoz I would check your wiring as if DIO1 is wrong OTAA joins will fail

PS idd you change your device to OTAA? double check your device credential have not changed too


(Deepakjayan) #6

Actually my gateway is 3.5 km away from my LoRa node.
otaa_test.txt (8.1 KB)

Is there any problem in the code?


(Deepakjayan) #7

Dio1 has been connected to arduino uno pin3 . The device EUI, app EUI and appkey were thoroughly checked before uploading the program into the adruino IDE.


#8

I don’t see the used channels in your code


(Deepakjayan) #9

But I made use of MCCI LMIC LORAWAN LIBRARY (latest version), I made the changes only in the pin (ARDUINO UNO TO LORA)connections and the 3 keys. Initially in lmic_project_config.h only, I specified the frequency to eu 868. Other than those changes, I didn’t make any changes. Channel frequencies are not described in the code right? Please reply. If you have tried please send me your wiring diagram and code.


(Jezd) #11

Did you switch activation method over from ABP to OTAA on the device settings in the TTN console?

Ok, your device logs look fine as its sending the request to join - you must have a device setup in the TTN console and you should see the join requests in the console too?


(Deepakjayan) #12

No, I registered a NEW device in OTAA and tried. I didn’t switch the activation method from ABP to OTAA. I checked the TTN console . In the console, in my devices region, in the data section, I checked for the uplink messages. I couldn’t find even a single message.Actually I didn’t get the message like " EVENT JOINED "in the console. Please reply.


(Jezd) #13

Ok drop back to ABP if its working for you, try sending a test packet (test downlink from the TTN device page) to your node and watch you nodes debug log to make sure it receives it, you could also click ACK to complete the loop as the device confirms this back to TTN, you can trace all this in the device debug log and the TTN console page for the device - this will prove up/down communications.

Uplinks at 3.5km distance from within a building could be ok but downlinks could still be a challenge - have you tried taking the device outside too. ABP uplinks are one way traffic and so its worth checking that downlinks with under ABP are working first, the console downlink function is great and you can watch ever action in both logs as they happen.