中国电信EOS UBUS相关命令接口

  • Post author:
  • Post category:其他


1.1.1、平台

elink debug:cat /tmp/eos-capi.log

查看当前连接平台:ubus call ctcapd.serverinfo get

切换到测试平台:

ubus call ctcapd.serverinfo set  ‘{“bssaddr”:”apbss22.189cube.com:8088″,”abiaddr”:”apharbor22.189cube.com:8085″,”devid”:””,”devtoken”:””,”backup”:[“”,””]}’

切换到正式平台:ubus call ctcapd.serverinfo set  ‘{“bssaddr”:”apbss1.189cube.com:8088″,”abiaddr”:”apharbor1.189cube.com:8085″,”devid”:””,”devtoken”:””,”backup”:[“”,””]}’

1.1.2、插件检查

查看elink、qlink版本:ubus call ctcapd.appd list

查看状态命令:ubus call ctcapd.initd status

2.1、ctcapd版本升级


注意:chksum一定要小写,大写Ubus会报错

升级命令:ubus call ctcapd upgrade ‘{“downurl”:”http://192.168.2.44/AX3000GE_V1.0.0%23cd55_20221112184231_D256F128CTCC.bin”,”filesize”: 22944948,”chksum”:”cfdd3b994e747f4dc9c40a587b59891a”,”isreboot”:”0″}’

查看版本:ubus call ctcapd.devinfo get

重启:ubus call ctcapd reboot

恢复出厂:ubus call ctcapd reset

2.2、iptv

设置网口1打VLAN:ubus call ctcapd.iptv set ‘{“enable”:”yes”,”vlanid”:1000,”ethport”:[1],”2.4G”:[],”5G”:[]}’

关闭网口1打VLAN:ubus call ctcapd.iptv set ‘{“enable”:”no”,”vlanid”:1000,”ethport”:[1],”2.4G”:[],”5G”:[]}’

查询端口vlan:ubus call ctcapd.iptv get

2.3、devinfo接口

修改路由模式:ubus call ctcapd.devinfo set ‘{“workmode”:”router”}’

修改桥模式:ubus call ctcapd.devinfo set ‘{“workmode”:”bridge”}’

查询模式状态:


ubus call ctcapd.devinfo get

2.4.1、serverinfo

查询连接平台地址:ubus call ctcapd.serverinfo get

设置连接平台地址:ubus call ctcapd.serverinfo set  ‘{“bssaddr”:”apbss22.189cube.com:8088″,”abiaddr”:”apharbor22.189cube.com:8085″,”devid”:””,”devtoken”:””,”backup”:[“”,””]}’

2.5.1、neighbourinfo

扫描wifi:ubus call ctcapd.neighbourinfo get

2.6.1、laninfo

下挂设备:ubus call ctcapd.laninfo list

下挂数统计:ubus call ctcapd.laninfo getnum

获取指定索引下挂:ubus call ctcapd.laninfo.1 get

下挂配置接入、上网:ubus call ctcapd.laninfo.1 set ‘{“internetaccess”:2}’

下挂配置无法接入与上网:ubus call ctcapd.laninfo.1 set ‘{“internetaccess”:0 }’

下挂配置可以接入,无法上网:ubus call ctcapd.laninfo.1 set ‘{“internetaccess”:1 }’

2.7.1、waninfo

wan信息上报”propertieschanged”:ubus monitor &

获取WAN状态:ubus call ctcapd.waninfo get

设置WAN为PPPOE:ubus call ctcapd.waninfo set ‘{“networktype”:”PPPOE”,”pppoename”:”ikuai”, “pppoepwd”:”123456″}’

设置为DHCP:ubus call ctcapd.waninfo set ‘{“networktype”:”DHCP”}’

2.8、ledswitch

获取状态:ubus call ctcapd.ledswitch get

关闭状态:ubus call ctcapd.ledswitch set ‘{“status”:”off”}’

开启状态:ubus call ctcapd.ledswitch set ‘{“status”:”on”}’

led信息上报”propertieschanged”:ubus monitor &

2.9、wifi

wifi开关状态:ubus call ctcapd.wifi get

wifi设置关闭:ubus call ctcapd.wifi set ‘{“wifiswitch”:”off”,”wpsswitch”:”off”,”elinksync”:”off”}’

wifi设置开启:ubus call ctcapd.wifi set ‘{“wifiswitch”:”on”,”wpsswitch”:”on”,”elinksync”:”on”}’

断开设备:ubus call ctcapd.wifi deassociation ‘{“macs”:[“3223EBE8BC06”]}’

信道扫描:ubus call ctcapd.wifi channelscan

2.4G信道评分:ubus call ctcapd.wifi.1 channelscore

5G信道评分:ubus call ctcapd.wifi.2 channelscore

2.10、wifi.timer

定时关闭:ubus call ctcapd.wifi.timer add ‘{“weekday”:”4″,”time”:”14:55″,”enable”:”no”}’

定时开启:ubus call ctcapd.wifi.timer add ‘{“weekday”:”4″,”time”:”15:01″,”enable”:”yes”}’

查看策略:ubus call ctcapd.wifi.timer list

删除策略:ubus call ctcapd.wifi.timer delete ‘{“idx”:1}’

修改指定策略:ubus call ctcapd.wifi.timer.1 set ‘{“weekday”:”1″,”time”:”09:30″,”enable”:”no”}’

获取指定策略:ubus call ctcapd.wifi.timer.1 get

2.11、wifi.roaming

配置漫游上报:ubus call ctcapd.wifi.roaming set ‘{“enable”:”yes”,”thresholdrssi”:-60,”reportinterval”:60,”starttime”:60,”startrssi”:-40}’

关闭漫游上报:ubus call ctcapd.wifi.roaming set ‘{“enable”:”no”}’

查询漫游配置值:ubus call ctcapd.wifi.roaming get

查询设备漫游值:ubus call ctcapd.wifi.roaming getrssiinfo ‘{“macs”:[“A44BD50A04CF”]}’

查询:ubus call ctcapd.wifi.roaming startaprssiquery ‘{“mac”:”A44BD50A04CF”,”aps”:[{“bssid”:”32FCA1AC8C6A”,”channel”:11},{“bssid”:”32FCA1AC8C6B”,”channel”:60}]}’

2.12、wifi.blacklist


备注:0关闭,1黑名单,2白名单

开启2.4G黑名单模式:ubus call ctcapd.wifi.1.ap.1 set ‘{“accessmode”:1}’

添加黑名单MAC:ubus call ctcapd.wifi.blacklist add ‘{“mac”:”A44BD50A04CF”,”name”:”mi-10″}’

开启5G黑名单模式:ubus call ctcapd.wifi.2.ap.1 set ‘{“accessmode”:1}’

获取黑名单列表:ubus call ctcapd.wifi.blacklist list

删除黑名单:ubus call ctcapd.wifi.blacklist delete ‘{“idx”:1}’

2.13、wifi.whitelist

开启2.4G wifi白名单:ubus call ctcapd.wifi.1.ap.1 set ‘{“accessmode”:2}’

开启5G wifi白名单:ubus call ctcapd.wifi.2.ap.1 set ‘{“accessmode”:2 }’

添加白名单设备:ubus call ctcapd.wifi.whitelist add ‘{“mac”:”A44BD50A04CF”,”name”:”mi-10″}’

删除白名单设备:ubus call ctcapd.wifi.whitelist delete ‘{“idx”:1}’

查看白名单列表:ubus call ctcapd.wifi.whitelist list

2.14、wifi.1

查看wifi2.4Gwifi的状态:ubus call ctcapd.wifi.1 get

配置2.4G WIFI信道为11:


ubus call ctcapd.wifi.1 set ‘{“channel”:11,”txpower”:”0″,”bandwidth”:0,”enable”:”yes”}’



配置2.4G信号强度:ubus call ctcapd.wifi.1 set ‘{“channel”:0,”txpower”:”2″,”bandwidth”:1,”enable”:”yes”}’

WIFI信道扫描:ubus call ctcapd.wifi channelscan

WIFI评分:ubus call ctcapd.wifi.1 channelscore



版权声明:本文为qq_40188204原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。