cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L475 IoT Node kit firmware update and fix for network credential entry?

TJM
Senior

STM32L475 IoT Node has a firmware update with the STM32CubeExpansion_Cloud_AWS_V1.4.0 download. Firmware loads fine and the connection to a terminal for configuration takes place and shows the update version. The update will allow entry of the SSID and security mode but then 'Enter Password: ' prompt appears but does not allow the password entry but proceeds directly to the connection attempt, which fails without the password.

Is there an update or fix or a location in the code where I can fix this?

15 REPLIES 15
TJM
Senior

Still can't get this thing to connect and display sensor values. Tried many changes to get rid of this X.509 error. No luck.

Any suggestions? Is there an issue with the updated firmware v1.4 and the security config? The recommended connection config to the ST-AWS console just won't work for me.

0693W000000XDh9QAG.png

Guillaume K
ST Employee

Hello

The x509 error you are seeing when retrieving time and date is not important. it's just to authenticate the time and date server.

What is important is the error with the name of the cloud device that is larger than the max size. It means the configuration area for AWS connection details is corrupted. it is not possible to connect to AWS cloud.

Did you try to press the board's user button to enter the configuration data when prompted ? (the blue button on B-L475E-IOT01).

To clean the configuration data you can try to erase the full Flash area (you can do this with STM32CubeProgrammer). Then you have to re-flash the firmware and it should ask you for WiFi details.

Or you can try to erase only the area in Flash memory where the configuration is stored. On X-Cube-AWS 1.4.0 for B-L475E-IOT01 it should be at address 0x080F2000 size 12 Kbytes (0x3000). (use STM32CubeProgrammer or ST-Link Utility).

Did the configuration data get corrupted after using the firmware update feature ? What was the previous version of the firmware ?

TJM
Senior

Thanks for the reply.

No problems entering the configuration using a terminal other than some issues entering the correct AWS security info. Still working on that.

I have reflashed with the latest firmware v1.4.0 using CubeProgrammer with no issues, complete with mem erase. I don't remember what version firmware

was installed from the factory.

I also read somewhere about a tls_ssl version conflict that may be preventing my connection.

Here is the latest connection attempt:

- Network Interface started: 

  - Device Name : Inventek eS-WiFi. 

  - Device ID : ISM43362-M3G-L44-SPI. 

  - Device Version : C3.5.2.5.STM. 

  - MAC address: C4:7F:51:94:4B:90. 

- Network Interface connected: 

  - IP address : 192.168.3.128. 

Push the User button (Blue) within the next 5 seconds if you want to update the device connection parameters.

Setting the RTC from the network time.

Connecting to www.gandi.net at ipaddress: 151.101.1.103

C:\STM32CubeExpansion_Cloud_AWS_V1.4.0\Middlewares\Third_Party\mbedTLS\library\ssl_tls.c:4643: x509_verify_cert() returned -9984 (-0x2700)

Configuring the RTC from Date: Wed, 20 May 2020 19:05:21 GMT

*** Firmware version management ***

Press the BLUE user button within the next 5 seconds

to change the firmware version

AWS IoT SDK Version 3.0.1-

MQTT connection in progress:  Attempt 1/3 ...

Connected to a1mz2fy3wgyt70-ats.iot.us-west-1.amazonaws.com:8883

C:\STM32CubeExpansion_Cloud_AWS_V1.4.0\Middlewares\Third_Party\mbedTLS\library\ssl_tls.c:3831: mbedtls_ssl_handle_message_type() returned -30848 (-0x7880)

C:\STM32CubeExpansion_Cloud_AWS_V1.4.0\Middlewares\Third_Party\mbedTLS\library\ssl_tls.c:7005: mbedtls_ssl_read_record() returned -30848 (-0x7880)

ERROR: C:\STM32CubeExpansion_Cloud_AWS_V1.4.0\Middlewares\ST\STM32_Connect_Library\services\net_mbedtls.c:366 failed

 ! mbedtls_ssl_read returned -0x7880

ERROR: iot_tls_read L#208 net_recv failed - -109

ERROR: cloud_run L#682 Error subscribing JOB_GET_PENDING_TOPIC: -1

*** Cloud connectivity demonstration ***

Cloud connectivity demonstration completed

