Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example application overrides EUIs while using LR11xx crypto #6

Closed
adriansmares opened this issue Oct 22, 2022 · 4 comments
Closed

Comments

@adriansmares
Copy link

adriansmares commented Oct 22, 2022

The example application overrides the DevEUI/JoinEUI and AppKey always on reset:

case SMTC_MODEM_EVENT_RESET:
SMTC_HAL_TRACE_INFO( "Event received: RESET\n" );
// Set user credentials
smtc_modem_set_deveui( stack_id, user_dev_eui );
smtc_modem_set_joineui( stack_id, user_join_eui );
smtc_modem_set_nwkkey( stack_id, user_app_key );
// Set user region
smtc_modem_set_region( stack_id, MODEM_EXAMPLE_REGION );
// Schedule a Join LoRaWAN network
smtc_modem_join_network( stack_id );
break;

This should be a bit more nuanced, since if the example is compiled with CRYPTO=LR11XX_WITH_CREDENTIALS, one may expect that the EUIs are really the ones 'on the board'. Maybe the overrides should be guarded by a ifdef for USE_PRE_PROVISIONED_FEATURES ?

@smtc-bot
Copy link

Thank you for your inquiry.

Customers are encouraged to submit technical questions via our dedicated support portal at https://semtech.force.com/ldp/ldp_support.

We invite all users to visit the LoRa Developer Portal Forum at https://forum.lora-developers.semtech.com and to join the thriving LoRa development community!

@matthieuantoine
Copy link
Contributor

Thanks @adriansmares - I'll report that internally to update it for the next release.

FYI - examples in the LoRa Basics Modem SDK already have it implemented this way.

@lbm-team
Copy link
Contributor

lbm-team commented Mar 6, 2023

Hi @adriansmares !
Thanks for your report.
We will update the basic example to take in count internal credentials in case CRYPTO=LR11XX_WITH_CREDENTIALS is used at makefile level.
It can also make sense to print current CHIP EUI and CHIP PIN to ease claiming process.
It will be updated as well for the next release

@lbm-team
Copy link
Contributor

Hi @adriansmares !

We add this feature in the new v3.3.0 release.
You can find the updates line in main example here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants