Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

While device is in NB state, app should say "battery saver mode" and it should properly queue outbound packets #4

Closed
claesg opened this issue Mar 8, 2020 · 10 comments
Labels
enhancement New feature or request
Milestone

Comments

@claesg
Copy link

claesg commented Mar 8, 2020

Just leaving the phone connected to the t-beam results in it loosing connection.

The app is ver 0.1.2
board is running 0.1.0

Close to the end of the logfile there is

03-08 16:12:57.329 4236 4236 W com.geeksville.mesh.service.MeshService: Abandoning reconnect attempt, due to errors during init: Bluetooth status=1 while doing readC ea9f3f82-8dc4-4733-9452-1f6da28892a2

logcat logfile is attached.

2020-03-08_16:04:21.txt

@geeksville
Copy link
Member

geeksville commented Mar 8, 2020

@claesg OOH that's a super useful log and I can probably fix this in the next day or two. Also, I can have it show some indication of this problem in the GUI so we can see if my fix works without having to break out logcat.

A few follow up questions first that would help:

  1. What board model?
  2. Was the board powered by USB only or did it also have a battery? (I'm trying to rule out the bluetooth coprocessor browning-out on startup - a problem I had on a previous ESP32 project)
  3. What was the sequence of operations? i.e. board was powered (and running - oled on) and then app was launched or vs versa?
  4. Or based on your initial sentence: Was the loss of bluetooth due to the board going to sleep after it woke up. Line 3 here: https://github.com/meshtastic/Meshtastic-esp32/blob/master/docs/software/power.md#events-that-decrease-cpu-activity (though even in this case, the app is always supposed to reconnect when the device wakes periodically)
  5. When this happens is it possible for you to capture the serial output from the device? You can do this with "pio device monitor -b 115200"

Thanks so much with helping on this - it is tricky to catch these problems from far away ;-)

@geeksville
Copy link
Member

note to self: turn on brown-out detector on ESP32

@claesg
Copy link
Author

claesg commented Mar 8, 2020

  1. It is a TTGO T-BEAM V1.0 https://www.banggood.com/LILYGO-TTGO-T-Beam-ESP32-433868915923Mhz-WiFi-Wireless-bluetooth-Module-GPS-NEO-6M-SMA-LORA32-18650-Battery-Holder-With-OLED-p-1545070.html?ID=510804&cur_warehouse=UK
  2. Battery mounted and powered by usb
  3. Just started board and app. Let them connect and leave for 10-15 minutes. Phone turns screen off and locks after 5 minutes and board turns off oled.
  4. It could be that the board goes to sleep after 15 minutes. The users-tab said not connected.
  5. No problem. I'll try to recreate and get some more logs.

@geeksville
Copy link
Member

geeksville commented Mar 8, 2020 via email

@claesg
Copy link
Author

claesg commented Mar 8, 2020

Yes, I think you are right. It is expected behaviour. I need to read up on how it is supposed to work.
Looking forward to see the improvements of the gui.

@geeksville geeksville assigned geeksville and unassigned claesg Mar 8, 2020
@geeksville geeksville changed the title Abandoning reconnect attempt While device is in NB state, app should say "battery saver mode" rather than "no connection" Mar 8, 2020
@geeksville
Copy link
Member

geeksville commented Mar 8, 2020

repurposing this bug for the GUI fixes. work items:

  • allow queuing texts while device is in NB state
  • don't tell user we are "not connected"
  • have device wake every couple of minutes and stay alive a very brief time to see if the phone wants us to wake more fully.
  • when phone reconnects to device, don't download the full node db, only get new changes (by writing time of last update into the readpointer, rather than just writing an empty packet)

@geeksville geeksville added the enhancement New feature or request label Mar 8, 2020
@geeksville geeksville added this to the Before1.0 milestone Mar 8, 2020
@geeksville geeksville removed their assignment Mar 8, 2020
@geeksville geeksville changed the title While device is in NB state, app should say "battery saver mode" rather than "no connection" While device is in NB state, app should say "battery saver mode" and it should properly queue outbound packets Mar 13, 2020
@spattinson
Copy link

I am not sure if my issue is similar or not, I am getting Error: Not connected to radio OR Error: No mesh service. I have collected adb and monitor logs from both nodes. I complete pairing, but I am not sure if its successful. The node logs span a longer time frame. I provide them in case they are any use. I also did the steps suggested for analytics there should be something there too, Xiaomi Mi Mix 2s. Thanks!
logs.zip

@geeksville
Copy link
Member

This issue has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/pairing-issue-pixel-3a/49/9

@geeksville
Copy link
Member

This issue has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/android-app-new-releases/78/1

@geeksville
Copy link
Member

This issue has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/android-disconnects/83/2

geeksville added a commit to geeksville/Meshtastic-Android that referenced this issue Apr 4, 2020
geeksville added a commit to geeksville/Meshtastic-Android that referenced this issue Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants