View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000428 | easycwmp | Question | public | 2021-04-29 04:57 | 2021-04-29 04:57 |
Reporter | jackson.stone | Assigned To | |||
Priority | high | Severity | feature | Reproducibility | always |
Status | new | Resolution | open | ||
Summary | 0000428: Cannot debug ext\openwrt\scripts\functions\tr181\wifi functions | ||||
Description | I am trying to debug wifi_radio_get_FrequencyBands function in wifi script. I add the "sh -x" and "sh +x" in the function like this: wifi_radio_get_FrequencyBands() { sh -x local phy="phy${1#*radio}" local freq=`iw phy $phy info | grep "MHz.*dBm" | head -1 | awk '{print $2}'` sh +x [ "${freq#24}" = "$freq" ] && echo "5GHz" || echo "2.4GHz" } But I can't get any output by this command "easycwmp get Device.WiFi.Radio.1.OperatingFrequencyBand" root@LEDE:/usr/share/easycwmp/functions# easycwmp get Device.WiFi.Radio.1.OperatingFrequencyBand If I remove the "sh -x" and "sh +x" from the function, I can get below output. root@LEDE:/usr/share/easycwmp/functions# easycwmp get Device.WiFi.Radio.1.Operat ingFrequencyBand { "parameter": "Device.WiFi.Radio.1.OperatingFrequencyBand", "value": "5GHz" } root@LEDE:/usr/share/easycwmp/functions# Would you help to guide me how to debug shell script functions? Thanks. Jackson | ||||
Tags | No tags attached. | ||||
e-mail notification | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2021-04-29 04:57 | jackson.stone | New Issue |