paulmandal / atak-forwarder

Forwards packets to/from ATAK over an off-grid communication layer
MIT License
404 stars 42 forks source link

“Set Comm Device” no effect until ATAK restart? #66

Closed a-f-G-U-C closed 4 years ago

a-f-G-U-C commented 4 years ago

After upgrading to the ui-for-smaller-screens branch, my Comm Device setting was lost, as indicated by the orange @ symbol. I set it again in the Devices tab, however that had no effect on the connection status, and the symbol remained orange. Repeating the “Set Comm Device” operation a few times made no difference.

The only way to get the connection to activate was to restart ATAK, which caused the device to be finally recognized and the symbol to turn green.

I was unable to reproduce the bug and was almost going to dismiss it a one-off glitch, but later it happened identically on two other phones, so it may be worth looking into.

paulmandal commented 4 years ago

This might fix it: https://github.com/paulmandal/atak-forwarder/pull/68 I'm heading out to go hiking so I can't test it yet, I will try it out this week though.

a-f-G-U-C commented 4 years ago

Good catch! Getting rid of the old configuration wasn't easy, but I finally managed to test it this morning and can confirm PR #68 fixes the issue for me.

I hope you enjoyed your hiking trip.

paulmandal commented 4 years ago

Thank you! I think this reconnect / restart service code needs to be added to the non-ATAK device configuring class, too. I will take care of that in the coming days.

As a tip for the future - if you change the KEY strings in StateStorage you can "clear" your config, I might also add a button to do that to the advanced menu.

a-f-G-U-C commented 4 years ago

Thanks, I'll keep this in mind. Quicker than a factory reset for sure. :)

On this subject, would you consider, as a low-priority task, saving the configuration in a human-readable format (XML or JSON), somewhere under /sdcard/atak - which seems to be the ATAK way of doing it? It may help with ATAK backups and with migrating the configuration across devices.

paulmandal commented 4 years ago

I like that -- added it to my TODO list