meshtastic-firmware/TODO.md

127 wiersze
9.3 KiB
Markdown
Czysty Zwykły widok Historia

2020-02-01 17:46:25 +00:00
# High priority
* have node info screen show real info (including time since last contact, distance and heading)
* make debug info screen show real data (including battery level & charging)
* make real implementation of getNumOnlineNodes
* very occasionally send our position and user packet based on the schedule in the radio info (if for nothing else so that other nodes update last_seen)
* show real text info on the text screen
* retest BLE software update for both board types
* turn on screen when a new update arrives
2020-02-01 17:46:25 +00:00
# Medium priority
2020-02-11 19:03:03 +00:00
* show radio and gps signal strength as an image
2020-02-10 16:08:00 +00:00
* apply radio settings from android land
* only BLE advertise for a short time after the screen is on and button pressed - to save power and prevent people for sniffing for our BT app.
* use https://platformio.org/lib/show/1260/OneButton
2020-02-08 01:48:12 +00:00
* make an about to sleep screen
* make a no bluetooth configured yet screen
2020-02-05 05:24:11 +00:00
* don't send location packets if we haven't moved
2020-02-01 19:25:07 +00:00
* scrub default radio config settings for bandwidth/range/speed
* add basic crypto - http://rweather.github.io/arduinolibs/crypto.html with speck https://www.airspayce.com/mikem/arduino/RadioHead/rf95_encrypted_client_8pde-example.html
2020-02-01 19:25:07 +00:00
* override peekAtMessage so we can see any messages that pass through our node (even if not broadcast)? would that be useful?
2020-02-02 00:05:12 +00:00
* sendToMesh can currently block for a long time, instead have it just queue a packet for a radio freertos thread
2020-02-03 19:15:17 +00:00
* How do avalanche beacons work? Could this do that as well? possibly by using beacon mode feature of the RF95?
2020-02-04 01:13:41 +00:00
* use std::map<BLECharacteristic*, std::string> in node db
* first alpha release, article writeup
2020-02-07 21:51:17 +00:00
* send pr https://github.com/ThingPulse/esp8266-oled-ssd1306 to tell them about this project
2020-02-01 19:25:07 +00:00
2020-02-06 15:39:21 +00:00
# Low power consumption tasks
* platformio sdkconfig CONFIG_PM and turn on modem sleep mode
* keep cpu 100% in deepsleep until irq from radio wakes it. Then stay awake for 30 secs to attempt delivery to phone.
2020-02-08 01:48:12 +00:00
* have radiohead ISR send messages to RX queue directly, to allow that thread to block until we have something to send
2020-02-12 00:04:25 +00:00
* use https://lastminuteengineers.com/esp32-sleep-modes-power-consumption/ association sleep pattern to save power - but see https://github.com/espressif/esp-idf/issues/2070 and https://esp32.com/viewtopic.php?f=13&t=12182 it seems with BLE on the 'easy' draw people are getting is 80mA
2020-02-06 15:39:21 +00:00
* stop using loop() instead use a job queue and let cpu sleep
* move lora rx/tx to own thread and block on IO
* measure power consumption and calculate battery life assuming no deep sleep
* do lowest sleep level possible where BT still works during normal sleeping, make sure cpu stays in that mode unless lora rx packet happens, bt rx packet happens or button press happens
* optionally do lora messaging only during special scheduled intervals (unless nodes are told to go to low latency mode), then deep sleep except during those intervals - before implementing calculate what battery life would be with this feature
2020-02-07 05:47:22 +00:00
* see section 7.3 of https://cdn.sparkfun.com/assets/learn_tutorials/8/0/4/RFM95_96_97_98W.pdf and have hope radio wake only when a valid packet is received. Possibly even wake the ESP32 from deep sleep via GPIO.
* never enter deep sleep while connected to USB power (but still go to other low power modes)
* when main cpu is idle (in loop), turn cpu clock rate down and/or activate special sleep modes. We want almost everything shutdown until it gets an interrupt.
2020-02-06 15:39:21 +00:00
2020-02-06 18:58:19 +00:00
2020-02-01 19:25:07 +00:00
# Pre-beta priority
* make a screen for bluetooth not yet configured
* swap out speck for accelerated full AES https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/include/esp32/hwcrypto/aes.h
2020-02-06 18:58:19 +00:00
* cope with nodes that have 0xff or 0x00 as the last byte of their mac
2020-02-06 15:39:21 +00:00
* use variable length arduino Strings in protobufs (instead of current fixed buffers)
2020-02-02 16:17:45 +00:00
* don't even power on bluetooth until we have some data to send to the android phone. Most of the time we should be sleeping in a lowpower "listening for lora" only mode. Once we have some packets for the phone, then power on bluetooth
until the phone pulls those packets. Ever so often power on bluetooth just so we can see if the phone wants to send some packets. Possibly might need ULP processor to help with this wake process.
2020-02-02 02:45:27 +00:00
* do hibernation mode to get power draw down to 2.5uA https://lastminuteengineers.com/esp32-sleep-modes-power-consumption/
2020-02-01 19:25:07 +00:00
* make sure main cpu is not woken for packets with bad crc or not addressed to this node - do that in the radio hw
* enable fast init inside the gps chip
* triple check fcc compliance
* allow setting full radio params from android
2020-02-02 16:17:45 +00:00
* pick channel center frequency based on name? "dolphin" would hash to 900Mhz, "cat" to 905MHz etc? Or is that too opaque?
* scan to find channels with low background noise?
* share channel settings over Signal (or qr code) by embedding an an URL which is handled by the MeshUtil app.
2020-02-01 17:46:25 +00:00
2020-02-02 00:05:12 +00:00
# Low priority
* the AXP debug output says it is trying to charge at 700mA, but the max I've seen is 180mA, so AXP registers probably need to be set to tell them the circuit can only provide 300mAish max. So that the low charge rate kicks in faster and we don't wear out batteries.
* increase the max charging rate a bit for 18650s, currently it limits to 180mA (at 4V). Work backwards from the 500mA USB limit (at 5V) and let the AXP charge at that rate.
2020-02-10 16:08:00 +00:00
* add receive timestamps to messages, inserted by esp32 when message is received but then shown on the phone
2020-02-09 00:18:02 +00:00
* if radio params change fundamentally, discard the nodedb
* discard very old nodedb records (> 1wk)
* using the genpartitions based table doesn't work on TTGO so for now I stay with my old memory map
* We let anyone scan for us (FIXME, perhaps only allow that until we are paired with a phone and configured)
2020-02-07 05:47:22 +00:00
* use two different env flags for ttgo vs lora32. https://docs.platformio.org/en/latest/ide/vscode.html#key-bindings
* sim gps data for testing nodes that don't have hardware
* have android provide position data for nodes that don't have gps
* do debug serial logging to android over bluetooth
* break out my bluetooth OTA software as a seperate library so others can use it
* Heltec LoRa32 has 8MB flash, use a bigger partition table if needed - TTGO is 4MB but has PSRAM
* add a watchdog timer
2020-02-06 16:18:20 +00:00
* fix GPS.zeroOffset calculation it is wrong
* handle millis() rollover in GPS.getTime - otherwise we will break after 50 days
2020-02-02 21:37:02 +00:00
* reneable the bluetooth battely level service on the T-BEAM, because we can read battery level there
2020-02-02 00:05:12 +00:00
* report esp32 device code bugs back to the mothership via android
2020-02-01 17:46:25 +00:00
# Done
* change the partition table to take advantage of the 4MB flash on the wroom: http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables
2020-02-01 19:25:07 +00:00
* wrap in nice MeshRadio class
* add mesh send & rx
2020-02-03 03:08:04 +00:00
* make message send from android go to service, then to mesh radio
* make message receive from radio go through to android
2020-02-03 03:20:01 +00:00
* test loopback tx/rx path code without using radio
* notify phone when rx packets arrive, currently the phone polls at startup only
* figure out if we can use PA_BOOST - yes, it seems to be on both boards
* implement new ble characteristics
2020-02-05 05:24:11 +00:00
* have MeshService keep a node DB by sniffing user messages
* have a state machine return the correct FromRadio packet to the phone, it isn't always going to be a MeshPacket. Do a notify on fromnum to force the radio to read our state machine generated packets
2020-02-06 18:58:19 +00:00
* send my_node_num when phone sends WantsNodes
* have meshservice periodically send location data on mesh (if device has a GPS)
* implement getCurrentTime() - set based off gps but then updated locally
* make default owner record have valid usernames
2020-02-07 05:26:40 +00:00
* message loop between node 0x28 and 0x7c
2020-02-07 05:47:22 +00:00
* check in my radiolib fixes
* figure out what is busted with rx
* send our owner info at boot, reply if we see anyone send theirs
* add manager layers
* confirm second device receives that gps message and updates device db
* send correct hw vendor in the bluetooth info - needed so the android app can update different radio models
* correctly map nodeids to nodenums, currently we just do a proof of concept by always doing a broadcast
* add interrupt detach/sleep mode config to lora radio so we can enable deepsleep without panicing
* make jtag work on second board
2020-02-07 22:52:45 +00:00
* implement regen owner and radio prefs
2020-02-08 01:48:12 +00:00
* use a better font
* make nice screens (boot, about to sleep, debug info (gps signal, #people), latest text, person info - one frame per person on network)
* turn framerate from ui->state.frameState to 1 fps (or less) unless in transition
* switch to my gui layout manager
* make basic gui. different screens: debug, one page for each user in the user db, last received text message
* make button press cycle between screens
* save our node db on entry to sleep
2020-02-08 17:39:26 +00:00
* fix the logo
* sent/received packets (especially if a node was just reset) have variant of zero sometimes - I think there is a bug (race-condtion?) in the radio send/rx path.
2020-02-10 16:08:00 +00:00
* DONE dynamic nodenum assignment tasks
* make jtag debugger id stable: https://askubuntu.com/questions/49910/how-to-distinguish-between-identical-usb-to-serial-adapters
2020-02-11 00:44:43 +00:00
* reported altitude is crap
* good tips on which bands might be more free https://github.com/TheThingsNetwork/ttn/issues/119
* finish power measurements (GPS on during sleep vs LCD on during sleep vs LORA on during sleep) and est battery life
* make screen sleep behavior work
* make screen advance only when a new node update arrives, a new text arrives or the user presses a button, turn off screen after a while