Linux嵌入式产品开发的注意事项-2、网络部分

4 篇文章 0 订阅
3 篇文章 0 订阅

1、Wifi休眠问题

嵌入式需要保证时刻都能访问,但是在实际操作过程中遇到了无线无法访问的问题。最后经过排查,是因为linux的电源管理机制导致的。由于我的产品是接电使用,所以没有考虑功耗问题,简单粗暴解决,关掉了wifi的电源管理。
vi /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

[connection]
wifi.powersave = 2

貌似该配置由network manager接管的。关于该配置的说明,由于找不到最原始出处,所以直接引用了:

NetworkManager WiFi Power Saving
================================

NetworkManager supports WiFi powersaving but the function is rather undocumented.

From the source code: wifi.powersave can have the following value:

  - NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
  - NM_SETTING_WIRELESS_POWERSAVE_IGNORE  (1): don't touch existing setting
  - NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave
  - NM_SETTING_WIRELESS_POWERSAVE_ENABLE  (3): enable powersave

Then I propose 2 files, only one of them needs to be put under `/etc/NetworkManager/conf.d/`.  
One is forcing to disable powersaving, while the other one enable it.

Once you have put the file in the right folder, simply restart NetworkManager:

sudo systemctl restart NetworkManager
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值