M5StackSats icon indicating copy to clipboard operation
M5StackSats copied to clipboard

Room77: Notice about missing WLAN

Open rootzoll opened this issue 5 years ago • 3 comments

If the WLAN connection (or connection to RaspiBlitz) is not working, the device should let the user now. At the moment it just produces wrong QR code, etc.

rootzoll avatar Sep 06 '19 15:09 rootzoll

Added a nodedetails function which could run on startup, could be used to return details of the node for a moment + check to see if its connected

arcbtc avatar Sep 19 '19 09:09 arcbtc

To harness the deserialised json the function returns:

const char* identity_pubkey = doc["identity_pubkey"]; // "03d34c207eecb9045228c9f835d7a2ed950f2ba03a4f173ed6fd3a895cf00de201" const char* alias = doc["alias"]; // "room77" int num_active_channels = doc["num_active_channels"]; // 29 int num_peers = doc["num_peers"]; // 30 long block_height = doc["block_height"]; // 595590 const char* block_hash = doc["block_hash"]; // "00000000000000000015724ba600a02a418c1f97a6e542660d43ef5268053560" bool synced_to_chain = doc["synced_to_chain"]; // true

const char* uris_0 = doc["uris"][0]; // "03d34c207eecb9045228c9f835d7a2ed950f2ba03a4f173ed6fd3a895cf00de201@87.230.93.71:9777"

const char* best_header_timestamp = doc["best_header_timestamp"]; // "1568885210" const char* version = doc["version"]; // "0.7.0-beta commit=v0.7.0-beta" int num_inactive_channels = doc["num_inactive_channels"]; // 3

const char* chains_0_chain = doc["chains"][0]["chain"]; // "bitcoin" const char* chains_0_network = doc["chains"][0]["network"]; // "mainnet"

const char* color = doc["color"]; // "#68f442"

arcbtc avatar Sep 19 '19 09:09 arcbtc

One time when trying to scan the QR it kept showing Error Invalid Invoice in my mobile app. The QR looked a bit funny with zig-zig patterns. Perhaps that was this. Would be much better to show a large icon with No Wi-Fi Connection text

LilChange avatar Nov 10 '19 10:11 LilChange