gateway-config icon indicating copy to clipboard operation
gateway-config copied to clipboard

advertise on fails

Open controllinohelium opened this issue 3 years ago • 10 comments

Since recently, we seem to cannot startup advertising anymore. When doing sudo bin/gateway_config advertise on, we get this result:

RPC to '[email protected]' failed: {'EXIT', {function_clause, [{clique_status,parse, [{enable_advertising,true}, #Fun<clique_human_writer.0.31690421>, {context,false,[]}], [{file, "/home/pi/gateway_config_2/_build/default/lib/clique/src/clique_status.erl"}, {line,37}]}, {clique_human_writer,write,1, [{file, "/home/pi/gateway_config_2/_build/default/lib/clique/src/clique_human_writer.erl"}, {line,38}]}, {clique,print,3, [{file, "/home/pi/gateway_config_2/_build/default/lib/clique/src/clique.erl"}, {line,112}]}, {clique,print,2, [{file, "/home/pi/gateway_config_2/_build/default/lib/clique/src/clique.erl"}, {line,95}]}, {gateway_config_cli_registry, command,1, [{file, "/home/pi/gateway_config_2/src/cli/gateway_config_cli_registry.erl"}, {line,25}]}]}}

When we check with advertise status, it still seems to be set to "on", but we get very random results in connecting with the miner. Sometimes it shows up, sometimes (more often) it doesn't. Very random behaviour.

What could be the issue here?

controllinohelium avatar Nov 08 '21 09:11 controllinohelium

Related to this? https://github.com/helium/gateway-config/issues/78

Perhaps you need to do a clean build?

This would be an issue with the command parser and quite unrelated to ble advertising working better or worse like the latter part of your message states.

madninja avatar Nov 08 '21 13:11 madninja

Hi @madninja unfortunately not, I tried a full clean build of everything now, still the same result. Does this mean even though we get this error message it should work?

Strangely, we still have huge instability in getting the bluetooth connection working properly with the Hotspot app. Is this something you experienced as well? It works maybe 20% of the time, and sometimes it just works after hitting the scan button a few times while onboarding in the app, but most of the time it doesn't.

EDIT: Tried with different phones, always the same result.

controllinohelium avatar Nov 08 '21 13:11 controllinohelium

No I've not seen that happen, but to narrow this down, you could try building with commit b3d9878c6c726f2881c250057715c81c7fb18a55 which is the last tagged release

madninja avatar Nov 08 '21 13:11 madninja

I've tried it and the error from before disappears, but now I can't find any hotspot anymore. Just "Hotspot not found" in the app, after trying multiple times, even trying to shut off/on BT on phone.

controllinohelium avatar Nov 08 '21 14:11 controllinohelium

Taken to Discord to see if we can get some hands on

madninja avatar Nov 08 '21 14:11 madninja

@madninja thanks, just wrote back there.

controllinohelium avatar Nov 08 '21 15:11 controllinohelium

@madninja unfortunately with latest Erlang/OTP 22, we have the same issue. Bluetooth device can sometimes be found, sometimes not, pretty unstable and random. Can you take a look into one of the devices again?

controllinohelium avatar Nov 09 '21 10:11 controllinohelium

same on Raspberry Pi 4

leadtekjun avatar Mar 06 '22 06:03 leadtekjun

same on Raspberry Pi 4

same what? getting BLE working on linux and raspi4 is somehwat outside of the scope of gateway-config

madninja avatar Mar 06 '22 16:03 madninja

same on Raspberry Pi 4

same what? getting BLE working on linux and raspi4 is somehwat outside of the scope of gateway-config

got it

leadtekjun avatar Mar 06 '22 16:03 leadtekjun