Giter Site home page Giter Site logo

gateway-config's Introduction

Travis License Erlang Versions Build Tool

gateway-config

The Helium configuration application. Manages the configuration of the Helium Hotspot over Bluetooth, and ties together various services over dbus.

Features

  • Exposes a GATT BLE tree for configuring the hotspot over Bluetooth.
  • Signals gateway configuration (public key and Wi-Fi credentials) over dbus.
  • Listens for GPS location on SPI and signals the current Position of the hotspot over dbus.

Install

To build this project, make sure you have libdbus-1-dev (or its equivalent) and cmake installed on your development machine.

To run this project, make sure you have dbus, bluez and connman installed and running on your development machine.

Clone the repo and make a release of the package:

git clone https://github.com/helium/gateway-config.git
cd gateway-config
make && make release

Copy the generated release to its final destination.

cp -R _build/prod/rel/gateway_config /opt/gateway_config

Copy the dbus config file into the system.d folder to set permissions for the config application. The exact location of dbus configuration may differ on your Linux installation.

cp -R _build/prod/rel/gateway_config/config/com.helium.Config.conf /etc/dbus-1/system.d/

Restart dbus to pick up the new configuration. This varies per Linux distribution.

On a Void Linux development system:

sudo sv restart dbus

Start the gateway-config service.

On the Helium Hotspot the service is started on system boot.

On a development system you can start the service by starting a rebar shell:

sudo ./rebar3 shell

Or cd to the release directory and run the service in the background:

cd _build/prod/rel/gateway_config
sudo bin/gateway_config start

gateway-config's People

Contributors

evanmcc avatar fvasquez avatar jaykickliter avatar madninja avatar sprhawk avatar vagabond avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gateway-config's Issues

Not able to see gateway on nrF Connect (bluetooth)

I am able to compile and boot gateway_config, but it is NOT showing in helium or nrF app during bluetooth scan. I have attached the console, error and crash logs (and erl_crash.dump file) for the reference.
console.log
crash.log
error.log
erl_crash.txt

Following are the logs of the gateway while running;

$ sudo ./rebar3 shell

===> Verifying dependencies...
===> Plugin rebar3_eqc does not export init/1. It will not be used.
===> Analyzing applications...
===> Compiling gateway_config
Erlang/OTP 22 [erts-10.7.2.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1]
Eshell V10.7.2.1 (abort with ^G)
1> ===> Booted syntax_tools
===> Booted compiler
===> Booted goldrush
===> Booted lager
===> Booted erlang_ale
===> Booted h3
===> Booted ebus
===> Booted gatt
===> Booted connman
===> Booted cuttlefish
===> Booted clique
===> Booted grpc_client
===> Booted cowlib
===> Booted http2_client
===> Booted gateway_config

While running in other mode, described on repo, following output is given my app:

