Azure-Samples / Azure-Samples/iot-middleware-freertos-samples

Error in AzureIoTHubClient_ProcessLoop

Open
#388 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
CMake
Stars
88
Forks
54
PR merge metrics
No merged PRs in 30d

Description

> Please provide us with the following information:
> ---------------------------------------------------------------

### This issue is for a: (mark with an `x`)
```
- [X] bug report -> please search issues before submitting
- [ ] feature request
- [] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```

### Minimal steps to reproduce
>Integrate the mbedTLS library in azure middleware to use TLS_send and TLS_recv.
execute the code and connect to IoT hub, wait for AzureIoTHubClient_ProcessLoop function to execute.

### Any log messages given by the failure
>[2024-01-05_15:29:42:471][ERROR] [TlsTransport] [transport_tls_socket_using_mbedtls.c:904] Failed to read data: mbedTLSError[-8]= : BIGNUM - The buffer is too small to write to.
[2024-01-05_15:29:42:471][ERROR] [MQTT] [core_mqtt_serializer.c:2394] A single byte was not read from the transport: transportStatus=-8.
[2024-01-05_15:29:42:493][ERROR] [MQTT] [core_mqtt.c:1319] Receiving incoming packet length failed. Status=MQTTRecvFailed
[2024-01-05_15:29:42:493][ERROR] [MQTT] [core_mqtt.c:2191] Exiting process loop due to failure: ErrorStatus=MQTTRecvFailed

### Expected/desired behavior
>It should be process the received data and complete the workflow of data receive from cloud/sender.

### OS and Version?
> Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
I am working on stm32u585 board and integrated azure middleware.
to work with TLS_send and TLS_recv I have integrated the mbedTLS 3.4.0 in it.

### Versions
>mbedTLS 3.4.0

### Mention any other details that might be useful

> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure on the STM32U585 setup with mbedTLS 3.4.0 by connecting to the IoT Hub and waiting for AzureIoTHubClient_ProcessLoop. Start with transport_tls_socket_using_mbedtls.c:904, then trace the reported failures through core_mqtt_serializer.c:2394 and core_mqtt.c:1319 and 2191. Done means received cloud data is processed and the receive workflow completes without MQTTRecvFailed.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.