ble: Set short name in advertisement
This commit is contained in:
parent
75bad1e97a
commit
9a820356ff
2 changed files with 12 additions and 6 deletions
|
|
@ -222,12 +222,13 @@ async fn main(spawner: Spawner) -> ! {
|
|||
let controller = ble::make_controller(peripherals.BT);
|
||||
let serial = &mac.as_bytes()[3..6];
|
||||
let name = alloc::format!(
|
||||
"ESP32 C-ITS {:02x}{:02x}{:02x}",
|
||||
"C-ITS ESP {:02x}:{:02x}:{:02x}",
|
||||
serial[0],
|
||||
serial[1],
|
||||
serial[2]
|
||||
);
|
||||
spawner.spawn(ble::run(controller, name).expect("Failed to spawn BLE task"));
|
||||
let short_name = alloc::format!("V2X {:02x}{:02x}", serial[1], serial[2]); // max 8 chars!
|
||||
spawner.spawn(ble::run(controller, name, short_name).expect("Failed to spawn BLE task"));
|
||||
}
|
||||
|
||||
// Setup GNSS:
|
||||
|
|
|
|||
Loading…
Reference in a new issue