RPI-Pico-Arduino-AzSDK: A Bridge too far ...
ardpico arduino rpi pico iot-hub c sdk-for-c-arduino
The RPi Pico W uses WiFi to connect to the internet. Can the code be modified to use a wired NIC such as with an Arduino Uno with an Internet Shield or similar? Nah ….
With the Azure SDK for C Arduino, MQTT is used over secure networking for communications between the device and IoT Hub. So the quest here is to replace the WiFi code with the Arduino Ethernet library (or the EthernetLarge library as per OPEnSLab-OSU/SSLClient) whilst still keeping the internet communications secure with SSL/TLS. Whilst it was considered that the Uno does not have sufficient resources for this, it was examined.
As a start some basic MQTT examples were run on the Uno successfully. But these lack the required security for Azure IoT Hub communications through Azure SDK for C Arduino.
The GitHub library, OPEnSLab-OSU/SSLClient was considered as an option. The EthernetMQTT sample was loaded in the IDE and a build was attempted. This is generated the error:
c:\Users\david\Documents\Arduino\libraries\SSLClient\src/SSLClientParameters.h:31:10: fatal error: vector: No such file or directory
#include <vector>
Vector is one of the C++ Standard Template Libraries. Whilst Arduino uses a C++ compiler it does not include these libraries, due to storage restrictions of a bare metal device. With the more resource endowed RPi Pico W, these Standard Libraries (or at least some of them, including Vector) are included in the BSP.
There are some attempts at creating an Arduino STL library such as mike-matera/ArduinoSTL on GitHub. There is a Vector class in that library. No intention here though of recoding the SSLClient as above to make use of that. Some issues raised in the SSLClient repository with respect the vector issue, as above, indicate that the library is only compatible with some Arduino devices. Uno not being one.
Oh well! A bridge to far …
Back to using the IoT Plug and Play bridge or the BlazorIoTBridge with the Uno.
Topic | Subtopic | |
Next: > | Jekyll | Blog Site Updates - Grouping Query |
< Prev: | Monkeys on a typewriter coding | |
This Category Links | ||
Category: | Pico W AzSDK Index: | Pico W AzSDK |
Next: > | RPI-Pico-Arduino-AzSDK | Bluetooth and GPS Update |
< Prev: | RPI-Pico-Arduino-AzSDK | Addendum |