summaryrefslogtreecommitdiffstats
path: root/ble/src
diff options
context:
space:
mode:
Diffstat (limited to 'ble/src')
-rw-r--r--ble/src/ble.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/ble/src/ble.rs b/ble/src/ble.rs
index ac3542f..04d8687 100644
--- a/ble/src/ble.rs
+++ b/ble/src/ble.rs
@@ -7,11 +7,12 @@ use rubble::{
gatt::BatteryServiceAttrs,
l2cap::{BleChannelMap, L2CAPState},
link::{
- ad_structure::AdStructure, queue, AddressKind, DeviceAddress, HardwareInterface, LinkLayer,
- Responder, MIN_PDU_BUF,
+ ad_structure::{AdStructure, ServiceUuids},
+ queue, AddressKind, DeviceAddress, HardwareInterface, LinkLayer, Responder, MIN_PDU_BUF,
},
security_manager::NoSecurity,
time::{Duration, Timer},
+ uuid::Uuid,
};
use rubble_nrf52::{
radio::{BleRadio, PacketBuffer},
@@ -76,11 +77,16 @@ pub fn setup(
// may be able to use ring buffer to avoid sharing?
let mut ble_radio = unsafe { BleRadio::new(radio, &mut TX_BUF, &mut RX_BUF) };
+ let uart_uuid =
+ Uuid::parse_str("6E400001-B5A3-F393-E0A9-E50E24DCCA9E").expect("parsing UART UUID");
let mut ble_ll = LinkLayer::<NRF52840>::new(addr, ble_timer);
let next_update = ble_ll
.start_advertise(
Duration::from_millis(200),
- &[AdStructure::CompleteLocalName("bleusb")],
+ &[
+ AdStructure::CompleteLocalName("bleusb"),
+ AdStructure::ServiceUuids128(ServiceUuids::from_uuids(true, &[uart_uuid])),
+ ],
&mut ble_radio,
tx_cons,
rx_prod,