tinygo-org / bluetooth

Cross-platform Bluetooth API for Go and TinyGo. Supports Linux, macOS, Windows, and bare metal using Nordic SoftDevice or HCI
https://tinygo.org
Other
744 stars 137 forks source link

macos Big Sur (11.0.0) - INFO #48

Open lacendarko opened 3 years ago

lacendarko commented 3 years ago

Hi, I would like to point out a problem I had with upgrading to macOS 11 and constantly getting an error "abort trap". Go to System Preferences -> Security & Privacy -> Privacy and add iTerm (or I guess Terminal if you're not using iTerm).

antonfisher commented 3 years ago

@lacendarko i think you meant "System Preferences" —> "Security & Privacy" —> "Bluetooth" 👍

Gys commented 3 years ago

For me it was a combination of both: "System Preferences" —> "Security & Privacy" —> "Privacy" -> "Bluetooth"

gedw99 commented 3 years ago

Not working on MAC for me btw...

If there is anything i can do to help debug let me know...

I enabled bluetooth access to the scanner binary example.

MAC-bluetooth-settings

makefile:

# https://github.com/tinygo-org/bluetooth

print:

hack:
    # manually give permisssions on mac
    # https://github.com/tinygo-org/bluetooth/issues/48

dep:
    rm -rf bluetooth
    git clone https://github.com/tinygo-org/bluetooth -b dev

EX_BIN_FOLDERPATH=$(PWD)/_dist

ex-scanner:
    cd bluetooth/examples/scanner && go build -o $(EX_BIN_FOLDERPATH)/scanner .
    cd $(EX_BIN_FOLDERPATH) && ./scanner

ex-discover:
    cd bluetooth/examples/discover && go build -o $(EX_BIN_FOLDERPATH)/discover .
    cd $(EX_BIN_FOLDERPATH) && ./discover EE:74:7D:C9:2A:68

output:

make ex-scanner 
cd bluetooth/examples/scanner && go build -o /Users/apple/workspace/go/src/github.com/gedw99/gio-proposals/bluetooth/providence/tinygo-org__bluetooth/_dist/scanner .
cd /Users/apple/workspace/go/src/github.com/gedw99/gio-proposals/bluetooth/providence/tinygo-org__bluetooth/_dist && ./scanner
/bin/sh: line 1: 51877 Abort trap: 6           ./scanner
make: *** [ex-scanner] Error 134

env:

MacOS
11.5.2 (Big Sur)

go version
go version go1.17 darwin/amd64

go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/apple/Library/Caches/go-build"
GOENV="/Users/apple/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/apple/workspace/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/apple/workspace/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/go-build1305902903=/tmp/go-build -gno-record-gcc-switches -fno-common"
deadprogram commented 3 years ago

TinyGo 0.19 is not compatible with Go 1.17. Please see https://github.com/tinygo-org/tinygo/issues/2080

idefixcert commented 2 years ago

I still have the problem that scanner does not work. I also use go 1.17 but it seems the issue mentioned ago is fixed?

By does not work I mean:

mo6zes commented 2 years ago

@idefixcert I do experience the same issue, it does not find any devices. Have you found a solution?

aykevl commented 1 year ago

I've added a note to the README in https://github.com/tinygo-org/bluetooth/pull/157.