Mongoose os\mdash device public key

#1

Is there a sample\code for provisioning or key generation for mongoose os based device ?
The provided samples are for arduino\ESP-IDF.

After some testing I understand that I can generate the device public key myself and set it in ACL accordingly. Now I’m able to use REST api with this access_token.

Are there any plans to provide the same provisioning lib\opening the code\public key generation algorithm for mongoose os as in arduino\ESP-IDF samples?

Thanks.

#2

PRs submitted -


Once these are in, Mongoose OS will also report public_key in the Sys.GetInfo RPC.
That public key, however, is not generated automatically. Either set it via the mos config-set, or auto-generate in your app init code. Make sure the key is random.

#3

Great. Thanks. Everything is clear.

The last question. :slight_smile:
Are there any plans to provide a provisioning lib for mongoose os like the one for arduino\esp-idf or should I do it myself?

Thanks.

#4

Could you elaborate on it please?
What do you mean by provisioning lib?

#5

In your samples for arduino/esp-idf there’s a code for generating unique device token, endpoint for setting wifi access and one for getting key used for provisioning.

Thank you

#6

Mongoose OS has all that.
An un-provisioned device is accessible via RPC over HTTP/WS, call Sys.GetInfo to get the public token, and call Config.Set for setting WiFi credentials.

#7

True. :slight_smile:
I know I can use RPC to set everything, only the public key generation code is missing.
I just thought that if you provide the lib for arduino\esp-idf maybe you’ll provide similar one for mongoose os.

Thank you.