Bosch Sensortec Community

    cancel
    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

    Swingpro
    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

    o_o
    Contributor
    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

    lumbo
    New Poster

    Hi,

     

    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.

     

    thanks

     

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist