gl-inet / bletool

Apache License 2.0
14 stars 1 forks source link

Response missing #8

Closed Emb3ddev closed 3 years ago

Emb3ddev commented 3 years ago

Some commands will always return code 2 when used even when actual operation was successful. It appears to affect both CLI and API implementation.

Used device: GL-S1300 gateway Used OS base: https://github.com/gl-inet/openwrt

quick test I made:

root@OpenWrt:~# bletool enable 0 { "code": 0 } root@OpenWrt:~# bletool enable 1 { "code": 0 } root@OpenWrt:~# bletool discovery err|gl_bleapi.c|gl_ble_discovery(410): Response missing!

{ "code": 2 } root@OpenWrt:~# bletool listen { "type": "scan_result", "mac": "xx:xx:xx:xx:xx:xx", "address_type": 1, "rssi": -81, "packet_type": 0, "bonding": 255, "data": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } root@OpenWrt:~# bletool local_address err|gl_bleapi.c|gl_ble_get_mac(335): Response missing!

{ "code": 2 } root@OpenWrt:~# bletool stop_discovery { "code": 0 } root@OpenWrt:~# bletool enable 0 { "code": 0 }

HeFeng1947 commented 3 years ago

Thanks for the feedback! This is a known bug and I will submit a fix later

Emb3ddev commented 3 years ago

Thanks for the feedback! This is a known bug and I will submit a fix later

Thank you. Do you have approximation when fix is available?

HeFeng1947 commented 3 years ago

Thanks for the feedback! This is a known bug and I will submit a fix later

Thank you. Do you have approximation when fix is available?

I have pushed the new code and you can test it again. Thanks again for your feedback.