cancel
Showing results for 
Search instead for 
Did you mean: 

Has anyone manage to get the STM32CubeFunctionPack_AWS1_V1.0.1 code communicating with AWS IOT yet ?

John Thorne
Associate II
Posted on August 29, 2017 at 12:29

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 (

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32-ode-function-pack-sw/fp-cld-aws1.html?solution=HW-CLD-AWS1

).

I may be guessing but all this echoes the issues with the very original SPWF01 code not being able to handle certificate lengths (see

https://community.st.com/message/150608-re-spwf01-cant-find-host-ip-of-aws-iot-server?commentID=150608&sharpcomment-150608

).

JT

#aws #ode-solution #hw-cld-aws1 #spwf01 #spwf04 #stm32cubefunctionpack-aws1
3 REPLIES 3
Anup Kumar Das
ST Employee
Posted on August 30, 2017 at 05:52

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.

John Thorne
Associate II
Posted on August 30, 2017 at 11:14

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

Posted on August 30, 2017 at 12:44

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.