insightsip / ISP4520-examples

LoRa and LoRaWan implementation examples using ISP4520
Other
12 stars 10 forks source link

ABP #16

Open Ahsan-Averos opened 3 years ago

Ahsan-Averos commented 3 years ago

can someone helping me out why is not confirming my data:: app: Uplink counter : 120 app: Uplink Data rate : DR_0 app: Uplink TX power : 0 app: Uplink frequency: 868500000 app: FDS update success! FileId: 0x3E8 RecKey:0x1 app: FDS update success! FileId: 0x3E8 RecKey:0x2 app: FDS update success! FileId: 0x3E8 RecKey:0x5 app: Data stored on NVM: 224 bytes app: MCPS-Request: MCPS_UNCONFIRMED, OK This above line is MCPS-Request: MCPS_UNCONFIRMED, OK, I can not find solution for this Thanks

Jonathan-fattouh commented 3 years ago

Hello, The line MCPS-Request: MCPS_UNCONFIRMED, OK indicates that the LoRaWan stack sends an "unconfimed" message to the network. If you want the network to acknowlege messages, you need to send "confirmed" message. In the mainc., line 56 you may change :

define LORAWAN_DEFAULT_CONFIRMED_MSG_STATE LORAMAC_HANDLER_UNCONFIRMED_MSG

to

define LORAWAN_DEFAULT_CONFIRMED_MSG_STATE LORAMAC_HANDLER_CONFIRMED_MSG

BR

Jonathan

Ahsan-Averos commented 3 years ago

Sir is this your code is working on ABP mode? can you please give me guidelines, how to use this code in ABP mode? Thanks

Ahsan-Averos commented 3 years ago

yes is there any update?

Ahsan-Averos commented 3 years ago

Actually Sir, my code is working with node to node communication but unable to use Lorawan example? either OTAA or ABP!

Jonathan-fattouh commented 3 years ago

Hello, Yes you can do either OTAA or ABP. You need to edit comminssiong.h to select the mode (OTAAA/ABP). Then you need to edit the se-identify.h file anf fill the following keys to match the ones on your server: For OTAA: LORAWAN_DEVICE_EUI LORAWAN_JOIN_EUI NWK_KEY

For ABP: LORAWAN_DEVICE_EUI LORAWAN_DEVICE_ADDRESS (and set STATIC_DEVICE_ADDRESS to 1) F_NWK_S_INT_KEY S_NWK_S_INT_KEY NWK_S_ENC_KEY APP_S_KEY

Please check the header of se-identify.h for the equivalnce between 1.0.x and 1.1.x key definition. Also when modifying the commisioning it is safer to do erase all of the chip before reflashing as the lorawan context is saved in flash memory.

BR

Ahsan-Averos commented 3 years ago

Hello Sir _F_NWK_S_INT_KEY S_NWK_S_INT_KEY NWK_S_ENCKEY This all are network session key, I mean to say I have to used once session key in all this three. like image And Application session key. image

Ahsan-Averos commented 3 years ago

Please confirm is it okay???