Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to connect to azure iot hub via mqtt protocol #34309

Closed
ghost opened this issue Apr 15, 2021 · 2 comments
Closed

unable to connect to azure iot hub via mqtt protocol #34309

ghost opened this issue Apr 15, 2021 · 2 comments
Assignees
Labels
area: Networking bug The issue is a bug, or the PR is fixing a bug

Comments

@ghost
Copy link

ghost commented Apr 15, 2021

Describe the bug
I am trying to connect the nucleo-f429zi using the wifi shield esp-01 to my azure-iot-hub. The samples project is here: https://docs.zephyrproject.org/latest/samples/net/cloud/mqtt_azure/README.html
i created an iot-hub and i added a device. The sample project requires these parameters:

  • Username: {iothubhostname}/{device_id}/?api-version=2018-06-30
  • Device ID
  • SaS token.
  • IoT-hub-hostname

I set up these parameters in the menuconfig of the project, except the azure cloud server address and port.

To Reproduce
Steps to reproduce the behavior:

  1. cd zephyrproject/zephyr
  2. west build -b nucleo_f429zi samples/net/cloud/mqtt_azure -- -DCONF="prj.conf" -DSHIELD=esp_8299
  3. west build -t menuconfig
  4. west build
  5. west flash

Impact
the sample project cannot connect to the iot-hub. I guess because i didn´t set up correctly the SAS-token. please see the logs in the picture below. in which format is the SAS token for mqtt protocol ?

Logs and console output
azure-error-wifi

Environment (please complete the following information):

  • OS: Linux Ubuntu
  • Toolchain Zephyr SDK
@ghost ghost added the bug The issue is a bug, or the PR is fixing a bug label Apr 15, 2021
@erwango erwango removed the platform: STM32 ST Micro STM32 label Apr 15, 2021
@erwango erwango assigned jukkar and unassigned erwango Apr 15, 2021
@jukkar
Copy link
Member

jukkar commented Apr 15, 2021

The -116 errno is ETIMEDOUT, so the connection cannot be established. Difficult to know what is going on, there are lot of moving parts involved when setting the Azure configuration parameters etc. I do not have Azure credentials to try this.

@jukkar
Copy link
Member

jukkar commented Apr 15, 2021

BTW, the current timeout (from your screenshot) seems to be 3 sec. Could you try to increase it as I remember seeing some complaints that the cloud connection establishment can take a long time.

@ghost ghost closed this as completed Apr 19, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

3 participants