【发布时间】:2019-09-28 09:35:15
【问题描述】:
给定下表
$ connmanctl services
*AO MyNetwork wifi_dc85de828967_68756773616d_managed_psk
OtherNET wifi_dc85de828967_38303944616e69656c73_managed_psk
AnotherOne wifi_dc85de828967_3257495245363836_managed_wep
FourthNetwork wifi_dc85de828967_4d7572706879_managed_wep
AnOpenNetwork wifi_dc85de828967_4d6568657272696e_managed_none
我希望能够连接到网络,例如OtherNET,使用字符串 OtherNET 而不是长的 wifi_dc85de828967_38303944616e69656c73_managed_psk,因为我不想计算按 Tab 的次数和/或检查 wifi_ 行中的prompt 对应于预期的网络。
这可能仅使用 connman 吗?还是我真的必须自己写一个包装器?
connmanctl 的 man 页面包含
services Shows a list of all available services. This includes the nearby wifi networks, the wired ethernet connections, blue‐ tooth devices, etc. An asterisk in front of the service indicates that the service has been connected before.
和
connect service Connects to the given service. Some services need a so- called provisioning file in order to connect to them, see connman-service.config(5).
两者都没有过多说明输出的格式或命令的使用。
同样,wiki on Arch Linux 将最后一列称为以wifi_ 开头的第二个字段。
【问题讨论】:
标签: connman