Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Azure IoT Hub client Disconnect, Reconnecting STMicro B-L4S5I-IOT01A Getting Started Tutorial #237

Locked
oh-domino started this conversation in General
Discussion options

I am using the STMicro B-L4S5I-IOT01A and following the STM32L4_L4+ tutorial - https://github.com/azure-rtos/getting-started/tree/master/STMicroelectronics/STM32L4_L4+

error message

The device is provisioned and the IoT Hub is waiting for data.
image

Do you know why my device is not connecting to IoT hub?

You must be logged in to vote

Replies: 2 comments 5 replies

Comment options

Hi @oh-domino,

I'm not sure, the fact it connected to DPS successfully means that everything should be in place. Let me run a test on my end to see if something is going on.

Ryan

You must be logged in to vote
0 replies
Comment options

Everything is working at my end, can I check a couple of details:

  1. What firmware version are using?
  2. Which location is your central instance deployed to?
  3. What code changes have you made?
  4. Are you using the threadx/netxduo version that is submoduled?

One strange thing is that you are getting a disconnect event, however your not getting a connect event.

You must be logged in to vote
5 replies
Comment options

Hi Ryan,

  1. C3.5.2.5.STM
  2. How do I find this?
  3. Changed the azure_config.h file and added time.nist.gov to sntp_client.c
  4. I don't think so

Thanks,

Derek

Comment options

For finding the Central location, you would look in the Azure portal, it will have the location listed for the resource:
image

If you are running the 7-day trial, then you will always be in the same location so you cant configure this.

Comment options

I can't find the same location that you showed but I have this from my profile in the portal.

image

I am running the 7 day trial right now.

Comment options

Ryan,

Is there anything else I can do to debug this issue with the Reconnect, Disconnect?

Derek

Comment options

Hi Derek,

We have updated the Threadx to the latest release, can you try retesting this by checking out the code again?
Also are you using a SAS key here?

Also, can you turn on debugging, by adding the following:

  1. Create a log handler in main.c:
#include "nx_azure_iot.h"
static void write_log_message(az_log_classification classification, UCHAR *msg, UINT msg_len)
{
 printf("LOG %.*s\n", msg_len, msg);
}
  1. Register it in azure_thread_entry (main.c)
    nx_azure_iot_log_init(write_log_message);

  2. You can also increase debugging by adding the following to the nx_user.h, although maybe see if the default gives anything useful first.
    #define NX_AZURE_IOT_LOG_LEVEL 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /