Improve Handshake Process with HELLO Message#230
Improve Handshake Process with HELLO Message#230VanceVagell merged 8 commits intoVanceVagell:mainfrom
Conversation
|
I'm confused, doesn't this just move the timer to waiting for HELLO instead of waiting for the GET_VERSION response? Also, the microcontoller won't restart when the kv4p HT app is closed and reopened, meaning the HELLO message won't be sent, right? Maybe I'm missing something... |
|
Hi @VanceVagell
|
|
Can you please confirm if this fixes bug #226 ? You can test it by plugging into your phone a bare ESP32 (not in a kv4p HT PCB or connected to a radio module) with the firmware installed. If so I'll merge this in, otherwise it's not clear to me that this has added benefit over current functionality (I appreciate your explanation, and I can go into more detail if this does not fix #226). |
|
Hi @VanceVagell, Yes, I can confirm that this does fix #226. I tested it by plugging a bare ESP32 (not in a kv4p HT PCB or connected to a radio module) into my phone with the firmware installed, and it worked as expected. It's worth noting that the issue wasn't actually related to the changes in the handshake. The problem was due to a WDT reset occurring while waiting for the SA818's reply (see [this line]. |
android-src/KV4PHT/app/src/main/java/com/vagell/kv4pht/radio/RadioAudioService.java
Outdated
Show resolved
Hide resolved
android-src/KV4PHT/app/src/main/java/com/vagell/kv4pht/ui/MainActivity.java
Outdated
Show resolved
Hide resolved
|
Awesome, thanks for fixing that bug! I will merge this once you adjust the 2 strings I commented on. |
|



Currently, the host waits for an arbitrary delay after a USB connect event before sending a GET_VERSION request to determine if the module is ready. This can lead to timing issues and unreliable initialization.
This PR updates the handshake process so that the module proactively sends a HELLO message after boot. This ensures the host knows exactly when the module is ready, improving reliability and reducing unnecessary delays.
Changes:
Benefits: