fix(bluetooth): auto-reconnect to paired devices after reboot
- Auto-set enableOnBoot=true when BT is enabled or device is paired,
so board restarts with BT on and can reconnect
- Make RADIO_STATE_ON handler non-exclusive: scan for HID Host,
start HID Device, SPP and MIDI all independently (was else-if)
- Improve HID Host auto-connect for RPA: direct addr match, name-match
fallback, and direct connect to stored identity using resolving list
- Persist addrType in PairedDevice file for more reliable reconnection
- Add verbose logging for loadAll/save to debug missing files
Fixes issue where board restart did not reconnect to previously
connected BT devices. Also preserves f94cc160 fullscreen flag feature.
This commit is contained in:
@@ -13,6 +13,8 @@ struct PairedDevice {
|
||||
bool autoConnect = false;
|
||||
/** Profile used to pair (BtProfileId value). Defaults to BT_PROFILE_SPP=2. */
|
||||
int profileId = 2;
|
||||
/** BLE address type (0=PUBLIC, 1=RANDOM, etc). Defaults to PUBLIC for backward compat. */
|
||||
uint8_t addrType = 0;
|
||||
};
|
||||
|
||||
std::string addrToHex(const std::array<uint8_t, 6>& addr);
|
||||
|
||||
Reference in New Issue
Block a user