bluetooth icon indicating copy to clipboard operation
bluetooth copied to clipboard

The connection callback was not executed.

Open H21-jack opened this issue 7 months ago • 4 comments

hello,when I use the example/connparams run on Embedded Linux platform,I found a problem related to the connectioncallback.I can connect this Go BLE test with my phone,I try to add some print info but the connection callback was not executed.

H21-jack avatar May 11 '25 06:05 H21-jack

Image

Image

The routine is running normally, I think it should print "connection from device:". Or are there any other configurations that need to be done? And I check the bluetooth driver in this linux platform it used hci uart,I don't know if it will affect the connection callback.

Image

Are there any debugging methods to analyze this kind of phenomenon more deeply? There is currently too little effective information available to me as a beginner.

H21-jack avatar May 11 '25 06:05 H21-jack

What's more interesting is that I tried other demo programs. When I run the example/circuitplay program. I managed to compile and run it, commented out some usage of the machine package, and then used a Bluetooth tool to connect to the advertising Bluetooth. In the ledColorCharacteristic service, I can perform read(return some default value) and write operations(random data edited), but the terminal running the program still does not print any connection information or any callback information related to read/write operations. Now I want to set the content of the read return information and also respond to the write operation with a corresponding notify. I would like to ask if there are any relevant methods, or what I should do, thank you very much!

H21-jack avatar May 11 '25 17:05 H21-jack

This issue is a bit confusing, because it doesn't include the function provided to SetConnectionHandler. I'm guessing it puts the device on the newDevice channel if connected == true.

If so, this issue is a duplicate of #354.

ben-krieger avatar May 31 '25 02:05 ben-krieger

Labeling to close on next release, since this has been addressed by #369

deadprogram avatar Jun 13 '25 07:06 deadprogram