I had to verify an electron was working. The sample code does work, though we should add a code snippet to be sure it is connected to the internet. Be aware, this will eat up your data plan with all the TLS/cert negotiation.
Electron:
Compiling code for electron
Including:
src/Private.h
src/wolfiot.cpp
project.properties
attempting to compile firmware
downloading binary from: /v1/binaries/597cf304248a1c30a58fad5c
saving to: electron_firmware_1501360879598.bin
Memory use:
text data bss dec hex filename
90172 216 2360 92748 16a4c /workspace/target/workspace.elf
Serial monitor opened successfully:
Synced with time server.
Trying to reconnect...
Trying to reconnect...
Trying to reconnect...
Connected to data.iot.us-west-2.amazonaws.com
SSL version is TLSv1.2
Header size: 194
Bytes written: 194
Data payload size: 89
Bytes written: 89
SSL cipher suite: NONE
client.available():128
Server response:
HTTP/1.1 200 OK
content-type: application/json
content-length: 65
date: Sat, 29 Jul 2017 20:45:15 GMT
x-amzn-RequestId: 34779326-f4e1-3ece-dffc-2aebf5a9f72a
connection: Keep-Alive
{"message":"OK","traceId":"34779326-f4e1-3ece-dffc-2aebf5a9f72a"}
Connection complete.
I am going to remove the wolfmqtt port from the title of this post. There are several forks/tracks that will happen now that the wolfssl library is operating. I or others will open separate threads.