kriswiner / CMWX1ZZABZ

Collection of sketches using the Arduino core for Murata's CMWX1ZZABZ (STM32L082 and SX1276)
94 stars 30 forks source link

advice on ttn OTAA integration? #10

Open everhamme opened 5 years ago

everhamme commented 5 years ago

I compiled the sketch just fine for the LoRa tile project (after updating SPIFlash.h to SPIFlashClass.h), but having issues with TTN. I've got the right keys entered in the sketch and the node joins OK (as shown in the device Application data log), but no payload data is delivered to my application. I can see the data payload coming in to my gateway on TTN, but not making its way to the application. btw.. The Framecounter is not incrementing above 0. I can ask on TTN if that's more appropriate!

kriswiner commented 5 years ago

Firstly, I would recommend you use this https://github.com/kriswiner/CMWX1ZZABZ/tree/master/Cicada sketch, it is the latest for this board.

Secondly, for TTN this line:

LoRaWAN.setSubBand(1); // 1 for MTCAP and 2 for TTN gateway

needs to be set to 2. TTN network for some reason expects subBand 2.

On Mon, Jan 14, 2019 at 9:13 AM Ed Verhamme notifications@github.com wrote:

I compiled the sketch just fine for the LoRa tile project (after updating SPIFlash.h to SPIFlashClass.h), but having issues with TTN. I've got the right keys entered in the sketch and the node joins OK (as shown in the device Application data log), but no payload data is delivered to my application. I can see the data payload coming in to my gateway on TTN, but not making its way to the application. btw.. The Framecounter is not incrementing above 0. I can ask on TTN if that's more appropriate!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kriswiner/CMWX1ZZABZ/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qpMtcVl6RAcwUF2g1FHvDbkC40Bqks5vDLq8gaJpZM4Z_Bmq .

everhamme commented 5 years ago

Thanks.... I just tried using the Cicada sketch instead of the LoRa sensor tile v.05 sketch.. I did have to change the subband to 2. I get the same result in TTN. My node shows up as having joined... as verified by the traffic in the gateway log console and application/device log console... but no data is transmitted to the application/device... as verified by seeing payload data coming in to the ttn gateway console (my gateway 50 ft away).. and no payload data coming in to the application/device log console... i'll ask on ttn why data is slow to show up in my application

patmolloy commented 5 years ago

Also worth disabling “Frame Counter Checks” .. this is frowned up as a security risk, but in my experience is sometimes the only way!

Pat ~Mobile~ iPhone XS Max

On 14 Jan 2019, at 17:31, Kris Winer notifications@github.com<mailto:notifications@github.com> wrote:

Firstly, I would recommend you use this https://github.com/kriswiner/CMWX1ZZABZ/tree/master/Cicada sketch, it is the latest for this board.

Secondly, for TTN this line:

LoRaWAN.setSubBand(1); // 1 for MTCAP and 2 for TTN gateway

needs to be set to 2. TTN network for some reason expects subBand 2.

On Mon, Jan 14, 2019 at 9:13 AM Ed Verhamme notifications@github.com<mailto:notifications@github.com> wrote:

I compiled the sketch just fine for the LoRa tile project (after updating SPIFlash.h to SPIFlashClass.h), but having issues with TTN. I've got the right keys entered in the sketch and the node joins OK (as shown in the device Application data log), but no payload data is delivered to my application. I can see the data payload coming in to my gateway on TTN, but not making its way to the application. btw.. The Framecounter is not incrementing above 0. I can ask on TTN if that's more appropriate!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kriswiner/CMWX1ZZABZ/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qpMtcVl6RAcwUF2g1FHvDbkC40Bqks5vDLq8gaJpZM4Z_Bmq .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkriswiner%2FCMWX1ZZABZ%2Fissues%2F10%23issuecomment-454091070&data=02%7C01%7C%7C7809e8388bfa407c66dc08d67a46276b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636830839053198195&sdata=vm4Ej2g2cSY2bpvE8bDKyYR52Q29rtesLYMbdhQWf4I%3D&reserved=0, or mute the threadhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAEPGGSBCjAEKz4AD7i81AKxEsfH1sbNnks5vDL7_gaJpZM4Z_Bmq&data=02%7C01%7C%7C7809e8388bfa407c66dc08d67a46276b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636830839053198195&sdata=SK66dpJdyNRPTZq%2Fl71ZbP4QI4tJYD8aIn8Yw2EdZDA%3D&reserved=0.