_pi@raspberrypi:~/gateway-config/build/prod/rel/gateway_config $ bin/gateway_config foreground
_Exec: /snap/erlang/89/usr/bin/../lib/erlang/erts-10.7.2.1/bin/erlexec -noinput +Bd -boot /home/pi/gateway-config/_build/prod/rel/gateway_config/releases/0.1.0/gateway_config -mode embedded -boot_var SYSTEM_LIB_DIR /snap/erlang/89/usr/bin/../lib/erlang/lib -config /home/pi/gateway-config/_build/prod/rel/gateway_config/releases/0.1.0/sys.config -args_file /home/pi/gateway-config/_build/prod/rel/gateway_config/releases/0.1.0/vm.args -- foreground
Root: /home/pi/gateway-config/_build/prod/rel/gateway_config
/home/pi/gateway-config/_build/prod/rel/gateway_config
{"Kernel pid terminated",application_controller,"{application_start_failure,gateway_config,{{shutdown,{failed_to_start_child,gateway_config_worker,{'EXIT',{{badmatch,{error,no_access}},[{gateway_config_worker,start_link,1,[{file,"/home/pi/gateway-config/src/gateway_config_worker.erl"},{line,53}]},{supervisor,do_start_child_i,3,[{file,"supervisor.erl"},{line,379}]},{supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,365}]},{supervisor,'-start_children/2-fun-0-',3,[{file,"supervisor.erl"},{line,349}]},{supervisor,children_map,4,[{file,"supervisor.erl"},{line,1157}]},{supervisor,init_children,2,[{file,"supervisor.erl"},{line,315}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]}]}}}},{gateway_config_app,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,gateway_config,{{shutdown,{failed_to_start_child,gateway_config_worker,{'EXIT',{{badmatch,{error,no_access}},[{gateway_config

Crash dump is being written to: erl_crash.dump...done_

Also, while running the following dbus-send command, we get the following errror:
$ dbus-send --system --print-reply --dest=com.helium.Miner / com.helium.Miner.P2PStatus
Error org.freedesktop.DBus.Error.ServiceUnknown: The name com.helium.Miner was not provided by any .service files

Please help?

Can't start gateway_config

Dear dev team,

I'm using /dev/i2c-4

I'm able to generate the onboarding key via /dev/i2c-4.

But I couldn't find the config file for /dev/i2c-4 of gateway-config. Hopefully, dev team can let me know where the file should I update.

2022-11-28 09:51:04.706 [warning] <0.544.0>@gateway_config_worker:init_button:76 No GPIO device tree found, running in stub mode
2022-11-28 09:51:04.712 [warning] <0.546.0>@gateway_config_led:init:78 No i2c device found, running in stub mode
2022-11-28 09:51:04.726 [info] <0.546.0>@gateway_config_led:led_set_color:243 Would have set LED: {255,255,0}
2022-11-28 09:51:04.738 [error] <0.549.0> Supervisor {<0.549.0>,gatt_application_sup} had child application started with gatt_application:start_link(<0.549.0>, gateway_gatt_application, []) at undefined exit with reason {error,no_adapter} in context start_error
2022-11-28 09:51:04.739 [error] <0.543.0> Supervisor gateway_config_sup had child gateway_gatt_application started with gatt_application_sup:start_link(gateway_gatt_application, []) at undefined exit with reason {shutdown,{failed_to_start_child,application,{error,no_adapter}}} in context start_error
2022-11-28 09:51:04.739 [error] <0.550.0> CRASH REPORT Process <0.550.0> with 0 neighbours exited with reason: {error,no_adapter} in gen_server:init_it/6 line 401
2022-11-28 09:51:04.741 [error] <0.541.0> CRASH REPORT Process <0.541.0> with 0 neighbours exited with reason: {{shutdown,{failed_to_start_child,gateway_gatt_application,{shutdown,{failed_to_start_child,application,{error,no_adapter}}}}},{gateway_config_app,start,[normal,[]]}} in application_master:init/4 line 138
2022-11-28 09:51:04.742 [info] <0.435.0> Application gateway_config exited with reason: {{shutdown,{failed_to_start_child,gateway_gatt_application,{shutdown,{failed_to_start_child,application,{error,no_adapter}}}}},{gateway_config_app,start,[normal,[]]}}

Thanks so much!

Connect to unseen Wi-Fi network[s]

Patrons and enterprise users want to save Wi-Fi credentials (SSID and passphrase) onto a Helium Hotspot for connecting later. This simplifies some Helium Hotspot deployments because operators only need to apply power. I'm not convinced such a feature is the best way to address bulk onboarding of Helium Hotspots but that doesn't stop patrons and enterprises from asking for it.

Exception elli_http,get_headers when talking to miner over RPC

Hello,

I've got a setup with latest miner 2022.06.09.0 running inside docker with host network privileges (at least for testing purposes).

I'm running gateway_config natively on the host OS (currently Raspbian Lite arm64 but also tried Ubuntu Server for RPi arm64).

Everything seems to work well but when I try to turn on advertising my router isn't able to talk to the miner over RPC.

In /var/log/gateway_config/crash.log I see the following:

2022-06-19 23:11:10 =CRASH REPORT====
  crasher:
    initial call: http2_client:init/1
    pid: <0.684.0>
    registered_name: []
    exception exit: {{receiving_settings_frame,closed},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,401}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}
    ancestors: [gateway_config_miner,gateway_config_sup,<0.636.0>]
    message_queue_len: 0
    messages: []
    links: [<0.640.0>,#Port<0.75>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 376
    stack_size: 28
    reductions: 1059
  neighbours:

On the miner in /var/log/miner/crash.log I get the following:

2022-06-20 00:29:38 =CRASH REPORT====
  crasher:
    initial call: elli_http:accept/4
    pid: <0.1820.0>
    registered_name: []
    exception error: {function_clause,[{elli_http,get_headers,[{plain,#Port<0.2016>},{2,0},<<13,10,83,77,13,10,13,10,0,0,6,4,0,0,0,0,0,0,2,0,0,0,0>>,[{accept_timeout,10000},{request_timeout,60000},{header_timeout,10000},{body_timeout,30000},{max_body_size,1024000}],{miner_jsonrpc_handler,undefined}],[{file,"elli_http.erl"},{line,452}]},{elli_http,handle_request,4,[{file,"elli_http.erl"},{line,92}]},{elli_http,keepalive_loop,5,[{file,"elli_http.erl"},{line,71}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}
    ancestors: [<0.1810.0>,miner_restart_sup,miner_sup,<0.1605.0>]
    message_queue_len: 0
    messages: []
    links: [<0.1810.0>,#Port<0.2016>]
    dictionary: [{{time,request_start},-576458497515446293},{{time,accepted},-576458497515501144},{{time,headers_start},-576458497515437293}]
    trap_exit: false
    status: running
    heap_size: 1598
    stack_size: 28
    reductions: 16390
  neighbours:

In the console.log from gateway_config:

2022-06-20 01:28:38.493 [notice] <0.633.0>@gateway_config:diagnostics:298 Failed to get p2p status: {receiving_settings_frame,closed}
2022-06-20 01:28:38.494 [warning] <0.632.0>@gateway_config_miner:handle_info:100 unhandled info message {'EXIT',<0.666.0>,{receiving_settings_frame,closed}}
2022-06-20 01:29:08.613 [notice] <0.633.0>@gateway_config:diagnostics:298 Failed to get p2p status: {receiving_settings_frame,closed}
2022-06-20 01:29:08.613 [error] <0.667.0> CRASH REPORT Process <0.667.0> with 0 neighbours exited with reason: {receiving_settings_frame,closed} in gen_server:init_it/6 line 358
2022-06-20 01:29:08.613 [warning] <0.632.0>@gateway_config_miner:handle_info:100 unhandled info message {'EXIT',<0.667.0>,{receiving_settings_frame,closed}}
2022-06-20 01:29:38.732 [notice] <0.633.0>@gateway_config:diagnostics:298 Failed to get p2p status: {receiving_settings_frame,closed}
2022-06-20 01:29:38.733 [error] <0.668.0> CRASH REPORT Process <0.668.0> with 0 neighbours exited with reason: {receiving_settings_frame,closed} in gen_server:init_it/6 line 358
2022-06-20 01:29:38.733 [warning] <0.632.0>@gateway_config_miner:handle_info:100 unhandled info message {'EXIT',<0.668.0>,{receiving_settings_frame,closed}}

And the error.log from gateway_config:

2022-06-20 01:29:38.733 [error] <0.668.0> CRASH REPORT Process <0.668.0> with 0 neighbours exited with reason: {receiving_settings_frame,closed} in gen_server:init_it/6 line 358

I can see the Hotspot advertising over bluetooth but neither the maker app nor the helium app are able to communicate with it over bluetooth.

Any help would be greatly appreciated.

Miner not ready to get p2p status

Currently I'm getting the error <0.526.0>@gateway_config:diagnostics:225 Miner not ready to get p2p status in my logs.

I'm not sure why I'm getting this as from the best I can tell everything is running as it should?

Is there any suggestions on how to resolve this.

Thanks

Make Issue in gateway-config

Hi Sir,

While running make under gateway-config, I found ===> Compiling _build/default/plugins/gpb/src/gpb_compile.erl failed. No idea how to solve it. Pls give me some advices.

pi@raspberrypi:~/gateway-config $ make && make release

./rebar3 compile
===> Fetching rebar3_gpb_plugin v2.22.1
===> Fetching gpb v4.19.2
===> Analyzing applications...
===> Compiling gpb


===> Compiling _build/default/plugins/gpb/src/gpb_compile.erl failed
_build/default/plugins/gpb/src/gpb_compile.erl:105: can't find include lib "**eunit/include/eunit.hrl"; Make sure eunit is in your app file's 'applications' list

===> Errors loading plugin rebar3_gpb_plugin. Run rebar3 with DEBUG=1 set to see errors.
===> Analyzing applications...
===> Compiling gpb
===> Compiling _build/default/plugins/gpb/src/gpb_defs.erl failed
_build/default/plugins/gpb/src/gpb_defs.erl:45: can't find include lib "eunit/include/eunit.hrl"; Make sure eunit is in your app file's 'applications' list

_build/default/plugins/gpb/src/gpb_defs.erl:1675: Warning: function opt_name_4_to_3_test/0 is unused
_build/default/plugins/gpb/src/gpb_defs.erl:1684: Warning: function rpc_opt_name_43_test/0 is unused

===> Errors loading plugin rebar3_gpb_plugin. Run rebar3 with DEBUG=1 set to see errors.
===> Verifying dependencies...
===> Fetching clique (from {git,"https://github.com/helium/clique.git",
{ref,"e4be0dae150061bec080502ed530091672880867"}})
===> Fetching rebar_erl_vsn v0.2.2
===> Analyzing applications...
===> Compiling rebar_erl_vsn
===> Compiling _build/default/plugins/gpb/src/gpb_compile.erl failed
_build/default/plugins/gpb/src/gpb_compile.erl:105: can't find include lib "eunit/include/eunit.hrl"; Make sure eunit is in your app file's 'applications' list

===> Errors loading plugin {rebar_erl_vsn,"~>0.2.0"}. Run rebar3 with DEBUG=1 set to see errors.
===> Fetching connman (from {git,"https://github.com/helium/ebus-connman",
{ref,"0e41b522598bea885a9770fc538ca013c5c384b8"}})
===> Fetching erlang_ale (from {git,"https://github.com/helium/erlang_ale",
{ref,"07e10e656693f07a0d577f3651e76e52680c3768"}})
===> Fetching gatt (from {git,"https://github.com/helium/ebus-gatt",
{ref,"92732d7d7c153e46f4a7b9bde46c676b8d8476fd"}})
===> Fetching h3 (from {git,"https://github.com/helium/erlang-h3.git",
{ref,"7ff30d080817f1ed4c170afcfb8825902825b37c"}})
===> Failed to fetch and copy dep: {git,"https://github.com/helium/erlang-h3.git",
{ref,
"7ff30d080817f1ed4c170afcfb8825902825b37c"}}
make: *** [Makefile:16: compile] Error 1

gateway-config CAN NOT connect with miner after upgdrading from latest-arm64 to gateway-latest

Dear Madninja and Helium team,

Our hotspots worked very well before

However after upgrading from latest-arm64 to gateway-latest version. We can't make onboarding for new Hotpots

When we checked the gateway-config console log, it showed that

"

2023-05-18 22:05:42.596 [info] <0.547.0>@gateway_config:diagnostics:297 Miner not ready to get p2p status
2023-05-18 22:06:12.605 [info] <0.547.0>@gateway_config:diagnostics:297 Miner not ready to get p2p status
2023-05-18 22:06:42.613 [info] <0.547.0>@gateway_config:diagnostics:297 Miner not ready to get p2p status
2023-05-18 22:07:12.621 [info] <0.547.0>@gateway_config:diagnostics:297 Miner not ready to get p2p status
2023-05-18 22:07:42.629 [info] <0.547.0>@gateway_config:diagnostics:297 Miner not ready to get p2p status
2023-05-18 22:08:12.638 [info] <0.547.0>@gateway_config:diagnostics:297 Miner not ready to get p2p status
2023-05-18 22:08:42.647 [info] <0.547.0>@gateway_config:diagnostics:297 Miner not ready to get p2p status
2023-05-18 22:09:12.656 [info] <0.547.0>@gateway_config:diagnostics:297 Miner not ready to get p2p status
2023-05-18 22:09:42.661 [info] <0.547.0>@gateway_config:diagnostics:297 Miner not ready to get p2p status
2023-05-18 22:10:12.671 [info] <0.547.0>@gateway_config:diagnostics:297 Miner not ready to get p2p status

"

**miner version: ** docker exec miner helium_gateway -V : helium_gateway 1.0.2

Miner is log
"
pi@raspberrypi:~ $ docker logs miner
2023-05-18T20:14:36.275766Z INFO run: gateway_rs::server: starting server version=1.0.2 key=11fAQPSidG9FVcFgTbTyq8NH737wHbsYbdHYSchQHzQHTWRNjT3
2023-05-18T20:14:36.275846Z INFO run: gateway_rs::region_watcher: starting default_region=EU868
2023-05-18T20:14:36.275909Z INFO run: gateway_rs::beaconer: starting beacon_interval=21600
2023-05-18T20:14:36.275941Z INFO run: gateway_rs::gateway: starting listen="0.0.0.0:1680"
2023-05-18T20:14:36.275975Z INFO run:run: gateway_rs::packet_router: starting uri=http://mainnet-router.helium.io:8080/
2023-05-18T20:14:36.276014Z INFO run: gateway_rs::api::server: starting listen=127.0.0.1:4467
2023-05-18T20:14:41.276728Z INFO run:run: gateway_rs::packet_router: connecting
2023-05-18T20:14:41.490673Z INFO run: gateway_rs::gateway: new packet forwarder client mac=E4:5F:01:FF:FE:72:D8:63 addr=172.17.0.1:48127
2023-05-18T20:14:41.578229Z INFO run:run: gateway_rs::packet_router: connected
2023-05-18T20:14:41.578295Z INFO run:run: gateway_rs::packet_router: next connect seconds=1800
2023-05-18T20:14:44.572189Z INFO run: gateway_rs::region_watcher: fetched config region_params pubkey=137oJzq1qZpSbzHawaysTGGsRCYTXG1MiTMQNxYSsQJp4YMDdN8 uri=http://mainnet-config.helium.io:6080/ default_region=EU868 region=US915
2023-05-18T20:14:44.572423Z INFO run: gateway_rs::beaconer: region updated region="US915"
2023-05-18T20:14:44.572541Z INFO run: gateway_rs::gateway: region updated region="US915"
2023-05-18T20:23:01.489004Z INFO run: gateway_rs::gateway: received potential beacon downlink_mac=E4:5F:01:FF:FE:72:D8:63 uplink=@3624365516 us, 903900000 MHz, Sf9bw125, snr: -2.2, rssi: -117, len: 52
2023-05-18T20:23:01.791121Z INFO run: gateway_rs::beaconer: poc witness report submitted beacon="IAC+UdLX9lu2JkuvPz3oCP7F/wYs9j8B5izwaGvZnk5+eQzkCW4MI9JjU0RaasxLGzBt"
2023-05-18T20:32:00.727595Z INFO run: gateway_rs::beaconer: transmitting beacon beacon_id="jAL6L9wH8EWMiF1J0d6H/mu1LIYW5WeJ1xYaX461/mOYePh7AdhTQFmFDtgITkLs6xF7"
2023-05-18T20:32:00.731997Z INFO gateway_rs::gateway: beacon transmitted with adjusted power output beacon_id="jAL6L9wH8EWMiF1J0d6H/mu1LIYW5WeJ1xYaX461/mOYePh7AdhTQFmFDtgITkLs6xF7" actual_power=27 tmst=None
2023-05-18T20:32:01.019827Z INFO run: gateway_rs::beaconer: poc beacon report submitted beacon_id="jAL6L9wH8EWMiF1J0d6H/mu1LIYW5WeJ1xYaX461/mOYePh7AdhTQFmFDtgITkLs6xF7"
2023-05-18T20:32:01.140392Z INFO run: gateway_rs::gateway: received potential beacon downlink_mac=E4:5F:01:FF:FE:72:D8:63 uplink=@4164021912 us, 904700000 MHz, Sf9bw125, snr: 10.5, rssi: -24, len: 52
2023-05-18T20:32:01.455778Z INFO run: gateway_rs::beaconer: poc witness report submitted beacon="jAL6L9wH8EWMiF1J0d6H/mu1LIYW5WeJ1xYaX461/mOYePh7AdhTQFmFDtgITkLs6xF7"
2023-05-18T20:36:49.822246Z INFO run: gateway_rs::gateway: received potential beacon downlink_mac=E4:5F:01:FF:FE:72:D8:63 uplink=@157734211 us, 903900000 MHz, Sf9bw125, snr: -6.5, rssi: -124, len: 52
2023-05-18T20:36:50.121276Z INFO run: gateway_rs::beaconer: poc witness report submitted beacon="eGcJTY3IHsisJgukHfaePyE3VwDOY5/xjngiOJxhdbFBEFHvCleoP/lOgXxTmQ92OMa6"
2023-05-18T20:41:19.623573Z INFO run: gateway_rs::gateway: received potential beacon downlink_mac=E4:5F:01:FF:FE:72:D8:63 uplink=@427541489 us, 904500000 MHz, Sf9bw125, snr: -13, rssi: -130, len: 52
2023-05-18T20:41:19.916995Z INFO run: gateway_rs::beaconer: poc witness report submitted beacon="u5Sh2W5hjP9GMg6dA2YHKeNsZXI+ZaFxgbOjPZ8jFr8VdiOL1eOho6+ReW83OBAR46YI"
2023-05-18T20:44:33.794210Z INFO run: gateway_rs::gateway: received potential beacon downlink_mac=E4:5F:01:FF:FE:72:D8:63 uplink=@621712689 us, 904700000 MHz, Sf9bw125, snr: 5.5, rssi: -108, len: 52
2023-05-18T20:44:34.086282Z INFO run: gateway_rs::beaconer: poc witness report submitted beacon="xAwqWsU27nb/LjkxyI40O214cpG4JC3ecxAOOz1lFSfWlcUJe6p/fmhd3f0DfOcMIzhn"
2023-05-18T20:44:41.579324Z INFO run:run: gateway_rs::packet_router: connecting
2023-05-18T20:44:41.871552Z INFO run:run: gateway_rs::packet_router: connected
2023-05-18T20:44:41.871643Z INFO run:run: gateway_rs::packet_router: next connect seconds=1800
2023-05-18T20:44:46.141624Z INFO run: gateway_rs::gateway: received potential beacon downlink_mac=E4:5F:01:FF:FE:72:D8:63 uplink=@634058195 us, 904500000 MHz, Sf9bw125, snr: -11.2, rssi: -128, len: 52
2023-05-18T20:44:46.435140Z INFO run: gateway_rs::beaconer: poc witness report submitted beacon="i2QCmRu/dX+1QnnA9TE6hIU/8EAUBTFjYiwoqnfOy+uXaa3UK4ywhA384L/pdQOs9MBJ"
2023-05-18T20:46:54.561415Z INFO run: gateway_rs::gateway: received potential beacon downlink_mac=E4:5F:01:FF:FE:72:D8:63 uplink=@762471119 us, 905100000 MHz, Sf9bw125, snr: -8.8, rssi: -117, len: 52
2023-05-18T20:46:55.858290Z INFO run: gateway_rs::beaconer: poc witness report submitted beacon="ZiLVFqe75AVddTm7uD2e25ykgrDKmPcRmESKpZaEuJxsuesTM3kD3zM2slT1c1IzqNjG"
2023-05-18T20:49:55.409416Z INFO run: gateway_rs::gateway: received potential beacon downlink_mac=E4:5F:01:FF:FE:72:D8:63 uplink=@943323613 us, 905100000 MHz, Sf9bw125, snr: -9.2, rssi: -118, len: 52
2023-05-18T20:49:55.704558Z INFO run: gateway_rs::beaconer: poc witness report submitted beacon="XmhBKv0joXESAvY6yQ2Jf3R2YPUyarM4U6s/hKPz2InzaEF2Cs6cLmV0weI/zl7t4zSx"
2023-05-18T20:53:36.224859Z INFO run: gateway_rs::gateway: received potential beacon downlink_mac=E4:5F:01:FF:FE:72:D8:63 uplink=@1164138945 us, 904300000 MHz, Sf9bw125, snr: 3.2, rssi: -109, len: 52
2023-05-18T20:53:36.518063Z INFO run: gateway_rs::beaconer: poc witness report submitted beacon="Cj2aN3qWpsPnqV2P/Q2VUSxj7AeIPO+wSpKbv2NKUs7Cm0A51MWYdBC5LWHNz32tr9Fv"
2023-05-18T20:54:46.789044Z INFO run: gateway_rs::gateway: received potential beacon downlink_mac=E4:5F:01:FF:FE:72:D8:63 uplink=@1234700170 us, 903900000 MHz, Sf9bw125, snr: -1.5, rssi: -119, len: 52
2023-05-18T20:54:47.079752Z INFO run: gateway_rs::beaconer: poc witness report submitted beacon="mEHRB9KJBHfeaspEYVT4V8y4Vt4tvzmb2MIesYjOw3wy9v0PJelzNjK1UiD5cM0ZTbhy"
2023-05-18T20:59:18.863840Z INFO run: gateway_rs::gateway: received potential beacon downlink_mac=E4:5F:01:FF:FE:72:D8:63 uplink=@1506776337 us, 904100000 MHz, Sf9bw125, snr: 0, rssi: -117, len: 52
2023-05-18T20:59:19.201886Z INFO run: gateway_rs::beaconer: poc witness report submitted beacon="gbNDRg7LF9rgWekWmZxnbqjZTTokED4UFEZyhlicZXMhj3WG58ny+WnXXPDyLCPK5yeo"

"

gateway_config_miner:handle_info:109 unhandled info message {'EXIT',<0.809.0>,normal

Dear madninja,

I'm having this issue, already worked a long time but can't solve it

*) I'm using the newest gateway-config and newest gatewayrs
I'm able to read the onboarding key from gateway-config

However, the console log file always shows
"

2023-06-28 03:42:43.313 [info] <0.650.0>@gateway_gatt_char_wifi_ssid:maybe_unregister_state_notify:144 WiFi still disconnected
2023-06-28 03:42:43.315 [warning] <0.650.0>@gateway_gatt_char_wifi_ssid:maybe_register_state_notify:136 early WiFi online event
2023-06-28 03:42:53.557 [info] <0.641.0>@gateway_config_worker:handle_info:131 Enabling advertising
2023-06-28 03:42:55.567 [info] <0.667.0>@ble_advertisement:handle_info:99 Started advertisement gateway_ble_advertisement
2023-06-28 03:42:55.568 [info] <0.644.0>@gateway_config_led:led_set_color:239 Would have set LED: {0,0,255}
2023-06-28 03:43:13.300 [warning] <0.643.0>@gateway_config_miner:handle_info:109 unhandled info message {'EXIT',<0.673.0>,normal}
2023-06-28 03:43:13.301 [info] <0.644.0>@gateway_config_led:led_set_color:239 Would have set LED: {0,255,0}
2023-06-28 03:43:43.309 [warning] <0.643.0>@gateway_config_miner:handle_info:109 unhandled info message {'EXIT',<0.675.0>,normal}
2023-06-28 03:44:13.316 [warning] <0.643.0>@gateway_config_miner:handle_info:109 unhandled info message {'EXIT',<0.676.0>,normal}
2023-06-28 03:44:43.326 [warning] <0.643.0>@gateway_config_miner:handle_info:109 unhandled info message {'EXIT',<0.677.0>,normal}
2023-06-28 03:45:13.374 [warning] <0.643.0>@gateway_config_miner:handle_info:109 unhandled info message {'EXIT',<0.678.0>,normal}
2023-06-28 03:45:43.382 [warning] <0.643.0>@gateway_config_miner:handle_info:109 unhandled info message {'EXIT',<0.679.0>,normal}
2023-06-28 03:46:13.389 [warning] <0.643.0>@gateway_config_miner:handle_info:109 unhandled info message {'EXIT',<0.680.0>,normal}
2023-06-28 03:46:43.438 [warning] <0.643.0>@gateway_config_miner:handle_info:109 unhandled info message {'EXIT',<0.681.0>,normal}
2023-06-28 03:47:13.445 [warning] <0.643.0>@gateway_config_miner:handle_info:109 unhandled info message {'EXIT',<0.682.0>,normal}
2023-06-28 03:47:43.454 [warning] <0.643.0>@gateway_config_miner:handle_info:109 unhandled info message {'EXIT',<0.683.0>,normal}
"

Looking forward to see your response soon,

Thanks

Forget WiFi network asks for password again

When clicking to "forget" a WiFi network in the app, it then takes you to a screen where it asks you to enter the WiFi password for the same network again.

If you click "back" in the app at this point it actually has forgotten the WiFi network and isn't connected.

But if you continue to put the password in it actually reconnects to the same network.

Guess there is a bug somewhere

(Tested using OG and RAK hotspots)

{failed_to_start_child,gateway_config_worker,{'EXIT',{{badmatch,{error,no_access}},[{gateway_config

=====
===== LOGGING STARTED Tue Dec  7 10:54:41 GMT 2021
=====
Exec: /usr/lib/erlang/erts-11.1.8/bin/erlexec -boot /home/pi/gateway-config/_build/prod/rel/gateway_config/releases/0.1.0/start -mode embedded -boot_var SYSTEM_LIB_DIR /usr/lib/erlang/lib -config /home/pi/gateway-config/_build/prod/rel/gateway_config/releases/0.1.0/sys.config -args_file /home/pi/gateway-config/_build/prod/rel/gateway_config/releases/0.1.0/vm.args -- console  --relx-disable-hooks
Root: /home/pi/gateway-config/_build/prod/rel/gateway_config
/home/pi/gateway-config/_build/prod/rel/gateway_config
Erlang/OTP 23 [erts-11.1.8] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1]

{"Kernel pid terminated",application_controller,"{application_start_failure,gateway_config,{{shutdown,{failed_to_start_child,gateway_config_worker,{'EXIT',{{badmatch,{error,no_access}},[{gateway_config_worker,start_link,1,[{file,\"/home/pi/gateway-config/src/gateway_config_worker.erl\"},{line,53}]},{supervisor,do_start_child_i,3,[{file,\"supervisor.erl\"},{line,385}]},{supervisor,do_start_child,2,[{file,\"supervisor.erl\"},{line,371}]},{supervisor,'-start_children/2-fun-0-',3,[{file,\"supervisor.erl\"},{line,355}]},{supervisor,children_map,4,[{file,\"supervisor.erl\"},{line,1171}]},{supervisor,init_children,2,[{file,\"supervisor.erl\"},{line,321}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,417}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,385}]}]}}}},{gateway_config_app,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,gateway_config,{{shutdown,{failed_to_start_child,gateway_config_worker,{'EXIT',{{badmatch,{error,no_access}},[{gateway_config

Crash dump is being written to: erl_crash.dump...done

advertise on not woking anymore

After upgrading rebar the gateway_config commands aren't working..

/home/pi/gateway_config/_build/prod/rel/gateway_config/bin/gateway_config start
 

the commando used to work but now I get an error to use "daemon" instead

Now the following command:

/home/pi/gateway_config/_build/prod/rel/gateway_config/bin/gateway_config advertise on

gives me:

Error: args `advertiseon` not a list.
Example to call `foo:bar(1,2,3)` pass `foo bar "[1, 2, 3]."`

(FYI I really typed advertise on and not advertiseon)

I wasn't able to figure out what the right command is to turn on advertisement over bluetooth. I did see a new commit 2 hours ago, I wasn't able to extract how to run the command from the source code unfortunately.

Documentation on shell usage ./rebar3 shell

Hi!

After I run ./rebar3 shell am not sure what commands I can use.. how can I turn on the gateway and turn on bluetooth advertisement? I want to try out the shell and do something similar like this:

sudo _build/prod/rel/gateway_config/bin/gateway_config start
_build/prod/rel/gateway_config/bin/gateway_config advertise on

grpc comple error

i compile this package at ubuntu20.04 it report error when compile grpc

"make" grpc
make[1]: Entering directory '/root/gateway-config'
generating gateway_config grpc services
REBAR_CONFIG="config/grpc_client_gen_local.config" ./rebar3 grpc gen
===> Evaluating config script "/root/gateway-config/_build/default/plugins/gpb/rebar.config.script"
===> Setting paths to [deps]
===> Compile (apps)
===> Setting paths to [plugins]
===> Setting paths to [deps]
===> Setting paths to [plugins]
===> Setting paths to [plugins]
===> Expanded command sequence to be run: []
===> Running provider: do
===> Expanded command sequence to be run: [app_discovery,{grpc,gen}]
===> Running provider: app_discovery
===> Found top-level apps: [gateway_config]
using config: [{src_dirs,["src"]},{lib_dirs,["apps/","lib/","."]}]
===> Evaluating config script "/root/gateway-config/_build/default/lib/lager/rebar.config.script"
===> Evaluating config script "/root/gateway-config/_build/default/plugins/gpb/rebar.config.script"
===> Setting paths to [deps]
===> Compile (apps)
===> Setting paths to [plugins]
===> Setting paths to [deps]
===> Setting paths to [plugins]
===> Setting paths to [plugins]
===> Not adding provider grpc gen from module grpcbox_plugin_prv because it already exists from module grpcbox_plugin_prv
===> Running provider: {grpc,gen}
===> Writing /root/gateway-config/src/grpc/autogen/client/gateway_local_client_pb.erl
===> Uncaught error in rebar_core. Run with DIAGNOSTIC=1 to see stacktrace or consult rebar3.crashdump
===> Uncaught error: undef
===> Stack trace to the error location:
[{gpb_compile,file,
["/root/gateway-config/_build/default/lib/helium_proto/src/service/local.proto",
[{rename,{msg_fqname,base_name}},
use_packages,
{defs_as_proplists,false},
{report_errors,false},
{descriptor,false},
{recursive,false},
{i,"build/default/lib/helium_proto/src"},
{o,"src/grpc/autogen/client"},
{module_name_prefix,"gateway
"},
{module_name_suffix,"_client_pb"},
{rename,{msg_name,{suffix,"_pb"}}},
{strings_as_binaries,false},
type_specs,maps]],
[]},
{grpcbox_plugin_prv,compile_pb,5,
[{file,"/root/gateway-config/_build/default/plugins/grpcbox_plugin/src/grpcbox_plugin_prv.erl"},
{line,141}]},
{grpcbox_plugin_prv,'-handle_app/3-lc$^2/1-2-',5,
[{file,"/root/gateway-config/_build/default/plugins/grpcbox_plugin/src/grpcbox_plugin_prv.erl"},
{line,102}]},
{grpcbox_plugin_prv,handle_app,3,
[{file,"/root/gateway-config/_build/default/plugins/grpcbox_plugin/src/grpcbox_plugin_prv.erl"},
{line,102}]},
{lists,foreach,2,[{file,"lists.erl"},{line,1338}]},
{grpcbox_plugin_prv,do,1,
[{file,"/root/gateway-config/_build/default/plugins/grpcbox_plugin/src/grpcbox_plugin_prv.erl"},
{line,40}]},
{rebar_core,do,2,
[{file,"/Users/evan/src/rebar3/src/rebar_core.erl"},{line,155}]},
{rebar_prv_do,do_task,5,
[{file,"/Users/evan/src/rebar3/src/rebar_prv_do.erl"},
{line,87}]}]
===> When submitting a bug report, please include the output of rebar3 report "your command"
make[1]: *** [Makefile:46: grpc] Error 1
make[1]: Leaving directory '/root/gateway-config'
make: *** [Makefile:19: compile] Error 2

Install Issues

Hi im new here and i am having this issue right at the start:

pi@raspberrypi:~ $ git clone https://github.com/helium/gateway-config.git
Cloning into 'gateway-config'...
remote: Enumerating objects: 1224, done.
remote: Counting objects: 100% (173/173), done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 1224 (delta 148), reused 156 (delta 137), pack-reused 1051
Receiving objects: 100% (1224/1224), 1.78 MiB | 3.58 MiB/s, done.
Resolving deltas: 100% (887/887), done.
pi@raspberrypi:~ $ cd gateway-config
pi@raspberrypi:~/gateway-config $ make && make release
./rebar3 compile
/usr/bin/env: ‘escript’: No such file or directory
make: *** [Makefile:16: compile] Error 127

Anyone came across this ?

gateway_config_miner: unhandled info message

Unknown reason to receive continuous 'EXIT' message from unknown source

2022-04-17 08:15:18.082 [warning] <0.722.0>@gateway_config_miner:handle_info:100 unhandled info message {'EXIT',<0.813.0>,normal}                             
2022-04-17 08:15:48.466 [warning] <0.722.0>@gateway_config_miner:handle_info:100 unhandled info message {'EXIT',<0.816.0>,normal}                             
2022-04-17 08:16:18.867 [warning] <0.722.0>@gateway_config_miner:handle_info:100 unhandled info message {'EXIT',<0.818.0>,normal}                             
2022-04-17 08:16:49.265 [warning] <0.722.0>@gateway_config_miner:handle_info:100 unhandled info message {'EXIT',<0.819.0>,normal}                             
2022-04-17 08:17:19.663 [warning] <0.722.0>@gateway_config_miner:handle_info:100 unhandled info message {'EXIT',<0.820.0>,normal} 
2022-04-17 08:17:50.047 [warning] <0.722.0>@gateway_config_miner:handle_info:100 unhandled info message {'EXIT',<0.821.0>,normal} 
2022-04-17 08:18:20.444 [warning] <0.722.0>@gateway_config_miner:handle_info:100 unhandled info message {'EXIT',<0.823.0>,normal}

Hotspot miner is waiting to start. Please try again in a few minutes.

After the Hotspot can be accessed successfully over Bluetooth from within the Hotspot app, the location can't be asserted and therefore the hotspot can't be onboarded. This is the error we see in the Hotspot App: https://imgur.com/a/nou1tha - we tried again after 24 hours, same result.

Unfortunately, we still don't know what's causing this, and we assume it must be something from gateway-config. The hotspot itself shows no errors whatsoever when executing docker exec miner miner info summary or when checking the error.log (last entry was something unrelated from 4 hours ago).

Do you have any idea how we could debug this issue? And is this some problem from the app itself, or from gateway-config?

EDIT: Tested on one more not-yet-onboarded hotspot. Same issue.

Diagnostics displaying wrong hotspot name after card swap

I have a couple hotspots on and that I keep running (unasserted) to keep the cards synced and up to date. When a field installed hotspot dies, for whatever reason, I've been swapping cards to get them back online rather than wait to resync 10k blocks. With the most recent firmware at latest 2022.01.24. When you swap the cards and run diagnostics on the hotspot, the diagnostics will now show the name of the hotspot and the address from the hotspot the card came from, not the information from the hotspot the card was in. I swapped 2 units, and all 4 had the name/ address swap in diagnostics. Hard closing the app doesn't seem to resolve. I've got the cards from the deployed units back in the donor units. Will update if I see the name/address resolve on those donor units. At least one of the deployed units is earning again, other may still have internet issues)

Feature Request: Download swarm_key to backup RAK hotspots with the app

It would be great if there was functionality built in to download the swarm key. Currently the only way to back up the swarm_key of the RAK hotspots is to create an image of the SD card. It would be way more user friendly if this had the ability to backup over bluetooth with the app.

Miner not ready to get P2P Status

Log throws the following error:

@config:diagnostics:225 Miner not ready to get p2p status

So we are having a similar Issue as #70 but the solutions mentioned there didn't work.
When we do...
dbus-send --system --print-reply --dest=com.helium.Miner / com.helium.Miner.P2PStatus
it outputs...
Error org.freedesktop.DBus.Error.ServiceUnknown: The name com.helium.Miner was not provided by any .service files

What could be the reason here? It seems that some .service file is missing, but we are quite unsure what the contents of this service file should be. Do you have an example of the service that needs to be applied?

Solutions we have tried so far:

  • Checked if we added the com.helium.Miner.conf to /etc/dbus-1/system.d/. We have.
  • Checked if the use_ebus variable in our docker.config is set to true. It is.
  • Checked if container has proper access to dbus. It has (probably):

docker run -d --init \ --ulimit nofile=524288:524288 \ --restart always \ --publish 1680:1680/udp \ --publish 44158:44158/tcp \ --name miner \ --mount type=bind,source=/home/pi/miner_data,target=/var/data \ --device /dev/i2c-1 \ --net host \ --privileged \ -v /var/run/dbus:/var/run/dbus \ --env DBUS_SYSTEM_BUS_ADDRESS=unix:path=/var/run/dbus/system_bus_socket \ --mount type=bind,source=/home/pi/docker_config/docker.config,target=/opt/miner/releases/0.1.0/sys.config \ quay.io/team-helium/miner:latest-arm64

[Question] Why Connman over NetworkManager?

Hi,

We're working on implementing this software as part of our gateway manufacturer application, however I'm at a point where I'm stuck getting it working inside a docker container.

One of the sticking points is using Connman when the host in our case uses NetworkManager. It might be where I have to fork it and re-write it to use network manager however after seeing the work put into making a connman library for erlang I suspect there's a reason why Connman was chosen instead?

So really it's just a question of, is there a specific reason connman was chosen over using Network Manager that would prevent us from forking it and migrating to that?

Thanks for the help.

Failed to boot gateway_config

I know this wasn't built for the DIYs but I would like to have an option for configuring the DIY hotspots over bluetooth.

` sudo ./rebar3 shell
===> Verifying dependencies...
===> Compiling gateway_config
Erlang/OTP 21 [erts-10.2.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1]

Eshell V10.2.4 (abort with ^G)
1> ===> The rebar3 shell is a development tool; to deploy applications in production, consider using releases (http://www.rebar3.org/docs/releases)
===> Booted syntax_tools
===> Booted compiler
===> Booted goldrush
===> Booted lager
===> Booted ebus
===> Failed to boot gateway_config for reason {{shutdown,
{failed_to_start_child,
gateway_gatt_application,
{shutdown,
{failed_to_start_child,
application,
{error,
no_adapter}}}}},
{gateway_config_app,
start,
[normal,[]]}}
`

After compiling I am getting this error when running the dev shell. Any help would be appreciated.

gateway-config can not start

Hi,
I build the lastest gatewa-config, but it can not running.
image
image

Since helium migrated to solana, We can't onboarding new hotspots. Is it nessasary upgrade gateway-config for gateway-v1.0.2 with docker ?
Could you give me some help? thanks!

And if the new hotspots can be onboarded through helium-wallat-cli with the TRANSACTION genterated by " docker exec miner helium_gateway add --owner XXXX --payer maker-address --mode full "?

advertise on fails

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?

About gateway-config for Light-Hotspot onboarding

Hi, I use the latest commit in master branch (SHA-1: 17fefff)
to build the new gateway-config, but some warning as below,
image

Do I need some settings to fix this warning?
After that, I used this gateway-config and could find BLE advertising.

By the way, one question here, does this latest gateway-config is used as a Light-Hotspot
on boarding flow with BLE by IOS/Android APP?

If yes, which version(tag) of gateway-config you recommended to use?
Thank you so much.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.