cancel
Showing results for 
Search instead for 
Did you mean: 

Why AppKey missing in new firmware for CMWX1ZZABZ-091 LoRa module.

VKadi.1
Associate

As per the application note AN4967 Rev 7 AT+APPKEY command has been removed from the firmware of AT_SLAVE. I would like to know how can i set or enquire the APPKEY via AT Commands. Also is there possibility to set this key in firmware itself?

0693W00000BaUZCQA3.jpg 

Since as per the lora standard for OTAA activation, user should setup APPEUI, DEVEUI and APPKEY. But since command for AppKey removed so i wonder how can i set this key on module.

Please update and share if there is any good reason to remove or the way to set the key in firmware itself.

1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee

Hello @VKadi.1​ 

Let me first welcome you to the Community :)

Effectively this AT_SLAVE command has been removed by mistake from this I-CUBE-LRWAN version, and our team is currently working to fix this and reintroduced this command in the next release.

So, please keep an eye out for the coming update.

For the time being and to overcome the problem, you have to modify the commissioning of your device by the way of the “se-identity.h�?.

Please see below and extract of this file where we see the APPKEY definition

The secure-element implementation supports both 1.0.x and 1.1.x LoRaWAN
  versions of the specification.
  Thus it has been decided to use the 1.1.x keys and EUI name definitions.
  The below table shows the names equivalence between versions:
               +---------------------+-------------------------+
               |       1.0.x         |          1.1.x          |
               +=====================+=========================+
               | LORAWAN_DEVICE_EUI  | LORAWAN_DEVICE_EUI      |
               +---------------------+-------------------------+
               | LORAWAN_APP_EUI     | LORAWAN_JOIN_EUI        |
               +---------------------+-------------------------+
               | LORAWAN_GEN_APP_KEY | LORAWAN_APP_KEY         |
               +---------------------+-------------------------+
               | LORAWAN_APP_KEY     | LORAWAN_NWK_KEY         |
               +---------------------+-------------------------+
               | LORAWAN_NWK_S_KEY   | LORAWAN_F_NWK_S_INT_KEY |
               +---------------------+-------------------------+
               | LORAWAN_NWK_S_KEY   | LORAWAN_S_NWK_S_INT_KEY |
               +---------------------+-------------------------+
               | LORAWAN_NWK_S_KEY   | LORAWAN_NWK_S_ENC_KEY   |
               +---------------------+-------------------------+
               | LORAWAN_APP_S_KEY   | LORAWAN_APP_S_KEY       |
               +---------------------+-------------------------+
******************************************************************************
******************************************************************************
******************************************************************************
*/
 
/*!
* When set to 1 DevEui is LORAWAN_DEVICE_EUI
* When set to 0 DevEui is automatically set with a value provided by MCU platform
*/
#define STATIC_DEVICE_EUI                                  0
 
/*!
* end-device IEEE EUI (big endian)
*/
#define LORAWAN_DEVICE_EUI                                 { 0x00, 0x80, 0xE1, 0x01, 0x01, 0x01, 0x01, 0x01 }
 
/*!
* App/Join server IEEE EUI (big endian)
*/
#define LORAWAN_JOIN_EUI                                   { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }
 
/*!
* When set to 1 DevAddr is LORAWAN_DEVICE_ADDRESS
* When set to 0 DevAddr is automatically set with a value provided by a pseudo
*      random generator seeded with a value provided by the MCU platform
*/
#define STATIC_DEVICE_ADDRESS                              0
 
/*!
* Device address on the network (big endian)
*/
#define LORAWAN_DEVICE_ADDRESS                             ( uint32_t )0x0100000A
 
/*!
* Application root key
*/
#define LORAWAN_APP_KEY                             2B,7E,15,16,28,AE,D2,A6,AB,F7,15,88,09,CF,4F,3C   --> to be modified. Afterwhat regenerate the AT_SLAVE application
 
/*!
* Network root key
*/
#define LORAWAN_NWK_KEY                                    2B,7E,15,16,28,AE,D2,A6,AB,F7,15,88,09,CF,4F,3C

