Now I publish TlsTcpClient library based mbedTLS.
Application can use TLS TCP client on WebIDE very easy.
GitHub: https://github.com/hirotakaster/TlsTcpClient
Have a fun!
Now I publish TlsTcpClient library based mbedTLS.
Application can use TLS TCP client on WebIDE very easy.
GitHub: https://github.com/hirotakaster/TlsTcpClient
Have a fun!
@hirotakaster, great work! Can you please add a little more documentation/comments around how to get and embed the necessary certificate?
hi @peekay123 , Now I update github README and example. This library can use for TLS 1.0, 1.1, 1,2 server certificate, now not implements client private certification. But maybe most uses it will be okay
Hi @hirotakaster
I just tried to compile the example for Electron.
But I do not expect to get the following values for the use of flash
Output of arm-none-eabi-size:
text data bss dec hex
114868 228 9520 124616 1
In a nutshell:
Flash used 115096 / 110592 104.1 %
RAM used 9748 / 20480 47.6 %
@developer_bt, did you compile that on Build or with a local toolchain?
With WEB IDE. Firmware version does not make a big change. Except version 0.6.0 with which I get the following result.
Output of arm-none-eabi-size:
text data bss dec hex
116180 228 10400 126808 1
In a nutshell:
Flash used 116408 / 110592 105.3 %
RAM used 10628 / 20480 51.9 %
Can you tell me what are the results for Photon?
@developer_bt, I personally don’t trust the web IDE stats. The definitive way is to compile with a local toolchain. I’ll do that and put up my findings.
@peekay123
Even if you are not accurate however occupancy flash is too large.
I hope that you are right
@developer_bt, the local toolchain gets me this:
text data bss dec hex
112548 164 9512 122224 1dd70
That is pushing the limit if not exceeding it.
@hirotakaster, have you used this library in a real application? It seems to barely fit in flash?
@peekay123 @developer_bt , I tested 0.6, 0.5.3 with MQTT application on Photon from WebIDE and local toolchain, it can flash and well work. But certainly library size is large so I will try to make it more compact.
@peekay123 @developer_bt , very shaped
and this is TLS(HTTPS) communication sequence with my photon, working well.
Looks good. I don’t have time to flash it to my Photon at the moment. I will try it tomorrow.
Has anyone else tested Electron?
I tried with electron 2G but without success. Once you connect to the Cloud starts with a SOS flashing red.
I’ve just been trying with my Photon (firmware 0.5.2) but I keep getting fast cyan with the occasional red flash after a while and restarts. When I go back to some known-good firmware it works (mostly). I’ve put in some debug statements but most of the time it’s not getting as far as setup(), which is very odd because it’s not invoked any user code by then - or does it?
Isn’t using an Electron with HTTPS going to be expensive?
On the few occasions that I’ve got beyond flashing cyan and the code starts it sees to fail at client.init. I swapped in a different certificate so perhaps I’ve got that wrong.
I use my SIM card. Otherwise it would be too expensive
Currently I’m using web hook and works great. Stable, safe and cheap. But I want to have the option of direct connection via HTTPS.
@developer_bt , I don’t have Electron, so please send me debug info.
@timx , @developer_bt , Now I test with my Photon got a red SOS flashing on very simple code a number of times.
void setup() {
}
void loop() {
}
maybe something wrong in Particle cloud section ? other simple code working well?
Hello @hirotakaster.
Debug info:
When starting normally: white, green and cyan then follows Hard Fault (1 blink between 2 SOS patterns). Then reboot and re-start the same cycle.
The serial port has no information.