RAK8212: Uploading cryptographic material to BG96 module #7299
Unanswered
espruino-discuss
asked this question in
Other Boards
Replies: 1 comment
-
Posted at 2019-03-27 by @gfwilliams That's great - thanks for posting this! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-03-26 by wklenk
Some IoT platforms like AWS IoT require you to authenicate with X.509 client certificates when using MQTT as communication protocol for your devices.
The Quectel BG96 module on the RAK8212 already has an embedded MQTT stack, so there is no need for using a MQTT library on the device’s MCU.
The BG96 module supports client and server side authentication using X.509 certificates. The following files must be provided:
The challenge is: How can these files be transfered to the BG96 module’s file system?
Having Espruino installed on the RAK8212, this is not a complicated task. Check my github account at
https://github.com/wklenk/rak8212-espruino-nb-iot
for the JavaScript file upload-ssl-certs-to-bg96.js
All three files have to be provided in PEM format. As this format is in ASCII, you can just cut and paste the contents to the JavaScript source code.
Then transfer the code to the device (using the Espruino IDE) and call function
The files will be saved to the device as cert.pem, key.pem and cacert.pem and can be used in a later step to configure the SSL connection options for the embedded MQTT stack.
Beta Was this translation helpful? Give feedback.
All reactions