Thanks,

tjm

Fanuc30
Associate II

TJM, going through similar motions and experiences.

Thing name too long at first, came further after shortening it. And end up at the same situation as you. FW1.4.0, but board F769:

Press the BLUE user button within the next 5 seconds

to change the firmware version

AWS IoT SDK Version 3.0.1-

MQTT connection in progress:  Attempt 1/3 ...

2002c0b0 => C:\STM32CubeExpansion_Cloud_AWS_V1.4.0\Middlewares\Third_Party\mbedTLS\library\ssl_tls.c:3831: mbedtls_ssl_handle_message_type() returned -30848 (-0x7880)

2002c0b0 => C:\STM32CubeExpansion_Cloud_AWS_V1.4.0\Middlewares\Third_Party\mbedTLS\library\ssl_tls.c:7005: mbedtls_ssl_read_record() returned -30848 (-0x7880)

ERROR: C:\STM32CubeExpansion_Cloud_AWS_V1.4.0\Middlewares\ST\STM32_Connect_Library\services\net_mbedtls.c:366 failed

 ! mbedtls_ssl_read returned -0x7880

ERROR: iot_tls_read L#208 net_recv failed - -109

MQTT connection in progress:  Attempt 2/3 ...

2002c0b0 => C:\STM32CubeExpansion_Cloud_AWS_V1.4.0\Middlewares\Third_Party\mbedTLS\library\ssl_tls.c:3831: mbedtls_ssl_handle_message_type() returned -30848 (-0x7880)

2002c0b0 => C:\STM32CubeExpansion_Cloud_AWS_V1.4.0\Middlewares\Third_Party\mbedTLS\library\ssl_tls.c:7005: mbedtls_ssl_read_record() returned -30848 (-0x7880)

ERROR: C:\STM32CubeExpansion_Cloud_AWS_V1.4.0\Middlewares\ST\STM32_Connect_Library\services\net_mbedtls.c:366 failed

 ! mbedtls_ssl_read returned -0x7880

ERROR: iot_tls_read L#208 net_recv failed - -109

MQTT connection in progress:  Attempt 3/3 ...

2002c0b0 => C:\STM32CubeExpansion_Cloud_AWS_V1.4.0\Middlewares\Third_Party\mbedTLS\library\ssl_tls.c:3831: mbedtls_ssl_handle_message_type() returned -30848 (-0x7880)

2002c0b0 => C:\STM32CubeExpansion_Cloud_AWS_V1.4.0\Middlewares\Third_Party\mbedTLS\library\ssl_tls.c:7005: mbedtls_ssl_read_record() returned -30848 (-0x7880)

ERROR: C:\STM32CubeExpansion_Cloud_AWS_V1.4.0\Middlewares\ST\STM32_Connect_Library\services\net_mbedtls.c:366 failed

 ! mbedtls_ssl_read returned -0x7880

ERROR: iot_tls_read L#208 net_recv failed - -109

ERROR: cloud_run L#647

Error(-1) connecting to a26ziwdibpph9-ats.iot.us-east-1.amazonaws.com:8883

What is the error actually? CA issue, or client certificate?

TJM
Senior

Good question about the error. I read somewhere there is a ssl_tls version mismatch but I can't find that article again. Even so, it would require a code fix and recompile, which brings us to yet another deficiency. The CubeExpansion_Cloud_AWS expansion pack is supposedly made for STM32SW4. Doesn't work for me in it's downloaded form and haven't figured it out. Most of the info ST refers to is for using STM32CubeIDE. Still doesn't work and haven't been able to make a successful conversion from one to the other. If I can make a recommendation to ST: if you're gonna push the CubeIDE then at least configure the packages as useable, please. I'll admit I'm not an engineer, but I'm trying to make it work. I'd really rather use STM32 but right now all of my ESP32 stuff works while my STM32 stuff is requiring almost 10 times more time and effort with much less success.

Guillaume K
ST Employee

The mbedTLS error 0x7880 when trying to conenct to amazonaws.com means a certificate is incorrect.

Did you enter correctly the certificates during configuration phase ?

The Root CA (Amazon root certificate) is in Middlewares\Third_Party\AWS\certs\Amazon1_Usertrust_Baltimore.crt

