Noob - Setting up Axioma Qalcosonic E3 Heat Monitor device - all preconfigured!

Thanks @Jeff-UK, I hope so :slight_smile: been copying them out of a spreadsheet from the manufacture.

Yes I did see some join requests a few days ago the devices EUI on the gateway console interface.

I am contacting the manufacture to confirm if its ABP or OTAA by default.

I have just changed it to ABP again to see if I get anything as below and managed to manually set everything I could including the DevAddr to match details from the manufacture but no data yet.

image

Going to try and force the heat meter to send another request and see what happens.

Thanks,
Ricard.

Look at the Dev Addr for the device and see if that’s appearing in the gateway traffic tab - the Dev Addr is not unique across TTN but it’s a good quick check.

1 Like

Note for TTN/TTI it should be 26xx xx xx or 27 xx xx xx is (as apears from above) it is 00 xx xx xx or 01 xx xx xx this is for experimental nodes with no network association - you should see the traffic in GW traffic page with the exp node addr but data wont be forwarded to a TTN app. I use these types of devices where I want to quickly test GW coverage and dont want to bother setting up a full app…if I see the message with the target node DevAddr I know its in range, job done :slight_smile:

2 Likes

Thanks @Jeff-UK, So really to configure a device to be compatible with the TTN network I need to change the Dev Addr to one assigned to me by TTN when registering a device?

Ok got a response from the manufacture.

We always configure with OTAA (by default).
Lora settings can be changed sending downlink to the server, and the server will changed.

Will re-setup for OTAA, any one have any idea what is meant by:

sending downlink to the server, and the server will changed

Would this configuration be possible as part of the join process? I read the quick start guide for adding a device but its not clear what happens after you receive the join requests.

So my guess at the moment is that the additional settings I got on the spread sheet are just dummy settings to help get me the device EUI and some of the keys?

thanks,
Richard.

For ABP yes, you use the one that is generated by TTN when you setup or change to ABP

By some magic they are expecting you to know what characters to type in to the device page to send a message (downlink) to the device to configure it. Or does it come with an app (desktop or mobile) or webpage or something?

So what does the gateway’s Traffic page show in TTN Console? Sometimes it shows nothing, or only shows uplinks but no downlinks, all due to being unreliable. So, until you see some Traffic you may need to rely on what the Device’s Status and its Data page show you:

But if the gateway’s Traffic does show traffic, then that helps a lot: if it shows a Join Request (orange icon) while the device’s Status or DevAddr do not change, then you know that the configuration is wrong. You can validate the AppEUI and DevEUI as sent by the device from the Traffic page, so if those are okay then only the AppKey may be wrong. If it shows no Join Request, then the device is probably not sending one, or is out of reach. If it shows the Join Request and a Join Accept, then the device probably has not received that accept downlink.

Thanks @descartes going to go with OTAA for now.

No mobile app for the device but I do have optical serial connection to the device for setup and reading and I have also the LoRoWan documentation which describes what communication is possible with the device but not seen any options as yet to set the LoRoWan settings, have asked for clarification from manufacture.

Thanks @arjanvanb, I did not have any traffic this morning but after forcing the device to send again I got the following join request.

image

Have confirmed that the Dev EUI and the App EUI are correct. I then checked the AppKey and it was still the default one assigned by TTN when setup. I have now changed that and will try and force another request from the device.

1 Like

Aside: DevEUI and AppEUI (and DevAddr) are not secret. Lucky you, as they’re still visible in the non-encrypted parts of the Physical Payload in your screen capture. You can see in an online decoder, and anyone could grab that payload from the air, in your neighbourhood. :sunglasses:

Things like AppKey, AppSKey and NwkSKey are secret. And the application payload of a data uplink is encrypted.

Another aside, I don’t really like that AppEUI, as that’s clearly not registered by the manufacturer (unless it’s a copier or printer). Probably not a problem, but I’d not buy thousands of those if they use an AppEUI like that. (In fact, I feel each off-the-shelf device should have a unique AppEUI, but I guess I’m the only one.) Strangely, it seems they did properly register the DevEUI.

1 Like

Thanks @arjanvanb nice tool, unfortunately, if I am using the tool correctly, I tried to test with my keys to see if I could get a decoded message and it just came up with fail, as below.

image

Interestingly through after resetting up and manually setting all the keys etc through the cli I now have a green dot but still “never seen”

image

Any idea what that means, if anything?

I hope the decoder did not make you doubt your settings. What keys did you use?

The session keys AppSKey and NwkSKey (and the DevAddr) are (re-)generated whenever an OTAA Join Accept is accepted, so are not known yet at the time of an OTAA Join Request. So, for an OTAA Join Request, you need(ed) to enter the AppKey in the AppSKey field, and enter dummy data in the NwkSKey. I’ve just added a bit more documentation about that, and made NwkSKey optional.

The screenshot now showing a DevAddr implies that at least one Join Request was successful, but then I’d also expect to see a timestamp for Status. Maybe I’m wrong and maybe for a first join that’s only set after a regular data uplink. Or maybe it’s a leftover of earlier tries with ABP for the same device?

If you’re still in doubt if the settings are okay then I’d delete the device and add it again. OTAA seems to work just fine for you.

For a regular uplink you may also want to use the online decoder, to check if FCtrl.ADR is set: your OTAA join uses the worst possible data rate, DR0 a.k.a. SF12 BW125, and it would be great if TTN can use ADR to tell the device to use better settings.

Thanks @arjanvanb I used the keys supplied from the manufacture.

