SKYSENS OTAA Registration

Hi guys, new here to the whole TTN and LoRaWAN scene.

Ive created a gateway using a PCEngines APU3 running Ubuntu.
Have a RAK2247 868 USB PCIE card in it and have successfully registered it to TTN

I have a Skysens SKYENR1 energy reader that I am trying to register in an application.

I have created the app, entered the device EUI and set the device into join mode.
I can see the join requests coming into the gateway console but it never registers.

Kind of struggling now to see what I have to do to register the device so any help would be great.

The instructions for that decoder do say to leave the network key field blank for join requests (they use the app key to validate the MIC) so its possible your invalid entry of “00” is confusing it.

If it’s still not validating, perhaps you have the wrong app key for your device. One possibility could be byte order reversing, but it may simply be wrong wrong. You may need to consult with the manufacturer.

Also, that device is extremely badly behaved - it’s sending 1.4 second packets every 10 or 11 seconds, that’s at least horribly impolite, and may actually be illegal in some places. They really should try faster data rates (lower spreading factors) first which consume less airtime, and back off the frequency of attempting after just a few tries, or use a more reasonable interval of a minute or more and a variety of spreading factors from the beginning.

Yeah its fresh out of the box. It only does that when its in the “join mode”.

Im assuming that all I need to do to register OTAA is have the DevEUI in the device application?

Ive reached out to the manufacturer to get some clarification. Maybe I need to downlink a command to it?

If it is going to spam with that kind of rapid repetition, it would need to time out of that much more quickly than shown. More likely the manufacturer was irresponsible.

Im assuming that all I need to do to register OTAA is have the DevEUI in the device application?

You need the App EUI and APP key to be correctly entered for the application, too.

You can’t by any standard mechanism until it’s registered. And unlike some other LoRaWAN implementations, TTN can only send downlinks in direct immediate response to uplinks.

By all appearances, what it is looking for is a join accept from a network server knowing the same details (app eui, dev eui, app key…)

If it’s looking for something else, that would be vendor unique, non-standard, and quite possibly not compatible with TTN.

OK when I setup the app I used the app eui that the device was sending with its join request. The APP key is the one that was generated when creating the APP. Ill see if thats what I’m missing.

Thought it would be much easier to deploy these, especially if there was a bulk deployment. Either that or I’m doing something else wrong.

Thanks.

That is definitely not going to work, and explains everything.

You have to know and use the exact app key that the manufacturer programmed into the device.

Unless they tell you what it is or how to change it, there no realistic way to know this, other than by attacking the cryptography or the hardware.

On the bright side, it’s good to know that the app key you shared with the world by posting in a screenshot is an irrelevant random one :wink:

What kind of OTAA data was provided with the device?
For OTAA, you need to know the APP EUI and an APP key.
You also need to know the device EUI (you can see that in the gateway logs though).

So, did it come with OTAA keys that you can enter into TTN?
Or can you program the device with device EUI, app EUI, app key generated by TTN?

In the first case, you should add the APP EUI to the TTN application.
Then when you create the device as part of the TTN application, you can select the APP EUI from a drop-down box, then also enter the device EUI and APP key.

Oops!

Ok well at least that is progress. It seems like its hard finding the right information that I need. All the beginners guides seem to be based around ABP activation.

None! No documentation with the device. Found a data sheet online. This is what it says about activation

image

The last line there seems to be the key one, even for OTAA

Do make sure there isn’t a sticker, slip of paper included in the packaging or on the box or similar however.

Ok so just looking, I have the Device EUI and APP EUI from the device. Where do I get the APP Key for if its not the one generated by TTN?

The box was opened by customs so it could have fallen out. Ill contact manufacturer.

Thanks a lot for the help. Was really scratching my head today!