kriswiner commented 5 years ago

I wouldn't expect switching to the Cicada sketch to ficx this problem since I suspect it is on the TTN side, it's just the latest sketch for this board so some of the low power features are done better.

You do need to sue subBand 2 for the TTN netwrk to recognize the data packets or some such. Maybe powering everything down and restarting would help, don't know.

If the node is joined and you see data coming to the gateway this is clearly a forwarding issue not an end node issue. Sorry I don't know how to fix this.

On Mon, Jan 14, 2019 at 9:47 AM Ed Verhamme notifications@github.com wrote:

Thanks.... I just tried using the Cicada sketch instead of the LoRa sensor tile v.05 sketch.. I did have to change the subband to 2. I get the same result in TTN. My node shows up as having joined... as verified by the traffic in the gateway log console and application/device log console... but no data is transmitted to the application/device... as verified by seeing payload data coming in to the ttn gateway console (my gateway 50 ft away).. and no payload data coming in to the application/device log console... i'll ask on ttn why data is slow to show up in my application

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kriswiner/CMWX1ZZABZ/issues/10#issuecomment-454096428, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qsfdezO6J30CKqqzn_1W-N5virohks5vDMKkgaJpZM4Z_Bmq .

patmolloy commented 5 years ago

Try disabling "Frame Counter Checks" image

everhamme commented 5 years ago

I tried disabling them.. no luck... I even tried the example OTAA sketch in the LoraWAN folder library.... OTAA is not easy to troubleshoot on TTN...

kriswiner commented 5 years ago

Just checking, but you do have an antenna mounted on the Cicada, right?

On Mon, Jan 14, 2019 at 10:23 AM Ed Verhamme notifications@github.com wrote:

I tried disabling them.. no luck... I even tried the example OTAA sketch in the LoraWAN folder library.... OTAA is not easy to troubleshoot on TTN...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kriswiner/CMWX1ZZABZ/issues/10#issuecomment-454108245, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qjOEFfE6hZcs33cgVFxYo1nkMgnRks5vDMspgaJpZM4Z_Bmq .

everhamme commented 5 years ago

yes. -81 RSSI showing on TTN gateway

kriswiner commented 5 years ago

Kinda low, I usually see ~ -40 - 50 when within a meter of the MTCAP gateway. But this isn't the problem if the gatway is receiving packets...odd.

On Mon, Jan 14, 2019 at 10:27 AM Ed Verhamme notifications@github.com wrote:

yes. -81 RSSI showing on TTN gateway

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kriswiner/CMWX1ZZABZ/issues/10#issuecomment-454109417, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qkuiAhvWUpQQlBn2Fh_HW0_XXZBzks5vDMwDgaJpZM4Z_Bmq .

kriswiner commented 5 years ago

Are you using the CayenneLPP syntax for the packet bytes? TTN won't recognize these I believe.

On Mon, Jan 14, 2019 at 10:28 AM Tlera Corporation tleracorp@gmail.com wrote:

Kinda low, I usually see ~ -40 - 50 when within a meter of the MTCAP gateway. But this isn't the problem if the gatway is receiving packets...odd.

On Mon, Jan 14, 2019 at 10:27 AM Ed Verhamme notifications@github.com wrote:

yes. -81 RSSI showing on TTN gateway

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kriswiner/CMWX1ZZABZ/issues/10#issuecomment-454109417, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qkuiAhvWUpQQlBn2Fh_HW0_XXZBzks5vDMwDgaJpZM4Z_Bmq .

everhamme commented 5 years ago

yes... the example sketch you have uses Cayenne... TTN should still shown the data traffic to the application i believe...

kriswiner commented 5 years ago

LoRaSensorTile.v05 is set up to use TTN and doesn't use Cayenne, so I think you are right. There is something wrong on the TTN side....

On Mon, Jan 14, 2019 at 11:05 AM Ed Verhamme notifications@github.com wrote:

yes... the example sketch you have uses Cayenne... TTN should still shown the data traffic to the application i believe...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kriswiner/CMWX1ZZABZ/issues/10#issuecomment-454122933, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qqwy6rlS-RJ7kICzRRPt5-yVhZ2-ks5vDNUTgaJpZM4Z_Bmq .

everhamme commented 5 years ago

For reference the fix was having my application and gateway set to the same server.