Ahh ok as I have not received a join request into the device within TTN yet I have not seen this step/process. Can you point me to the documentation for this as I have not found that or missed it, sorry.

No don’t think its been successful yet I added them through the TTN CLI :slight_smile: , wont do it again on OTAA, have deleted the device again and re-added as OTAA as per:
https://www.thethingsnetwork.org/docs/devices/registration.html

Now waiting for another join request to come through to see if it hits the device on TTN.

If the TTN documentation is not sufficient comprehensive, then see the LoRaWAN Academy, and the Semtech LoRa Developer Portal’s LoRa library. And of course, it’s in the LoRaWAN specification.

Beware that if the device did in fact receive the OTAA Join Accept, it will no longer try another join. Instead, it will be sending data uplinks, but using a DevAddr and secrets that are no longer known to TTN. So, keep an eye on that gateway Traffic page!

1 Like

Thanks @arjanvanb have not read it all yet, but just a quick update, still not working :slight_smile:

I just got a join request coming through the gateway as below.

image

but its not hitting the registered device on the TTN network as below.
image

Am I right in saying that if the join request was getting through to the device on the TTN network that I should see a join and acknowledgement sequence on the data tab for the device as below?

image

The issue must be down to rooting and how the request is being picked up by TTN?

Yes, if the configuration of device and TTN match, then you should see an Activation (orange icon) in the application and device’s Data page, if you have that open at the time the Join Request is received. And even if not open, you should see a DevAddr on the device’s Overview page after an accepted Join Request.

From the screenshots, it seems the AppEUI and DevEUI are correct. You can use the online decoder with the AppKey to see if the AppKey is correct too (leave the field for NwkSKey empty); probably not. You may want to reverse the bytes in the key (say, from 01 02 03 ... 15 16 to 16 15 ... 03 02 01) to see if that helps in that online decoder. And if not, use some of the other values that the supplier gave you? It would not be the first time a supplier messed up the keys:

1 Like

…and from the same topic quoted above, for another device than yours:

:see_no_evil:

Anyway, you can use the online decoder to check; you know that the gateway is receiving the Join Requests, so for troubleshooting there is no need to wait for another Join Request to be sent by the device. Just ensure that the online decoder shows that the MIC is valid and then you know which value for the AppKey to configure in TTN Console.

2 Likes

Thanks for sticking with me @arjanvanb.

Ok, to be supper clear, if I understand correctly I have used the decoder to and copied in the payload from the join request.

image

I then pasted in all the keys I have into the “Secret AppKey or AppSKey” field and you would expect one of them to NOT to say “Invalid” on the MAC line… unfortunately they all did :slight_smile:

Could the two possibilities be that I have the wrong KEY’s or could it be that the device is just not sending right. I then checked out the interface for the device and I see an option for AES key? as below.

image

I am trying to get more information from the supplier on this but in the mean time I am going to try and set the AES value and see what happens.

Thanks,
Richard.

Yes, you did right and understood correctly. :frowning: (Working example.)

Did you also try to revert the byte order of the values your tried in the “Secret AppKey or AppSKey” field?

I think it’s really about the device using an AppKey that you do not know. (Bugs aside, really all that can cause a different MIC for an OTAA Join Request is a different AppKey; the other data needed to calculate/verify the MIC are taken from the message itself.)

But what is that programming interface you’re showing there? Any other screens in that application?

As for the AES option: I’ve no idea. Maybe the device allows for additional encryption of the application payload. The application payloads of data uplinks and downlinks are already encrypted (using the AppSKey as derived during OTAA). But in LoRaWAN 1.0.x the application server and network server are not 100% separated, so some feel they need more. (I don’t.) Or maybe it’s for non-LoRaWAN operation?

Heads up: the DevNonce, which is also in the Join Request, was hexadecimal 0x008E (decimal 142) for the last message, and 0x0087 in your earlier try. Given only those 2 values, it may be an increasing number, not a random number like LoRaWAN 1.0.x specified. That is not a problem at all, but beware that TTN will remember all DevNonces that the device once used. So, if it ever somehow resets to some factory state and then uses the same sequence of DevNonces, you’ll see OTAA shows "Activation DevNonce not valid: already used". (Workaround in that same topic.)

Also, that sequential DevNonce may suggest it’s a LoRaWAN 1.1.x device. That should be backwards compatible with 1.0.x: the Join Request is the same, and given the Join Accept response the device should understand that the server is on 1.0.x, and fall back to 1.0.x. So, I’m not expecting trouble there, but beware…

Still: OTAA Join first! :slight_smile:

1 Like

Yep, reversed all the keys I have had still nothing valid. Going to go back to manufacture and clarify the Appkey for the device.

Its the configuration utility for the device few more screens below.

image

image

Thanks again.

Any chance that also allows you to see some debug logging of the device?

While getting in touch with the supplier, you may also want to ask for the payload format documentation (or even a decoder), which other users of that device have not provided in Axioma QALCOSONIC E3 with OTAA. Aside, in that same topic someone writes:

I don’t think that would change the OTAA Join Request message, hence I don’t think that applies to you.

There is an “Info window” which just shows the communication with the device but no debug of what the device is doing as far as I can tell.

We do have the following doc on the payload.
Axioma_Lora_Payload_E3_2V00_Extended.pdf (317.2 KB)

@nestorayuso and @duricai just trying to connect a QALCOSONIC E3 to TTN as above do you have any feedback on settings etc… How did you get the AppKey? Thanks