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].
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].