()
| 305 | } |
| 306 | |
| 307 | pub async fn test_long_value_read_write() { |
| 308 | use btleplug::api::WriteType; |
| 309 | |
| 310 | let peripheral = peripheral_finder::find_and_connect().await; |
| 311 | peripheral_finder::reset_peripheral(&peripheral).await; |
| 312 | let char = peripheral_finder::find_characteristic(&peripheral, gatt_uuids::LONG_VALUE); |
| 313 | let data: Vec<u8> = (0..200).map(|i| (i % 256) as u8).collect(); |
| 314 | peripheral |
| 315 | .write(&char, &data, WriteType::WithResponse) |
| 316 | .await |
| 317 | .unwrap(); |
| 318 | let read_back = peripheral.read(&char).await.unwrap(); |
| 319 | assert_eq!( |
| 320 | read_back, data, |
| 321 | "Long value read-back should match written data" |
| 322 | ); |
| 323 | peripheral.disconnect().await.unwrap(); |
| 324 | } |
| 325 | |
| 326 | pub async fn test_characteristic_properties() { |
| 327 | use btleplug::api::CharPropFlags; |
nothing calls this directly
no test coverage detected