paypal / gatt

Gatt is a Go package for building Bluetooth Low Energy peripherals
BSD 3-Clause "New" or "Revised" License
1.12k stars 283 forks source link

Code gets stuck inside DiscoverServices() method #107

Open lidiyag opened 5 years ago

lidiyag commented 5 years ago

I used paypal/gatt package to create and connect a bluetooth server and peripheral device . I created a service exactly like the one described in examples folder. The service which I created is advertised correctly. When I am trying to connect to this service using a peripheral device which is written using paypal/gatt I am getting a random failure. Upon checking logs I realized that it is getting stuck in DiscoverServices() method. In DiscoverServices()[present in peripheral_linux.go] there is call to sendReq() method. When the channel gets value the control goes to loop() function in same file.There it is calling the Read and Write methods. It seems like write is happening properly but the code is getting stuck inside Read()[present in l2cap.go]. When I debugged I could see that the read is getting value from handleL2CAP()[hci.go] which is called by handlePacket()[hci.go].

lidiyag commented 5 years ago

Can someone help me with this?