Sphere是否支持wlan0接口的静态IP [英] Does Sphere support Static IP for wlan0 interface

查看:110
本文介绍了Sphere是否支持wlan0接口的静态IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用API​​为wlan0接口设置静态IP

I am trying to set static IP for wlan0 interface with API

Networking_InitStaticIpConfiguration和  Networking_SetStaticIp()

Networking_InitStaticIpConfiguration and Networking_SetStaticIp()

API返回成功并且"azsphere device wifi show-status" 表示已设置IP。但是,Networking_IsNetworkingReady始终抱怨没有网络,设备无法连接到IoT Hub。

API return succeed and "azsphere device wifi show-status"  indicate IP been set. But Networking_IsNetworkingReady always complain no network and device is not able to connect to IoT Hub.

配置如下,我也尝试将网关IP设置为"0.0.0.0 ",也不起作用。

The configuration is as below, I also tried set gateway IP to "0.0.0.0", not work either.

那么,Sphere是否支持wlan0接口的静态IP,如果有,是否有任何示例代码?

So, does Sphere support static IP for wlan0 interface, if yes, any sample code?

推荐答案

似乎问题是dns当我将wlan0配置为静态IP时未设置。

Seems the issue is that the dns is not been set when I config wlan0 as static IP.

如果我绕过Network_IsNetworkingReady()检查并尝试使用curl直接从IP下载,它将起作用。

If I bypass the Network_IsNetworkingReady() check and try to use curl to download from IP directly, it will work.

我有什么办法可以配置Sphere单位的DNS吗?

Is there any way I can configure DNS of Sphere unit?


这篇关于Sphere是否支持wlan0接口的静态IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