FeatherMO LoRa nodes now broken due to required TTN Upgrades

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
biod101
 
Posts: 183
Joined: Sun Apr 19, 2015 4:21 pm

FeatherMO LoRa nodes now broken due to required TTN Upgrades

Post by biod101 »

Please note that this tutorial will no longer work given that The Things Network V2 has forced gateways to upgrade to The Things Stack (V3).
https://learn.adafruit.com/the-things-n ... gs-network

Although the upgrade was optional until the end of the year, all gateways must now upgrade to V3 for access via the TTN console. This also means that our applications need to be updated according the requirements of V3 which include required “Network Layer” metadata not originally needed in V2. As a result, my (FeatherMO) nodes are now broken, but I’m hoping updating Network Layer metadata will fix this (?).
requirements.png
requirements.png (127.49 KiB) Viewed 633 times
The required data I need for the FeatherMO LoRa radios (https://www.adafruit.com/product/3178) are specifically (1) LoRaWAN version for Media Access Control (e.g. “MAC V1.0.2”) and (2) Regional Parameters version which specifies frequency, dwell time, and other communication settings (e.g. “PHY V1.0.2 REV B”). TTN indicates I need to contact my hardware vendor for these settings, but I can’t find this anywhere in the hardware specs for the Feather LoRa specifications. All my range experiments published to YouTube using your hardware are now broken, and I suspect new customers will have similar problems.

Thanks in advance for any guidance.

User avatar
bgrattan
 
Posts: 28
Joined: Mon Jan 19, 2015 7:16 pm

Re: FeatherMO LoRa nodes now broken due to required TTN Upgr

Post by bgrattan »

I am also having this problem. All (sample program with DHT22) was working well on TTN v2 but now v3 isn't working.
Can someone help. please?
Thanks.
Bob

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: FeatherMO LoRa nodes now broken due to required TTN Upgr

Post by Franklin97355 »

I'll see if the persons of electronic technology (POET) know.

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: FeatherMO LoRa nodes now broken due to required TTN Upgr

Post by adafruit2 »

hmm yeah we were planning on working on it this summer - we need to get documentation from TTN about what changed
what library are you using for LoRa?

User avatar
bgrattan
 
Posts: 28
Joined: Mon Jan 19, 2015 7:16 pm

Re: FeatherMO LoRa nodes now broken due to required TTN Upgr

Post by bgrattan »

I’m using the IDE program on your site: MCCI LoRaWAN LMIC library->ttn-otaa-feather-us915-dht22
It was working fine on ttn v2.
Thanks
Bob

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: FeatherMO LoRa nodes now broken due to required TTN Upgr

Post by adafruit2 »

ok maybe check out https://github.com/mcci-catena/arduino-lorawan which seems to support TTN v3, we haven't used it ourselves (we're still running v2) but it looks promising!

User avatar
biod101
 
Posts: 183
Joined: Sun Apr 19, 2015 4:21 pm

Re: FeatherMO LoRa nodes now broken due to required TTN Upgr

Post by biod101 »

On Sunday night, I did get the original library referenced in the tutorial to work with the node and V3 (or at least I can confirm that something was sent to TTN), but unfortunately the code provided by Adafruit for the payload decoder doesn't work. There is a javascript interpreter in V3, but no longer a "Custom" option as noted in the Adafruit tutorial, and the javascript template provided by TTN for the javascript interpretrer looks different than what may have been used by Adafruit to author its script.

To realize a transmission, I had to delete my application/device from the V2 console since the node was apparently was still linked to that legacy platform thus preventing it from talking to V3. (Thankfully, TTN recently restored access to the legacy console to facilitate doing this.) Of course, you'll need to regenerate the application and device in V3 to make this work, and reprogram your node if you regenerate the keys.

That should help you get started-- I'll write out some steps on what I did this weekend once I get through the work week, and then hopefully Adafruit can help me with the payload decoder.

User avatar
bgrattan
 
Posts: 28
Joined: Mon Jan 19, 2015 7:16 pm

Re: FeatherMO LoRa nodes now broken due to required TTN Upgr

Post by bgrattan »

Much appreciated! I’m not a programmer so I need all the help I can find. Will be looking for your further comments on the decoder.
Many thanks!
Bob

User avatar
biod101
 
Posts: 183
Joined: Sun Apr 19, 2015 4:21 pm

Re: FeatherMO LoRa nodes now broken due to required TTN Upgr

Post by biod101 »

Here is some feedback on I received last night from TTN:
The thing is that payload decoders are not 1 on 1 replicable from V2 to V3, and you need to do a little (but obviously significant) modification. For example, if your decoder function on V2 was:

function Decoder(bytes) {
var temperature = bytes[0] | bytes[2];
return {
temperature: temperature;
}
}

then your V3 payload formatter function will be:

function decodeUplink(input) {
var bytes = input.bytes;
var temperature = bytes[0] | bytes[2];
return {
temperature: temperature;
}
}
I hope to try this out shortly.

User avatar
TI545
 
Posts: 98
Joined: Tue Feb 27, 2018 5:25 pm

Re: FeatherMO LoRa nodes now broken due to required TTN Upgr

Post by TI545 »

Here comes my "me too" posting. I had my feather M0 RFM95 working well with TTN v2, and could use some help with TTN v3. I'm using the adafruit tinylora circuitpython library.

Today I added it as device in the TTN v3 console, following the TTN instructions here:
https://www.thethingsnetwork.org/docs/t ... g-console/

For ABP devices, the instructions are not completely clear, they jump around a bit. Also, they are rather specific for EU LoRa settings, but don't mention N. America. I made my best guesses (i.e.: nam1.cloud.thethingsnetwork rather than eu1) (and i.e.: LoRa frequencies 903900000 Hz instead of 868300000)

Anyway, console v3 said the device was created. I went into the MU editor, changed TTN settings in my code (devaddress, nwkey, appskey). Then I went back into the TTN v2 console and deleted my v2 device featherM0RFM95. After restarting the circuitpython code, it says "packet sent", but I'm not seeing the feather device packets in TTN console v3. Of course there are at least a dozen settings I could have gotten wrong . . . .

One more detail, my TTN gateway is the TTIG (the things indoor gateway) (bought from adafruit, thanks!), which is a v2 gateway. It cannot at this time be migrated to v3, TTN is working on that. What it means is there are some settings for the TTN "packet broker" which forwards packets from v2 to v3, during this v2 to v3 transition period.

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: FeatherMO LoRa nodes now broken due to required TTN Upgr

Post by adafruit2 »

tinylora probably will need to be rewritten for v3, we have no timeframe for doing so (hopefully TTN will be able to help us since they know their protocol best). so we recommend using the arduino library that the above people got working

User avatar
TI545
 
Posts: 98
Joined: Tue Feb 27, 2018 5:25 pm

Re: FeatherMO LoRa nodes now broken due to required TTN Upgr

Post by TI545 »

adafruit2 wrote:tinylora probably will need to be rewritten for v3, we have no timeframe for doing so (hopefully TTN will be able to help us since they know their protocol best). so we recommend using the arduino library that the above people got working
Ok. I also have a adafruit 32u4 lora feather still working with my TTN v2 gateway, using the arduino tinylora, based on the (excellent) tutorial:

https://learn.adafruit.com/multi-device ... ngsnetwork

Is that circuitpython tinylora library comment also true for the arduino tinylora?

When I set these up, I read the LMIC instructions and it seemed more difficult so I went with tinylora. If LMIC is the way forward I’ll have another look.

:-|

User avatar
bgrattan
 
Posts: 28
Joined: Mon Jan 19, 2015 7:16 pm

Re: FeatherMO LoRa nodes now broken due to required TTN Upgr

Post by bgrattan »

Hello,
Thanks to all who have helped so far. I'm somewhat lost and unable to troubleshoot the results I'm getting.
I was/am using the sketch ttn-otaa-feather-us915-dht22 which was working on ttn v2. I have moved it over
to v3 but am sure it's not working correctly. Here is a sample from the serial monitor on windows 10:

16:42:20.265 -> 655116: EV_JOINED
16:42:20.265 -> netid: 19
16:42:20.265 -> devaddr: 260C9B6F
16:42:20.265 -> AppSKey: 000
16:42:20.265 -> NwkSKey: 000
16:42:20.265 -> 655330: EV_TXSTART
16:42:26.642 -> 1054479: EV_TXCOMPLETE (includes waiting for RX windows)
16:43:26.649 -> Temperature: 80.78 *F
16:43:26.649 -> %RH 35.70
16:43:26.649 -> 4804774: EV_TXSTART
16:43:32.062 -> 5143976: EV_TXCOMPLETE (includes waiting for RX windows)
16:43:32.560 -> 5174678: EV_TXSTART
16:43:38.006 -> 5513872: EV_TXCOMPLETE (includes waiting for RX windows)
16:43:38.471 -> 5544573: EV_TXSTART
16:43:43.916 -> 5883787: EV_TXCOMPLETE (includes waiting for RX windows)
16:43:44.414 -> 5914488: EV_TXSTART
16:43:49.829 -> 6253704: EV_TXCOMPLETE (includes waiting for RX windows)
16:43:50.327 -> 6284406: EV_TXSTART
16:43:55.740 -> 6623637: EV_TXCOMPLETE (includes waiting for RX windows)
16:43:56.237 -> 6654339: EV_TXSTART
16:44:01.682 -> 6993567: EV_TXCOMPLETE (includes waiting for RX windows)
16:44:02.147 -> 7024270: EV_TXSTART
16:44:07.593 -> 7363489: EV_TXCOMPLETE (includes waiting for RX windows)
16:44:08.091 -> 7394190: EV_TXSTART
16:44:13.504 -> 7733414: EV_TXCOMPLETE (includes waiting for RX windows)
16:44:14.002 -> 7764117: EV_TXSTART
16:44:19.413 -> 8103356: EV_TXCOMPLETE (includes waiting for RX windows)
16:44:19.911 -> 8134057: EV_TXSTART
16:44:25.324 -> 8473300: EV_TXCOMPLETE (includes waiting for RX windows)
16:44:25.822 -> 8504000: EV_TXSTART
16:44:32.231 -> 8903150: EV_TXCOMPLETE (includes waiting for RX windows)
16:45:32.205 -> Temperature: 80.96 *F
16:45:32.205 -> %RH 36.30
16:45:32.205 -> 12653531: EV_TXSTART
16:45:37.650 -> 12992747: EV_TXCOMPLETE (includes waiting for RX windows)
16:45:38.148 -> 13023449: EV_TXSTART
16:45:44.521 -> 13422599: EV_TXCOMPLETE (includes waiting for RX windows)

It is sending to the gateway (rak7244) and on from there as I can see output in the ttn stack console.
However it repeats every 30 seconds which is not correct and does not show temp/hum data
other than "0." I don't leave it connected for long as it is using too much ttn bandwidth.

If anyone has a copy of this sketch which works, and would like to share, I would appreciate it.
Also any advice would be welcome.
I have moved another device (Dragino LHT65) from v2 to v3 which seems to be working correctly
so my v3 setup appears to be correct.
Many thanks in advance.
Bob

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: FeatherMO LoRa nodes now broken due to required TTN Upgr

Post by adafruit2 »

correct, tinylora for both arduino and circuitpython need to be rewritten to support v3. there is no ETA when this will be done

User avatar
biod101
 
Posts: 183
Joined: Sun Apr 19, 2015 4:21 pm

Re: FeatherMO LoRa nodes now broken due to required TTN Upgr

Post by biod101 »

Okay Folks- I have posted a few resources that might help.

For those of you who have a V2 gateway registered on TTN, I posted a video showing how I upgraded my own gateway to V3 (The Things Stack) as you will be required to do by the end of this year. It's fairly simple - just need to replace the global_conf.json file with a new one created when you build your gateway in the V3 console. Details are posted here:https://youtu.be/nHks-XBq_QI

General details for registering a gateway under V2 and V3 are quite similar. For background on how to do this in V2, I've posted this video: https://youtu.be/u5f_YbHR2lU .

Creating and programming a node for V2 and V3 is also quite similar. For background on how to do this in V2, there's this video: https://youtu.be/0uzGRoZNki0 . The main difference between V2 and V3 is you need some hardware specifications in V3 that we'll need to get from Adafruit per my first post to this thread. Also, for the FeatherMO LoRa DHT22 project, the payload decoder options in V3 are different, and I haven't had an opportunity to work on this yet. Having said that, I managed to get the FeatherMO LoRa node (previously working with V2) to at least communicate on V3 without the payload decoder. Here are the network layer settings that I used which seem to work:
networkLayer.png
networkLayer.png (127.19 KiB) Viewed 308 times
With respect to nodes being migrated to V3, the main thing to remember here is you'll need to delete the device from the V2 Console and make sure the keys in your INO sketch match whatever your registered in V3 for your application/device. When I do this, I can see the node sending data to V3 using the original library suggested by Adafruit, but I can't decode it (yet).

I've been tracking my whole LoRa adventure (for non-programmers/engineers like me) in this playlist which may contain additional details of interest: https://youtube.com/playlist?list=PLqJ5 ... uY2UfPyT8i

Hope this helps!

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”