Coder Social home page Coder Social logo

iot-hub-c-m0wifi-getstartedkit's Issues

Receive commands only once, and only one

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!

Azure IoT Arduino Library Depends on Wifi101.h

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.

ifdef ARDUINO_SAMD_FEATHER_M0

include <Adafruit_WINC1500.h>

include <Adafruit_WINC1500Client.h>

include <Adafruit_WINC1500MDNS.h>

include <Adafruit_WINC1500Server.h>

include <Adafruit_WINC1500SSLClient.h>

include <Adafruit_WINC1500Udp.h>

elif defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000)

include <WiFi101.h>

endif

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.

Index needs updating

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).

Issues with arduino-libraries/AzureIoT zip

Re:
https://github.com/Azure-Samples/iot-hub-c-m0wifi-getstartedkit/blob/master/README.md#16-install-library-dependencies

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:

include <Adafruit_WINC1500MDNS.h>

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?

Automatic stopping of Azure resources.

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.

ASA can't access IoT hub

The instructions used device credentials but ASA needs service or owner credentials. ASA will output an error and not run with device credentials.

NTPClient in multiple places

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.

How do you "stop solution"

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?)

Section 2.4 - Region Selection

Document sections 2.4 says region: your choice. However all the Azure services for this lab should really be in the same region.

Pin table and image don't match

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

Provisioning failed due to Bing Maps

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.

Packaging Feedback

The box doesn't clearly say I have a M0 Feather. In fact, there are parts inside labeled 'Huzzah Starter Pack'

config.json needs to be explained

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.

TLS failed to start the connection process.

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 delivery

Error: 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

Remote Monitoring Sample: unable to HTTPAPIEX_ExecuteRequest after a while

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?

Missing WiFi101.h error

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

include <WiFi101.h>

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.

Remove trailing spaces in code / configuration samples.

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”

Cannot compile: fatal error: Adafruit_Sensor.h: No such file or directory

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!

Adapt remote monitoring to use Andre's sample in his repo

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

obsoleted/AzureIoT@a87886e

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.