The device certificate is the certificate obtained when creating a "thing" (device) in AWS console.

Thanks. I'll try that again. I was under the impression I could use my own account Root CA but I'll try the provided certificate and run through the AWS readme file again in case I missed something.

Thanks,

tjm

Chandrashekar C
Associate III

Hi Everyone,

I am facing same issue, can some please help me with this ?

- Network Interface started:

  - Device Name : Inventek eS-WiFi.

  - Device ID : ISM43362-M3G-L44-SPI.

  - Device Version : C3.5.2.5.STM.

- Network Interface connected:

  - IP address : 192.168.0.21.

Enter server address: (example: ***.iot.region.amazonaws.com)

a31pjrd6x4v4ba-ats.iot.eu-west-1.amazonaws.com

read: --->

a31pjrd6x4v4ba-ats.iot.eu-west-1.amazonaws.com

Enter device name: (example: mything1)

mything1

read: --->

mything1

Updating TLS security credentials.

Enter the x509 certificates or keys as per the following format:

-----BEGIN CERTIFICATE-----

YMPGn8u67GB9t+aEMr5P+1gmIgNb1LTV+/Xjli5wwOQuvfwu7uJBVcA0Ln0kcmnL

R7EUQIN9Z/SG9jGr8XmksrUuEvmEF/Bibyc+E1ixVA0hmnM3oTDPb5Lc9un8rNsu

.......

-----END CERTIFICATE-----

-----BEGIN CERTIFICATE-----

YMPGn8u67GB9t+aEMr5P+1gmIgNb1LTV+/Xjli5wwOQuvfwu7uJBVcA0Ln0kcmnL

.......

-----END CERTIFICATE-----

.......

    

Setting the RTC from the network time.

Connecting to www.gandi.net at ipaddress: 151.101.1.103

Configuring the RTC from Date: Mon, 06 Jul 2020 15:00:42 GMT

Shadow Init'...

Shadow Connect...

MQTT connection in progress:  Attempt 1/3 ...

ERROR: C:\git\ODE\FP\FP_IND_PREDMNT1\Firmware\Middlewares\ST\STM32_Connect_Library\services\net_mbedtls.c:366 failed

 ! mbedtls_ssl_read returned -0x7880

ERROR: iot_tls_read L#208 net_recv failed - -109

ERROR: C:\git\ODE\FP\FP_IND_PREDMNT1\Firmware\Middlewares\ST\STM32_Connect_Library\services\net_mbedtls.c:488 mbedtls_net_send(): error -19 in send() - requestedLen=31

MQTT connection in progress:  Attempt 2/3 ...

ERROR: C:\git\ODE\FP\FP_IND_PREDMNT1\Firmware\Middlewares\ST\STM32_Connect_Library\services\net_mbedtls.c:366 failed

 ! mbedtls_ssl_read returned -0x7880

ERROR: iot_tls_read L#208 net_recv failed - -109

ERROR: C:\git\ODE\FP\FP_IND_PREDMNT1\Firmware\Middlewares\ST\STM32_Connect_Library\services\net_mbedtls.c:488 mbedtls_net_send(): error -19 in send() - requestedLen=31

MQTT connection in progress:  Attempt 3/3 ...

ERROR: C:\git\ODE\FP\FP_IND_PREDMNT1\Firmware\Middlewares\ST\STM32_Connect_Library\services\net_mbedtls.c:366 failed

 ! mbedtls_ssl_read returned -0x7880

ERROR: iot_tls_read L#208 net_recv failed - -109

ERROR: C:\git\ODE\FP\FP_IND_PREDMNT1\Firmware\Middlewares\ST\STM32_Connect_Library\services\net_mbedtls.c:488 mbedtls_net_send(): error -19 in send() - requestedLen=31

ERROR: aws_connect_to_cloud L#154 Error(-1) connecting to a31pjrd6x4v4ba-ats.iot.eu-west-1.amazonaws.com:8883

AWS IoT SDK Version 3.0.1-

Shadow Register Delta ErrorCLOUD_WIFI_CONNECTION_ERROR

*** Cloud connectivity demonstration ***

Cloud connectivity demonstration completed

                         

TWU.1
Associate

Hi everyone.

Is there anyone slove this problem?