Closed tcpipchip closed 2 years ago
It be a good marketing for your LUA
Found mqtt doc! Is that MQTT embeeded in the default WHITECAT RTOS LUA or must i compile it on make menuconfig ? Can you instruct me then i get time to write the chapter book about WHITECAT acessing MQTT AWS IOT ? client = mqtt.client("100", "www.inf.furb.br", 1883, false) stdin:1: attempt to index a nil value (global 'mqtt') stack traceback: stdin:1: in main chunk [C]: in ?
Can you help me to use on SSL on LUA RTOS ? (an example), MQTT or HTTPS...
for MQTTs see https://github.com/whitecatboard/Lua-RTOS-ESP32/wiki/MQTT-module:
as documented there:
-- Creates an mqtt instance. Broker domain is xxxx.xx, at port 1883
client = mqtt.client("100", "xxxx.xx", 1883, false)
-- Creates an mqtt instance, secured connection to xxxx.xx
client = mqtt.client(id, "xxxx.xx", 8883, true)
-- Creates an mqtt instance, secured connection to xxxx.xx, and checks if the MQTT Server is the expected one
client = mqtt.client(id, "xxxx.xx", 8883, true, "/path/to/certificate.pem")
-- Creates an mqtt instance, secured connection to xxxx.xx, with persistence in subfolder of the current script
client = mqtt.client(id, "xxxx.xx", 8883, true, nil, true)
-- Creates an mqtt instance, secured connection to xxxx.xx, with persistence in /sdcard
client = mqtt.client(id, "xxxx.xx", 8883, true, nil, true, "/sdcard")
@the0ne
Thomas, thank you!
About
/path/to/certificate.pem is the path to only one certificate ? The CA, correct!
But i will need to add the PRIVATE AND CERTIFICATE too, not only the CA
How can i add them ?
@tcpipchip please read https://github.com/whitecatboard/Lua-RTOS-ESP32/wiki/MQTT-module
Yes i read that! Maybe i am missunderstanding! I cant see how to add the 3 certificates!
That's for Server cert validation only. Not for login!
Yes! But aws iot is not accepting access only with CA, needs too other 2 cerificates!
You asked
help me to use on SSL on LUA RTOS ? (an example), MQTT or HTTPS...
and you got the answer on how you can connect to a standard MQTT server via an SSL secured connection.
I am so sorry if i wasn´t clear!
@tcpipchip,
Hi sir. Sorry for the delay in my answer. Just coming from the vacation period!.
From Whitecat we are working hard to introduce STEAM in high schools, processional schools, and universities. We have amazing experiences in high schools that are adopting Whitecat in their STEAM programs.
Please, contact by private mail (jolive@whitecatboard.org) to explore further collaborations in this area.
Best regards,
Jaume
jaume I sent a pv e-mail
Hi, I want to connect to AWS mqtt broker using the existing MQTT module in Lua-RTOS. I see that the existing mqtt.client(...) only accepts Certificate for server verification. I plan to extend the mqtt.client() so it also accepts device certificate and private key for login by modifying /lua/modules/middleware/mqtt.c.
Has anybody tried and implemented this approach?
i only access using Arduino, micropython and At commands
Looks that still not implemented
while looking at it for the whole afternoon, i can say that support for keyStore and privateKey are not yet ported in mqtt SSLSocket (referring to SSLSocket_createContext() in /components/mqtt/SSLSocket.c).
I have no experience on porting SSL (enabling keyStore and privateKey). It will take me sometime to wrap my head on this.
No update on this from @sicrisembay, so closing for now.
yes, still not supported
@the0ne I would also like to know how to use this with AWS IoT core. AWS asks us to put their certs, so that secure connection is maintained.
As mentioned above, this currently seems to be unsupported. Are you experienced in coding in the "C" language? If yes, you may want to add cert-based client authentication to the existing MQTT module.
Hi,
I am again Teacher!
Does your Lua-RTOS-ESP32 implements CA certificates to use with AWS IoT for example ? The 3 main certificates. SSL If yes, i want to add Lua-RTOS-ESP32 in my book about Alexa + ESP32, using Amazon AWS IoT imediately or using API rest. Just have to open a mqqt (SSL) and post a topic and have a callback if i subscribe to other topic.