simulator v1

This commit is contained in:
2026-02-06 15:31:53 +01:00
parent 69a9bea65b
commit 97427bb3c0
11 changed files with 720 additions and 1 deletions

28
internal/ble/uuids.go Normal file
View File

@@ -0,0 +1,28 @@
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,
})
)