()
| 289 | } |
| 290 | |
| 291 | pub async fn test_read_write_roundtrip() { |
| 292 | use btleplug::api::WriteType; |
| 293 | |
| 294 | let peripheral = peripheral_finder::find_and_connect().await; |
| 295 | peripheral_finder::reset_peripheral(&peripheral).await; |
| 296 | let char = peripheral_finder::find_characteristic(&peripheral, gatt_uuids::READ_WRITE); |
| 297 | let data = vec![0xDE, 0xAD, 0xBE, 0xEF]; |
| 298 | peripheral |
| 299 | .write(&char, &data, WriteType::WithResponse) |
| 300 | .await |
| 301 | .unwrap(); |
| 302 | let read_back = peripheral.read(&char).await.unwrap(); |
| 303 | assert_eq!(read_back, data, "Read-back should match written data"); |
| 304 | peripheral.disconnect().await.unwrap(); |
| 305 | } |
| 306 | |
| 307 | pub async fn test_long_value_read_write() { |
| 308 | use btleplug::api::WriteType; |
nothing calls this directly
no test coverage detected