Closed zhangjingye03 closed 1 year ago
Thank you for the detailed report @zhangjingye03, and sorry you are experiencing that issue.
I believe you've identified the section of code responsible for this issue. I'll take a closer look in the coming days and hopefully will have a fix soon.
@zhangjingye03 I've added a fix (#8) for your issue. Please, if you can, try out v0.2.0
and let me know if it fixes your issue. Thanks
Closing. Please re-open @zhangjingye03 if you experience any related issues.
Hi Adam,
Thanks for this great integration!
However, my WiFi SSID begins with UTF-8 character and then ASCII one, like
ω=2πf
. In this case,status
fromhostapd_cli
gives something below, which mixes\x
and normal ASCII chars.https://github.com/awilliams/wifi-presence/blob/b2b64ea8bce28ef5047b66c9929817240f65bc36/internal/hostapd/status.go#L58-L67
The code above just replace
\x
and then decode hex, which still contains non-hex chars, resultingError: encoding/hex: invalid byte
on my device. I'm not familiar with golang though, but maybe we could usestrconv.Unquote
instead? (Ref)Thanks