BLE: Use unique name
This commit is contained in:
parent
2dfcfef58d
commit
9211c82d6f
2 changed files with 10 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue