Adafruit feather m0 with TTN

Once more, possibly for the last time from me, do NOT post images of text files.

So, you used the example file to run for real - good that you changed it to EU region but the example is for the DHT22 sensor so it’s not really going to work with your sensor unless you change the code.

The example uses OTAA so I wonder how you have configured it.

I didn’t suggest you run it, I suggested that you use it as a reference as how to implement a simple sensor.

I really think you need to find a Teaching Assistant to get you over this learning hump.

I am sorry I just posted images in order to explain you the problem. Sir, the folder contains OTAA, ABP, and a few other codes. What is your opinion if I purchase DHT22 sensor for this code? Would it work fine?

Yes sir, you are right I am an extreme beginner I have to do extra hardworking to grasp command in this field.

What makes you think it wouldn’t work?

Dear Sir,

I purchased DHT22 on Amazon and tried with the sketch you suggested. I would like to inform you that the problem still persists and no data can receive on the TTN console. Could you please assist me a little more?

Yours sincerely

I’m not sure why adding a sensor help a network stack communicate correctly but …

Have you changed the region to EU?

Is the gateway configured for the EU?

ABP is the simplest connection method so this example would the easiest to try:

There are the three entries at the top of the example file to change on lines 57, 61 and 66 with the settings from TTN.

To diagnose a device not being heard, the first thing we do is to trigger an uplink (turn on the device if it doesn’t have a switch) and when it reports an uplink, look on the gateway log (on the physical gateway, NOT the TTN console) for an entry at the same time as the device says it transmitted to see if the gateway is hearing the radio transmission.

If the keys are correct and the gateway is online with the TTN console, the should just work. But if it doesn’t, you will at least know if the gateway can hear the transmission from the device.

Sir, I tried with OTAA method and it’s working fine. If you could allow me I can share a snapshot.

This seems very different from:

If it is text, copy & paste, if not, then you will have to post an image.

But I think you should be able to explain yourself so much better with why it is “working” on OTAA but 40m ago you said that no data is received. Explain each of your statements in detail using the template "I see XXXX and conclude YYYY because of evidence AAA, BBB and CCC. Your generic statements are clearly not working here.

Dear Sir, I connected DHT22 sensor with Adafruit Feather m0 LoRa node and compile the sketch you suggested a few days ago. For the ABP method, I copied Device address, Networks session key and application session key and pasted in the code. By compiling the code, the serial port shows temp and humidity information. However, no data is shown in the TTN console.

Now this time, I tried with OTAA activation method and copied the device EUI, Application EUI and App Key and pasted OTAA sample code and checked on TTN, so its working fine.

Both the codes are fine and show temp and humidity information on serial monitor.

Thank you

So, in the file with “OTAA” in it, you put in ABP keys and it didn’t work?

I know English isn’t your first language, but that doesn’t say if the data arrives, it just says that you ability to check on TTN is working.

Did an uplink appear in the application or device traffic console???

Sir I used OTAA keys for the OTAA sketch and the ABP keys for ABP sketch as well.

Yes sir exactly English is not my first language.

Yes, it appears for the OTAA activation method. A snapshot is attached just for your information.

So there is no problem and it is all working???

Yes sir, but this is for OTAA activation method. And my topic is ABP, I will work on Replay attack prevention for ABP activation method. Actually, the topic of my PhD is about the security of LoRaWAN.

If you’ve got OTAA working which is the hard one for LMiC with the endianness, I am right out of ideas for why the ABP one is a problem.

Alright sir thank you so much for your constant support. Thanks a lot

Just wanna show you the gateway info.

image

You really need to go and read the basics of LoRaWAN.

You have highlighted an OTAA join. ABP does not join.

This is fundamental to LoRaWAN and if you don’t understand the difference, you replay attack research will never happen.

What resources or teaching have you been given on any of this?

Do you understand that for ABP you should be looking for the DevAddr that you copied from the device page when you set it up and put in the LMiC settings??

Dear sir, I am sorry you seem to misunderstood me, I was talking about OTAA join and not ABP. I just showed in the snapshot that the gateway receives join request for OTAA method. I thinks its my mistake for not mentioning detailed information. I am sorry

Mentioning detailed information is at the heart of research.

As I said, I have no further ideas on my ABP isn’t working so I’m going to have to leave this to someone else.

I am very thankful to you, sir. You already helped me a lot. You are extremely cooperative person.

I’m not sure which Ph.D degree but before trying to do anything with LoRaWAN security, the very minimum is that you first grasp the LoRaWAN basics and e.g. get a simple LoRaWAN node working, first with ABP, then with OTAA.
Basics, so no additional stuff for sensors etc. whatever.

From a Phd.D student I would expect that you try to understand the underlying technology (to a fair amount) first, and from there come up with targeted questions and provide all relevant information.

From this thread I do get a strong impression though that your primary goal is mainly to get your current assignment working so you can move on to your next step.

To be honest, I mainly see questions like ‘please help me get this code working’ instead of asking questions like “what do I need to…”, “why…”, “where can I find information about…”, “do I understand correctly…”, “is my assumption correct…” etc. and so whith all respect I get the impression that you want to let others do your own homework.

LoRaWAN is not simple and many aspects are involved. Several experienced people have tried to help you in this thread, but you seem not to pick up all advice given. @kersing told you to have a look at LMIC-node, but apparently you have not.

As a Ph.D student an important aspect is doing research. How hard is it to research information that is provided ‘handed onto a silver platter’?

Have a good look at LMIC-node. It is well structured and well documented and supports your Adafruit Feather M0 LoRa board right out of the box. With LMIC-node you can get a working node up and running literally in minutes (once you have read the documentation and are already familiar with the TTN console).

Once you have it up and running you can start extending or modifying it to your needs and liking, e.g. add code for reading a temperature sensor. You don’t have to use LMIC-node for your own code but it will at least show how things can be done to get them working (and contains the experience of several lessons learned).

If you need additional help, first research and experiment and then come up with targeted questions supplied with sufficient information so others can use their time more efficient to provide any answers.

3 Likes

Thank you so much for your kind suggestions. Indeed, I appreciate your suggestions. I would like to bring into your kind notice that I have done all these basics steps and tried LMIC basic example “Hello, world!” via TTN-ABP sketch. LoRaWAN is a very complex field even a small problem takes from weeks to months.

Again thanks for your kind words.