I would like to know if there is way into the lib to implement WebSocket connections on this device. I am interested to use it in client mode.
-
This site is for asking questions about specific programming questions around problem areas. Please have a go yourself and provide a [mcve] for others to assist you. – Alan Feb 01 '18 at 03:18
-
My question was if there is a supported library for this as I am using the same library I used for another board and is not working for this device. The lib I use is: https://github.com/Links2004/arduinoWebSockets which can be downloaded automatically in Arduino IDE. When including this file I get the following error: arduino15\packages\az3166\tools\arm-none-eabi-gcc\5_4-2016q3\arm-none-eabi\include\c++\5.4.1\bits\stl_algobase.h:195:5: error: expected unqualified-id before 'const' min(const _Tp& __a, const _Tp& __b) ^ – user1742636 Feb 02 '18 at 14:15
-
Hi @user1742636, I am a dev works for Microsoft Azure IoT DevKit. We should have made it possible to connect to ws on DevKit. I will post more information after I get a confirmation. – Sneezry Feb 02 '18 at 16:28
2 Answers
The WebSocket client library for IoT DevKit will be coming soon (in next release). We've already filed a GitHub issue to track this new feature. BTW, the WebSocket client we will release ONLY support unsecure WebSocket connection (not SSL), and the secure version(wss) will be coming in future.

- 21
- 2
Please install the latest version(1.3.3) and it contains the library and sample code on how to use Web Socket client. Currently, SSL web socket is not supported. Some function we provided:
Constructor: WebSocketClient(char * url)
Connect: bool connect()
Send: int send(const char * data, long size, WS_Message_Type messageType = WS_Message_Text, bool isFinal = true);
Receive: WebSocketReceiveResult* receive(char * msgBuffer, int size)
Close: bool close()
This link provides the detailed guide and sample on how to use WebSocket client for IoT DevKit. https://microsoft.github.io/azure-iot-developer-kit/docs/apis/websocket-client/

- 94
- 4