29 lines
918 B
Go
29 lines
918 B
Go
package ble
|
|
|
|
import "tinygo.org/x/bluetooth"
|
|
|
|
// Nordic UART Service (NUS) UUIDs - same as real V-BLACK sensor
|
|
// This allows the Flutter app to discover the simulator using the same scan filter
|
|
var (
|
|
// ServiceUUID - Nordic UART Service
|
|
// 6e400001-b5a3-f393-e0a9-e50e24dcca9e
|
|
ServiceUUID = bluetooth.NewUUID([16]byte{
|
|
0x6e, 0x40, 0x00, 0x01, 0xb5, 0xa3, 0xf3, 0x93,
|
|
0xe0, 0xa9, 0xe5, 0x0e, 0x24, 0xdc, 0xca, 0x9e,
|
|
})
|
|
|
|
// CommandCharUUID - NUS RX (Write from app's perspective)
|
|
// 6e400002-b5a3-f393-e0a9-e50e24dcca9e
|
|
CommandCharUUID = bluetooth.NewUUID([16]byte{
|
|
0x6e, 0x40, 0x00, 0x02, 0xb5, 0xa3, 0xf3, 0x93,
|
|
0xe0, 0xa9, 0xe5, 0x0e, 0x24, 0xdc, 0xca, 0x9e,
|
|
})
|
|
|
|
// NotifyCharUUID - NUS TX (Notify to app)
|
|
// 6e400003-b5a3-f393-e0a9-e50e24dcca9e
|
|
NotifyCharUUID = bluetooth.NewUUID([16]byte{
|
|
0x6e, 0x40, 0x00, 0x03, 0xb5, 0xa3, 0xf3, 0x93,
|
|
0xe0, 0xa9, 0xe5, 0x0e, 0x24, 0xdc, 0xca, 0x9e,
|
|
})
|
|
)
|