2017-08-29 03:29 AM
Has anyone manage to get the STM32CubeFunctionPack_AWS1_V1.0.1 code communicating with AWS IOT yet ? We have been through the configuration process several times now, generating new certificates and keys, we even set up a new account on AWS IOT, but always get the following error when opening a socket:
ERROR: enum <unnamed> iot_tls_connect(struct Network *, struct <unnamed> *) L&sharp106 wifi_socket_client_open FAIL
We tested the process with an invalid certificate, which causes the connection to immediately fail. With what be believe to be the correct certificate and keys the socket opening process times out (rather than fails).
The hardware connects to the W-Fi local gateway OK and communicates with the time-d.nist.gov service to get current time/date without a problem. We've tested the same code on multiple Wi-Fi gateways, but to no avail.
The hardware platform is the IoT node - STM32 ODE solution (
).I may be guessing but all this echoes the issues with the very original SPWF01 code not being able to handle certificate lengths (see
).JT
#aws #ode-solution #hw-cld-aws1 #spwf01 #spwf04 #stm32cubefunctionpack-aws12017-08-29 08:52 PM
Are you using an ECC certificate/keys? The package works with ECC certificate only.
If you are using ECC certificate follow the formatting guidelines as mentioned in the User manual Section 4.1.2 (UM2186) or Quick Start Guide Page 24.
2017-08-30 02:14 AM
Thanks Anup. Yes, we are using ECC256 keys, as per the Quick Start guide.
We have made some progress. By changing our DNS server setting to point to a non-ISP DNS server such as 8.8.8.8. or 8.8.4.4 then it works. Seems it's related to the issue
https://community.st.com/0D70X000006SuhUSAS
. It looks like the host name has not propagated through to all DNS servers, even though the host address was created in AWS weeks ago. So it looks like it may be AWS issue (?).BTW, we also discovered that if the DNS server addresses in the DHCP server (assuming you are not using static addresses) are null then the code doesn't report an error such as 'DNS address not set'. That's how we discovered the above situation.
JT
2017-08-30 05:44 AM
Thanks John for your update. Good to hear that you are making progress.
I understand that the package needs to implement better error reporting on connection failure.
I will update your feedback to development team.