Go Down

Topic: LoRa connection and board problem (Read 92 times) previous topic - next topic


Hi all,

I have spent the last month tinkering with the MKR WAN 1310 and I've had some issues, let me explain:

First of all I tried to set up a LoRa connection to a gateway and no matter what I do, and I tried a lot of examples sketches for LoRa, including the First connection in the library but I get nonsense messages and in the serial port I just get the message "Something went wrong; are you indoor? Move near a window and retry".
I am the owner of the gateway and it's in clear line of sight and I want to be clear, I get a message from the device but the message makes no sense no matter what I send. (See a message in the TTN console)

I would like to know what is happening with my LoRa messages and to why it might not be activating, because it is not.

Then I have another issue that has nothing to do with LoRa but with the arduino itself. After a couple of sketch uploads, the board gets stuck in some sort of way and stops showing up when it gets plugged into the computer. No matter if I power cycle it, the only way I've managed to somewhat consistently be able to make it work again is to hold down the reset button a certain amount of time. The other way is sometimes it fixes itself for no apparent reason, after a while it just works.

I would like to know if this behaviour is normal, if so what is causing it to be able to avoid it.

Thanks in advance.



what type of gateway are you using? And to which network are you trying to connect?
The error message "Somthing went wrong..." could be shown because your arduino can't connect to the network (like The Things Network) or it can connect, but there can't be authenticated (see also https://www.thethingsnetwork.org/docs/devices/registration.html)

Second question: what do you mean with "stops showing up"? Can't you see messages In the serial console or isn't it possible to write a sketch to the arduino? What operating system do you use?


Hi, thanks for replying,

As you suggested I've tried to follow the guide but it still doesn't work, so that you get an idea, I've added the gateway traffic and the Application traffic from the TTN console.

As you can see the device sends a join request constantly and the gateway answers with an accept but the Arduino doesn't get the message.

The gateway is a Dragino LG02 and they are both indoor next to each other. (For testing)

As for the second question, with stop showing up I mean that it is impossible to upload a sketch, because when i plug the arduino in after a second or so I get the sound that a device was disconnected. Also at some point I even got a driver error whenever I plugged in the Arduino.

I am using Windows 10.



I'm sorry but I didn't get a message that there is a new post in this topic...

Ok, that's strange. Are you using the OTA Activation Method like in the sketch "LoraSendAndRecive" in the examples or do you use preshared keys in your sketch?

I don't know the Dragino Gateways, but there should be some possibility to see if the accept message from TTN is recieved by the Gateway and sent out to your Arduino...?

As I don't have any experience with the Draginos I've looked into the forum of TTN and found this two topics:

Specially the second makes me think that maybe the LG02 isn't compatible with TTN?

Second thing:
I don't use Windows 10 so I can only imagine what could be the cause...
Make sure that your cable is good and that the connection to the Arduino is ok (that the cable is "stable" in the USB Port) - I had a cable that made same problems, at the end often it disconnected the Arduino because the plug was bad...

The driver error could be resolved by completely uninstall the drivers - restart - reinstall drivers...



I've seen similar problems, so these might help you.

Firstly, check you configuration with The Things Network (or whatever you are using). Especially check Device EUI, APP EUI and the others. I had an issue where I was using different MKRWAN 1310's but the same code and one won't work as the device EUI was different to what was on TTN.

Make sure you have an antenna connected.

The TTN will also show you if the gateway is connected if it is one of yours. The gateway may need to be configured. I had to download a utility just to configure the gateway and once it was connected to TTN, i could see its status.

Secondly, remember amount of data. Start small, just a few bytes. These sketches were ones that I started with to improve my understanding:-

I also find that often if there is a bug in my code, the arduino can get stuck in a loop or crash - just bad code. I find if i double tap the reset switch, the module wakes back up and the USB port soon responds.

Finally, here is a link to the data sheet if you really want to get into the detail.

Go Up