Does EHS6 module support ssl(tls) for tcp (socket) connection? | Thales IoT Developer Community
June 20, 2016 - 3:35pm, 4520 views
Hello.
From posts on this forum and "at command set" document I can see, that my EHS6 module support ssl for http(s) connection. But I can't find any information about using ssl for socket connection.
Does it support it? If it indeed supports it, some example with at commands would be great.
Hello,
In case of AT commands you need to add 's'. For example "socktcps" instead of "socktcp", "ftps, "https", "smtps". There are some examples of connections in the AT commands specification document. Some of them are for seccure connections.
Regards,
Bartłomiej
Yes, indeed. Thank you!
Hello.
I'm trying to use socket ssl with EHS6 but it does't work (can't connect).
Here are my commands:
AT^SICS=0,"conType","gprs0"
OK
AT^SICS=0,"apn","internet"
OK
AT^SISS=0,"srvType","Socket"
OK
AT^SISS=0,"conId",0
OK
AT^SISS=0,"address","socktcps://relockIoT.azure-devices.net:8883"
OK
AT^SISO=0
OK
at^sisi?
^SISI: 0,3,0,0,0,0
OK
>> And after minute or so:
^SIS: 0,0,48,"Remote peer has closed the connection"
So - it just can't connect. And it doesn't give me any ssl errors. I've tried with and without sertificates enabled, but with no luck.
If I change socktcps to socktcp - then it can connect, but... well it has to be ssl for proper data sending.
Hello,
It seems to be the similar problem as you have described here: https://iot-developer.thalesgroup.com/threads/how-generate-https-certifi...
It is probably the same server. And it was the server that was closing the connection in that scenario (after receiving Client Hello message).
Regards,
Bartłomiej
Yes, but as far as I understand - in http case problem was in hcProp formating because you said:
and with tcp I don't have any hcProp here.
Or problem with https was with hcProp and with server, that close connection?
Indeed there was a problem with hcProp formatting (there was "\\0d\\0a" instead of "\0d\0a") and I was able to get the 204 HTTP code after fixing this but still it was possible with the firmware that is not yet released. I'm sorry that I didn't make myself clear enough.
So here the server probably closes the connection for the same reason.
Regards,
Bartłomiej
Ok. Now I understand. Thank you.