I'd like to connect to an AzureML Web Service. I have looked into the POST Method on the Arduino Homepage and also here https://iotguys.wordpress.com/2014/12/25/communicating-with-microsoft-azure-eventhub-using-arduino/
Here is my Setup method:
void setup()
{
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect.
}
Serial.println("ethernet");
if (Ethernet.begin(mac) == 0) {
Serial.println("ethernet failed");
for (;;) ;
}
// give the Ethernet shield a second to initialize:
delay(1000);
}
The Post Method is based on this: http://playground.arduino.cc/Code/WebClient
I just added sprintf(outBuf, "Authorization: Bearer %s\r\n", api_key); to the header, with char* api_key = "the ML Web Service API KEY"
Also, unlike specified in the WebClient I use the whole WebService URI as url and do not specify a page name.
This doesn't work.
The Network to which I am connecting has Internet Access.
What am I doing wrong?
Machine Learning Studio services that you create needs to receive requests from a device that has SSL capabilities to perform HTTPS requests. AFAIK, Arduino doesn't support SSL capabilities.
One usual scenario is to attach the Arduino to a third device like Raspberry Pi 2 etc to use it as a gateway and do the call from the Pi itself.
Here's a sample project from Microsoft Open Technologies team that utilizes Arduino Uno, Raspberry pi and Azure stuff.
Hope this helps!
Related
I am working on a project and I need all my ESP32s to communicate with my PC to relay information. I am developing my MQTT server and I would need a way to find the IP of the PC which hosts the MQTT server to be able to send it the data from the ESP32.
Long time ago I tried to deal with NetBIOS broadcast but it's really unstable and complex to code in Arduino C++.
mDNS is what you are looking for.
The correct service type for MQTT is _mqtt._tcp.
There are plenty of libraries that support publishing mDNS services such as Avahi on Linux.
Windows doesn't support mDNS as a client but iirc you can install the Apple printer driver kit to add support.
If you can't get mDNS to work, and if you have full control of the LAN's router: some routers can act both as a DNS proxy and as a LAN DNS server, see here for example.
You can then connect by name or get the IP address without further configuration of the ESP32 (unless you change the server name, of course). It won't show you directly if the _mqtt._tcp service is available, though.
I'm new to QWebsocket. I have created two applications, which use QWebsocket communication. Does anyone know if it is possible to capture the messages sent from webClient to webServer by another application on the same port? However, there is no way to change these 2 applications which communicate via web socket.
no, you cannot start a second server.
// setup the QWebSocketServer
m_server = new QWebSocketServer("WebSocket app", QWebSocketServer::NonSecureMode, this);
if (!m_server->listen(QHostAddress::LocalHost, 12345)) {
qFatal("Failed to open web socket server, probabaly caused by an existing instance!");
return;
}
Hi guys I am using Kaaserver for our IoT project and now i faced with one problem
I would like to ask you how i can send data with arduino to Kaaserver I read some where is possible to configure kaa as gateway and i wanna to know how ?
You can use other board as gateway for Arduino, so you'll need some device supported by Kaa (ESP8266, BeagleBone, Raspberry PI, etc.).
You can generate Kaa SDK for your device and write an application which will collect data from Arduino by serial port and send it to Kaa server using SDK.
I did a lot of research for following matter and I got a lot of helpful information but the matter still remains, so I'm going to write it with full details
I'm trying to run "Remote Server Administration" with VisualSVN Server (Enterprise Edition), the server is Windows Server 2008 connected to the internet via router with port forwarding to this server. The client is not at local network so I use a static IP for the server.
Also I did every things written at this URL: http://www.visualsvn.com/support/topic/00025/
but I still get the following error message Connot connect to WMI namespace "..." : the RPC server is unavalible (0x800706ba) when I'm trying to "connecting to another computer".
On the other-hand, I can browsing the "Repositories" content by any web-browser successfully.
How can I manage the Repositories at remote servers?
"...the RPC server is unavalible (0x800706ba)" error indicates a connectivity issue to the remote machine.
Accessing WMI remotely requires port 135 TCP/UDP and all TCP ports above 1024 (1024-65535) to be opened (and forwarded), by default. You can setup fixed port for WMI to simplify the port-forwarding / proxy setup task. In order to setup the fixed port, follow steps described in the article "Setting Up a Fixed Port for WMI". After you follow these steps you are required to setup port forwarding and proxy rewrites (if any) for 135 TCP/UDP and port 24158 TCP.
"...Access is denied (0x80070005)" error indicates insufficient permissions to access WMI remotely. Add your user account to the local group on the remote machine: "Distributed COM Users".
I'm currently working on a C++ application that communicates with my browser using WebSockets. The connection is only local, there won't ever be any non-local socket.
Currently my C++ code looks like that (just for an example):
while (true) {
WebSocket *socket = server->accept () ;
socket->read (buffer, 256) ;
}
And my javascript code:
var socket = new WebSocket ("ws://localhost:4564") ;
socket.onopen = function () {
socket.send("Hello my name is Holt!");
} ;
As you can see, I'm waiting for a packet that should be sent as soon as the connection is openned. So I got 2 questions:
First, are there any way to send this information directly inside the connection? (I think no, so it's why my second question comes for...)?
Second, knowing that the connection is local, is that possible that the server accept the socket without being able to retrieve the packet after?
To add a bit more information, the current C++ application is based on Qt 5.3 with the QtWebSockets module and the javascript code is a Google Chrome extension that will run a script on specific websites.
Thanks for you help!
After you establish websocket connection between client and server, in client, when connection is alive, you can call socket.send() when you want to send data to server.
Even connection local, server is still need wait and receive data, which is a full TCP/IP data transfer process.