Hope this helps you!

Please mark the post as a Best Answer if it answered your question. This will help other community members that have the same issue finding this answer more quickly.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

3 REPLIES 3
Imen.D
ST Employee

Hello @VKadi.1​ 

Let me first welcome you to the Community :)

Effectively this AT_SLAVE command has been removed by mistake from this I-CUBE-LRWAN version, and our team is currently working to fix this and reintroduced this command in the next release.

So, please keep an eye out for the coming update.

For the time being and to overcome the problem, you have to modify the commissioning of your device by the way of the “se-identity.h�?.

Please see below and extract of this file where we see the APPKEY definition

The secure-element implementation supports both 1.0.x and 1.1.x LoRaWAN
  versions of the specification.
  Thus it has been decided to use the 1.1.x keys and EUI name definitions.
  The below table shows the names equivalence between versions:
               +---------------------+-------------------------+
               |       1.0.x         |          1.1.x          |
               +=====================+=========================+
               | LORAWAN_DEVICE_EUI  | LORAWAN_DEVICE_EUI      |
               +---------------------+-------------------------+
               | LORAWAN_APP_EUI     | LORAWAN_JOIN_EUI        |
               +---------------------+-------------------------+
               | LORAWAN_GEN_APP_KEY | LORAWAN_APP_KEY         |
               +---------------------+-------------------------+
               | LORAWAN_APP_KEY     | LORAWAN_NWK_KEY         |
               +---------------------+-------------------------+
               | LORAWAN_NWK_S_KEY   | LORAWAN_F_NWK_S_INT_KEY |
               +---------------------+-------------------------+
               | LORAWAN_NWK_S_KEY   | LORAWAN_S_NWK_S_INT_KEY |
               +---------------------+-------------------------+
               | LORAWAN_NWK_S_KEY   | LORAWAN_NWK_S_ENC_KEY   |
               +---------------------+-------------------------+
               | LORAWAN_APP_S_KEY   | LORAWAN_APP_S_KEY       |
               +---------------------+-------------------------+
******************************************************************************
******************************************************************************
******************************************************************************
*/
 
/*!
* When set to 1 DevEui is LORAWAN_DEVICE_EUI
* When set to 0 DevEui is automatically set with a value provided by MCU platform
*/
#define STATIC_DEVICE_EUI                                  0
 
/*!
* end-device IEEE EUI (big endian)
*/
#define LORAWAN_DEVICE_EUI                                 { 0x00, 0x80, 0xE1, 0x01, 0x01, 0x01, 0x01, 0x01 }
 
/*!
* App/Join server IEEE EUI (big endian)
*/
#define LORAWAN_JOIN_EUI                                   { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 }
 
/*!
* When set to 1 DevAddr is LORAWAN_DEVICE_ADDRESS
* When set to 0 DevAddr is automatically set with a value provided by a pseudo
*      random generator seeded with a value provided by the MCU platform
*/
#define STATIC_DEVICE_ADDRESS                              0
 
/*!
* Device address on the network (big endian)
*/
#define LORAWAN_DEVICE_ADDRESS                             ( uint32_t )0x0100000A
 
/*!
* Application root key
*/
#define LORAWAN_APP_KEY                             2B,7E,15,16,28,AE,D2,A6,AB,F7,15,88,09,CF,4F,3C   --> to be modified. Afterwhat regenerate the AT_SLAVE application
 
/*!
* Network root key
*/
#define LORAWAN_NWK_KEY                                    2B,7E,15,16,28,AE,D2,A6,AB,F7,15,88,09,CF,4F,3C

Hope this helps you!

Please mark the post as a Best Answer if it answered your question. This will help other community members that have the same issue finding this answer more quickly.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
VKadi.1
Associate

Hi @Imen DAHMEN​ Thanks for you response, will try the suggested solution and update. This may be useful for others as well.

Loïc
Associate II

Hello,

Any news concerning this issue ? Is there a new release already ?

EDIT : I see now in the document's revision a new revision that updated AT Commands. (5.10.2021) . Thanks for the patch, will try it