azure-samples / iot-hub-c-m0wifi-getstartedkit Goto Github PK
View Code? Open in Web Editor NEWGet started with the Adafruit Feather M0 Wifi Azure IoT Starter Kit
License: MIT License
Get started with the Adafruit Feather M0 Wifi Azure IoT Starter Kit
License: MIT License
Hi,
I am using the remote monitoring solution and an Arduino M0 feather. When using the HTTP protocol to send messages from the Arduino to IoTHub, everything works great. However, I can only receive one command per startup. After that, the IoTHubClient_LL_DoWork
function is called, but no command is processed.
The code in question from remote_moitoring.c:
sendMessage(iotHubClientHandle, buffer, bufferSize);
}
}
IoTHubClient_LL_DoWork(iotHubClientHandle);
ThreadAPI_Sleep(1000);
currentCycle++;
The first time IoTHubClient_LL_DoWork(iotHubClientHandle)
is called, it processes one command, and one command only, even if more are in the queue. I've modified iothub_client_ll.c to log what's happing, and the IoTHubClient_LL_DoWork(IOTHUB_CLIENT_LL_HANDLE iotHubClientHandle)
appears to be working fine, so I'm not sure what's going on.
Any help would be appreciated. Thanks!
In section 2.8 and 2.9 is this needed? Didn't we add the Arduino libraries already in the first section?
In order to get the line, "bower install" to work I first needed to install bower globally with:
npm install -g bower
The Azure IoT Arduino Library (v0.1.0) Depends on Wifi101.h but this board doesn't use Wifi101. Here's the header in the sketch where the project uses the WINC1500 headers instead.
If I add the Wifi101 library the compile error goes away but then it creates linker errors. There will be two sets of wifi objects and thus the linker barfs.
I've made edits on the headers, we need to reflect this on the Index.
Also, the second index points to the first tutorial (at least some of the links).
It points to downloading the library: "Download the library as a zip"
Which references:
https://github.com/arduino-libraries/AzureIoT/archive/master.zip
remote_monitoring.ino has a reference to:
Which does not exist in their library. See: https://github.com/adafruit/Adafruit_WINC1500/tree/master/src
I tried to create a PR to fix this; however, I couldn't even find the repo for this lib. Where does this source package come from?
Does that explain why the documentation references so many lines that needed to be modified?
The pictures and instructions for connecting the pins don't match the breadboard supplied. The breadboard in my kit has > 60 rows.
As mentioned multiple times, this is redundant and we don't need it. Developers will be able to get all they need with Device ID and connections.
In 2.7, why do I do a npm install with a ton of libraries rather than have all the library dependencies in the package.json
With a couple of more nested levels it's clearer to see.
LOWER PRIO: let's wait until we have the 4 tutorials.
I used the starterkit and did not stop the resources. Now I have Azure bill of $ 3500. An expansion that automatically stops resources would be helpful.
It is mentioned that git is needed but the bower command from the needs git in the path.
The instructions used device credentials but ASA needs service or owner credentials. ASA will output an error and not run with device credentials.
Linker error because NTPClient code is both in the project and AzureIoT/util. You have to remove the NTPClient.cpp but leave the NTPClient.h in the remote_monitoring folder. #include <NTPClient.h> will not work.
It still pointed to the Remote Monitoring solution, I've modified it
TBD depending on Adafruit's response.
This sentence in each tutorial should be changed:
Note: Creating an account is free. Click here to get your Azure free trial
For
Note: For first time users, click here to get your Azure free trial which gives you 200USD of credit to get started.
I've modified them everywhere I've seen it.
You mention a few times in the tutorial to "stop your remote monitoring solution" or "stop your Command Center jobs" to avoid charges. Can you give directions for doing that? The iot portal doesn't have a stop, and in Azure portal, I'm not sure what things to stop to avoid charges. Thanks.
I stopped everything in the Azure portal for the group, and disabled all the devices, but the count on the event hub kept going up, so I deleted the solution (shouldn't there be a Stop button in addition to Delete?)
We need to push the code to master, please engage with Andre Price tomorrow @AttunixCorp
Document sections 2.4 says region: your choice. However all the Azure services for this lab should really be in the same region.
If I leave the default value as "storage-table-name" the server.js app will report and error.
There are buttons on the webpage that don't seem to do anything.
The Azure IoT Arduino library (v.0.1.0) calls the RTCZero header. The missing header creates a compile time error. If I add the library RTCZero the compile error goes away.
Here's what I see in the image, please confirm. Also, let's indicate with "On board" the ones that are on top of the board.
Start | End | Cable Color |
---|---|---|
CS (Pin 1E) | CE0 (Pin 16C, on board) | Orange cable |
SDI (Pin 2E) | SCK (Pin 18I, on board) | Blue cable |
SDO (Pin 3E) | SCK (Pin 19I, on board) | White cable |
SCK (Pin 4E) | SCK (Pin 19I, on board) | Yellow cable |
GND (Pin 5E) | Pin 7+ (on breadboard) | Black cable |
3V (6E) (on breadboard) | Pin 7+ | Red cable |
Pin 26- (on breadboard) | Pin 29J (on breadboard) | Black cable |
Pin 28+ (on breadboard) | Pin 28J (on breadboard) | Red cable |
I get "Bad Request - Error converting varchar to int" during Remote Monitoring provisioning. There seems to be no clear way to mitigate. Probably, I don't need Bing Maps to complete the tutorial on this page, but I'm also not sure what I'm missing out on either.
The box doesn't clearly say I have a M0 Feather. In fact, there are parts inside labeled 'Huzzah Starter Pack'
There are a lot of parameters that need to be correct in config.json. Please explain what they are. Also, the default connection string to IotHub is misleading. The Shared policy token needs to be service or owner, not device.
This link in section 2.4 is broken https://github.com/Azure/azure-iot-sdks/blob/master/doc/setup_iothub.md
At:
https://github.com/Azure-Samples/iot-hub-c-m0wifi-getstartedkit/blob/master/README.md#17-modify-the-remote-monitoring-sample
(and multiple other places)
It states:
Replace the placeholders with your WiFi name (SSID), WiFi password, and the device connection string you created at the beginning of this tutorial
However, as someone who is new to Azure, it is not clear if you mean:
Hi all, I am new to this and are haveing som issues sending my sensor data to the IoT Azure Hub. I have cheked my setup several times, this is last resort.
In the serial logger I get this statuses:
Attempting
to connect to SSID: Utsikten 17
Connected to wifi
Fetched NTP epoch time is: 1481151547
Checking for the presence of the BME280 temp/humid/press module.
Found and initialized BME280 module.
Info: IoT Hub SDK for C, version 1.0.17
Info: deviceId=FeatherWifi
Info: IoTHubClient accepted the message for deliveryError: Time:Wed Dec 7 22:59:27 2016 File:C:\Users\Trond Erik Mometo\Documents\Arduino\libraries\AzureIoTUtility\src\adapters\tlsio_arduino.c Func:tlsio_arduino_open Line:264 TLS failed to start the connection process.
Error: Time:Wed Dec 7 22:59:27 2016 File:C:\Users\Trond Erik Mometo\Documents\Arduino\libraries\AzureIoTProtocol_MQTT\src\azure_umqtt_c\mqtt_client.c Func:mqtt_client_connect Line:884 Error: io_open failed
Error: Time:Wed Dec 7 22:59:27 2016 File:C:\Users\Trond Erik Mometo\Documents\Arduino\libraries\AzureIoTHub\src\sdk\iothubtransport_mqtt_common.c Func:SendMqttConnectMsg Line:1554 failure connecting to address MometoIoTv3.azure-devices.net:0.
Info: Evaluated delay 0 at 1 attempt to retry
Any help leading me in the right direction would be appreciated :)
Looking at the address the port definition ":0" looks somewhat strange to a newbee like me?
Best regards
Trond Erik
I've successfully managed to get the Remote Monitoring sample up and running with the Adafruit Feather M0 Kit. When I launch the demo on the Feather M0, it starts transmitting data which shows up in Azure IoT.
However, after approx. 25 or so successful transmits, the serial console shows the following log entries repeatedly:
***/Arduino/libraries/AzureIoTHub-master/src/sdk/iothubtransporthttp.c Func:DoEvent Line:1223 unable to HTTPAPIEX_ExecuteRequest
It does not recover from that fail state and eventually stops transmitting at all. Any idea?
The ASA query relies on EventTime and MTemperature. Neither field is generated by the device so the query never runs.
The 'device' in server.js consumes the LED messages so the board never gets them.
The containing folder is 'remote-monitoring' the sketch is 'remote_monitoring.ino'. The IDE will prompt to create a new folder with an underscore in the name. If you skip this the IDE will tell the user it cannot open the sketch.
Following the starter kit instructions for remote monitoring with the Adafruit Huzzah ESP8266 works until I compile the sketch at step 1.8 and the following error results:
C:\Users\Documents\Arduino\libraries\AzureIoT\src\util/HTTPSClient.h:4:21: fatal error: WiFi101.h: No such file or directory
Is there something missing from the instructions i.e. something else that needs to be installed as the file is not present on my PC. Adding the WiFi101 library to Arduino IDE (which is not mentioned in the instructions) causes more compilation errors.
I've modified all of them I think.
Ex: "Modifying your sample" should be "Modify your sample".
The Arduino IDE really doesn't like when they have different names. In this case the folder and the file don't match since one uses an underscore and the other uses a hyphen.
There are no jumper wires included in the kit.
Example in section 2.4
when I double click to select the text of the event hub name I get the trailing space as well. When I paste the copied text into azure I get an error about the name. It's hard to tell how to fix the error since the space is invisible to the user. This happens in several sections.
After being redirected, click "Custom Create", Enter the following settings for the Event Hub (use a name of your choice for the event hub and the namespace):
◦Event Hub Name: featherEventHub
◦Region: Your choice
◦Subscription: Your choice
◦Namespace Name: Your Project Namespace, in our case “Feather2Suite”
I‘m trying to get the sample compiled. However, I run into the following compile error:
file included from C:\Users\ralfr\Downloads\iot-hub-c-m0wifi-getstartedkit-master\iot-hub-c-m0wifi-getstartedkit-master\remote_monitoring\remote_monitoring.ino:4:0:
C:\Users\ralfr\Documents\Arduino\libraries\Adafruit_BME280_Library-master/Adafruit_BME280.h:26:29: fatal error: Adafruit_Sensor.h: No such file or directory
#include <Adafruit_Sensor.h>
^
compilation terminated.
Multiple libraries were found for "Adafruit_BME280.h"
Used: C:\Users\ralfr\Documents\Arduino\libraries\Adafruit_BME280_Library-master
Not used: C:\Users\ralfr\Documents\Arduino\libraries\Adafruit_BME280_Library
exit status 1
Error compiling for board Adafruit Feather M0 (Native USB Port).
I also could not find the Sensor Masters library. Please help!
Hi, please take a look at the email thread. Andre Price has contributed a full remo monitoring sample that will be featured in the IDE.
Here're the actions: modify that sample to make it work with the real sensor. Test it and then leverage their instructions for the simple sample (in their repo) to create the exact same thing for remote monitoring. Essentially, devs will just open Arduino IDE, select the remote monitoring sample, change their connection string, and ready to go.
Including Andre's latest PR
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.