【问题标题】:Arduino Uno - WebService (AzureML)Arduino Uno - Web 服务 (AzureML)
【发布时间】:2015-10-20 06:34:30
【问题描述】:

我想连接到 AzureML Web 服务。我已经查看了 Arduino 主页上的 POST 方法,也在这里https://iotguys.wordpress.com/2014/12/25/communicating-with-microsoft-azure-eventhub-using-arduino/

这是我的设置方法:

    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);
 }

Post 方法基于此:http://playground.arduino.cc/Code/WebClient

我刚刚在标题中添加了sprintf(outBuf, "Authorization: Bearer %s\r\n", api_key);char* api_key = "the ML Web Service API KEY"

另外,与 WebClient 中指定的不同,我使用整个 WebService URI 作为 url,并且不指定页面名称。

这不起作用。

我正在连接的网络可以访问 Internet。

我做错了什么?

【问题讨论】:

    标签: web-services azure arduino-uno azure-machine-learning-studio


    【解决方案1】:

    您创建的机器学习工作室服务需要从具有 SSL 功能的设备接收请求以执行 HTTPS 请求。 AFAIK,Arduino 不支持 SSL 功能。

    一种常见的情况是将 Arduino 连接到第三个设备(如 Raspberry Pi 2 等),将其用作网关并从 Pi 本身进行调用。

    这是来自 Microsoft 开放技术团队的示例 project,它利用了 Arduino Uno、Raspberry pi 和 Azure 的东西。

    希望这会有所帮助!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-08-24
      • 2013-10-22
      • 2013-06-05
      • 2017-12-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多