Comments (8)
Since this issue has no reply during a week. I close this issue.
from devkit-sdk.
Hi @lokijota , I need more information to resolve this issue, you can check if this connection string is correct frist. I suggest use workbench command in vscode to config this connection string for work around.
from devkit-sdk.
Hey Jerry,
here's how I got the device connection string:
1- Opened portal.azure.com
2- Accessed my IoT Hub
3- Clicked "IoT Devices" in menu section "Explorers"
4- Clicked the device I created (I call it "mx1") in the list of devices. The status is Enabled, Authentication Type = SAS, and columns "Last status update" and "Cloud do Device Message Count" are empty
5- In the detail page of the device, "Enable connection to IoT Hub" = Enabled.
6- Clicked the "Copy" icon to the right of the "Primary Connection String" field: HostName=myiothub.azure-devices.net;DeviceId=mx1;SharedAccessKey=mykey
Regarding using the Workbench, I struggled with understanding how it works. I have it installed in VS Code but when I launched the command to "Configure device settings", I ended up having to create a project which generated an .ino file. Where do I test the connection string?
I then followed the instructions here: https://docs.microsoft.com/en-us/azure/iot-hub/tutorial-connectivity and managed to succesfully test connectivity:
node SimulatedDevice-1.js "<the key I got from above>"
IoT Hub troubleshooting tutorial
Simulated device #1
Client connected
What other information can I provide?
PS: While trying to understand how to use the Workbench I noticed:
- in https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-tools, the link to "get started" is broken;
- in https://github.com/microsoft/vscode-iot-workbench the link to "Use Azure IoT Device Workbench extension in Visual Studio Code" is also broken.
Where can one find documentation on how to use the IoT Workbench in VS Code?
from devkit-sdk.
@lokijota Hi, thanks for your suggestions. Let us come to the beginning. Have you tried this format?
# set_az_iothub HostName=xxxxx.azure-devices.net;DeviceId=mx1;SharedAccessKey=xxxx
I mean remove these quotes and check if it works.
For the second questions. You can follow this tutorials to try our workbench
https://docs.microsoft.com/en-us/samples/azure-samples/mxchip-iot-devkit-get-started/sample/
from devkit-sdk.
Hi Jerry. As per my initial message: "I tried running set_az_iothub passing the connection string without the commas and had the same result".
Issue is NOT closed, and there's people in other threads mentioning the same issue. Please re-open.
from devkit-sdk.
@lokijota Sorry about that, I have reopened this issue.
Fristly, I ran set_az_iothub over the serial interface in my mxchip (sdk version 1.6.5). This is my output log
************************************************
** MXChip - Microsoft IoT Developer Kit **
************************************************
Configuration console:
- help: Help document.
- version: System version.
- exit: Exit and reboot.
- scan: Scan Wi-Fi AP.
- set_wifissid: Set Wi-Fi SSID.
- set_wifipwd: Set Wi-Fi password.
- set_az_iothub: Set IoT Hub device connection string.
- set_dps_uds: Set DPS Unique Device Secret (UDS) for X.509 certificates..
- set_az_iotdps: Set DPS Symmetric Key. Format: "DPSEndpoint=global.azure-devices-provisioning.net;IdScope=XXX;DeviceId=XXX;SymmetricKey=XXX".
- enable_secure: Enable secure channel between AZ3166 and secure chip.
# set_az_iothub HostName=xxx.azure-devices.net;DeviceId=xxx;SharedAccessKey=xxx
INFO: Set Azure Iot hub connection string successfully.
#
************************************************
** MXChip - Microsoft IoT Developer Kit **
************************************************
You can 1. press Button A and reset to enter configuration mode.
2. press Button B and reset to enter AP mode.
Wi-Fi xxx connected.
Now is (UTC): Mon Feb 24 03:02:21 2020
2020-02-24 03:02:23 INFO: IoThub Version: 1.3.6
2020-02-24 03:02:30 INFO: >>>Connection status: connected
2020-02-24 03:02:35 INFO: >>>IoTHubClient_LL_SendEventAsync accepted message for transmission to IoT Hub.
2020-02-24 03:02:36 INFO: >>>Confirmation[0] received for message tracking id = 0 with result = IOTHUB_CLIENT_CONFIRMATION_OK
2020-02-24 03:02:41 INFO: >>>IoTHubClient_LL_SendEventAsync accepted message for transmission to IoT Hub.
2020-02-24 03:02:42 INFO: >>>Confirmation[1] received for message tracking id = 1 with result = IOTHUB_CLIENT_CONFIRMATION_OK
This command do not need these quotes with connection string.
Secondly, you can use command in vscode to configure it, the link is here https://docs.microsoft.com/en-us/samples/azure-samples/mxchip-iot-devkit-get-started/sample/
And if someone have the same issue, we can talk together in this gitter https://gitter.im/Microsoft/azure-iot-developer-kit
from devkit-sdk.
Close issue without reply for seven days
from devkit-sdk.
I am getting exactly the same issue 9 months later. "Failed to send telemetry data: 400" - my connection string is correct, and I have tried with both 1.6.5 and 2.0.0 firmware
from devkit-sdk.
Related Issues (20)
- Open Sample - 'Input example folder name' causing an error in VS code
- Secure WebSockets HOT 1
- Quality of audio record HOT 2
- Set System Properties HOT 1
- Client.h is missing from Arduino core HOT 3
- i2C is not multithreading safe HOT 1
- MxChip Visual studio code project workspace Debug/Release configuration HOT 1
- Broken link in arduino board manager: java.net.UnknownHostException: azureboard.azureedge.net HOT 2
- I2C issue using 2.0.0 HOT 2
- arm-none-eabi-gcc: error: unrecognized debug output level 'cc'
- Unable to have a stable connection
- Cannot create directory when opening sample HOT 1
- New CA certificate support
- Document multi-device and no-button configuration
- Unable to Upload Device Code due to missing files within openocd dependency HOT 6
- How to build the libdevkit-sdk-core-lib.a
- MXOne AZ3166WiFi use static IP Address for WiFi
- Issue when I try to compile an sample
- package_azureboard_index.json point to missing blob-server
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devkit-sdk.