Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    Establishing Bluetooth Connection to Development Board in Python

    Establishing Bluetooth Connection to Development Board in Python

    New Poster

    What are the steps to establishing a Bluetooth connection to the Development Boarad in Python? I used:

    myBoard.PCInterfaceConfig(PCINTERFACE.SERIAL, "COM7")

    where COM7 is the Bluetooth wireless port.

    This works the first time but when the program ends, and I try running another program with the same command, the Bluetooth port doesn't get established. The only solution I have found is to go to the Bosch Development Desktop software package, establish a connection in Bluetooth, then close Bosch Development Desktop, and then run my program. I am guessing that somehow the Bluetooth connection needs to be reset or disconnected but I don't see an API to do that. I have tried connecting to USB first with the same statement, then connecting via Bluetooth, but that didn't solve this problem. Any ideas?

    3 REPLIES 3

    Sorry for the late reply.

    I am not an expert with COM-port-over-bluetooth-using-python, but I do know that sometimes there are 2 virtual COM ports recognized by the PC, make sure to select the correct one (the first one ?).

    My assumption would be that if it worked properly the first time, and any subsequent attempt to connect failed, then you may have some issue when disconnecting properly, but as I said I am no expert on this matter.

    Disconnecting/resetting seems to be the problem - I was wondering if anyone had uncovered any commands in the  Bosch python library that were needed to reset the port

    New Poster



    Are there any instructions on  how to get the bluetooth turned on anywhere? My application board isn't even discoverable to allow for attaching a com port - like step 1 is missing.