2019-05-02 14:17:11 -04:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"time"
|
|
|
|
"gitlab.wow.st/gmp/nswrap/examples/bluetooth/ble"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2019-05-04 23:32:57 -04:00
|
|
|
cd := ble.Ble_delegateAlloc().Init()
|
2019-05-02 14:17:11 -04:00
|
|
|
fmt.Println("LE capable:",cd.IsLECapableHardware())
|
|
|
|
time.Sleep(time.Second * 1)
|
|
|
|
fmt.Println("LE capable:",cd.IsLECapableHardware())
|
2019-05-03 13:14:30 -04:00
|
|
|
uuid := ble.CBUUIDWithGoString("180d")
|
2019-05-02 14:17:11 -04:00
|
|
|
cd.ScanFor(uuid)
|
2019-05-03 13:14:30 -04:00
|
|
|
|
|
|
|
select { }
|
2019-05-02 14:17:11 -04:00
|
|
|
}
|