mbedtls LPCXpresso55S16

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mbedtls LPCXpresso55S16

548 Views
ahmed007
Contributor II

Hello,

Greetings,

I am currently attempting to establish a connection between the LPCXpresso55S16 (acting as a server) and the Raspberry Pi (acting as a client) via DTLS using the mbedtls library. Unfortunately, during the handshake process, I encountered an issue where the ssl_parse_client_key_exchange function returns a negative value, causing the handshake to be stuck indefinitely.

As there are no available SDK examples for a DTLS server and client using mbedtls  on the board, I am seeking assistance from anyone who might have a sample server and client example. This will allow me to test it with my board and identify the cause of the error in my original code.

Additionally, I have noticed a particular error in the ssl_buffer_message function, specifically with the line: mbedtls_ssl_handshake_params * const hs = ssl->handshake;. After inspecting the contents of the hs structure, I observed that several of its members lack values, and some are displaying the following message:

"Multiple errors reported.

  1. Failed to execute MI command: -var-create - * &((hs)->alt_out_ctr) Error message from debugger back end: value has been optimized out

  2. Failed to execute MI command: -data-evaluate-expression (hs)->alt_out_ctr Error message from debugger back end: value has been optimized out

  3. Failed to execute MI command: -var-create - * &((hs)->alt_out_ctr) Error message from debugger back end: value has been optimized out

  4. Unable to create variable object."

This error seems to be originating from the ssl_buffer_message function.

If anyone could provide assistance with these issues, I would be deeply grateful. Thank you for your time and consideration.

Best regards,

Ahmed.

Labels (1)
0 Kudos
Reply
2 Replies

517 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Can you post your code so that we can have a review?

BR

XiangJun Rong

0 Kudos
Reply

490 Views
ahmed007
Contributor II

Hello @xiangjun_rong ,

I appreciate your response. I've been investigating the source of the error, and considering that I'm utilizing the CAN bus along with the CANopen application layer communication protocol, I'm quite confident that the issue stems from the CANopen protocol itself. The problem arises after I attempt to establish a DTLS connection. At this point, the LCPXpresso55S16 server enters state 8, where it's parsing the client key exchange. Meanwhile, the client, a Raspberry Pi, remains in state 2, indicating that it's waiting for the server hello. This situation indicates a failure in the handshake process.

As the code includes the CANopen code developed by a third party, I'm unable to share it openly.

Your support is greatly appreciated.

Best regards, Ahmed Bouzid.

0 Kudos
Reply