Watch
0
0
Fork
You've already forked esp32-c_its-companion
0

BLE: Use unique name

This commit is contained in:
Jannik Beyerstedt 2026-08-19 14:37:49 +02:00
commit 9211c82d6f
2 changed files with 10 additions and 2 deletions

View file

@ -219,7 +219,14 @@ async fn main(spawner: Spawner) -> ! {
#[cfg(feature = "ble")]
{
let controller = ble::make_controller(peripherals.BT);
spawner.spawn(ble::run(controller).expect("Failed to spawn BLE task"));
let serial = &mac.as_bytes()[3..6];
let name = alloc::format!(
"ESP32 C-ITS {:02x}{:02x}{:02x}",
serial[0],
serial[1],
serial[2]
);
spawner.spawn(ble::run(controller, name).expect("Failed to spawn BLE task"));
}
// Setup GNSS: