CoDrone Python pairing issues



  • I have successfully installed the CoDrone library. However, I keep getting the same error message:

    SerialException Traceback (most recent call last)
    <ipython-input-7-ae0abd1f88fc> in <module>()
    1 import CoDrone
    2 drone = CoDrone.CoDrone()
    ----> 3 drone.pair(drone.Nearest)

    ~\Anaconda3\lib\site-packages\CoDrone\codrone.py in pair(self, device_name, port_name, flag_system_reset)
    723 if not self.isOpen():
    724 self.close()
    --> 725 self.open(port_name)
    726 sleep(0.1)
    727

    ~\Anaconda3\lib\site-packages\CoDrone\codrone.py in open(self, port_name)
    670 stopbits=serial.STOPBITS_ONE,
    671 bytesize=serial.EIGHTBITS,
    --> 672 timeout=0)
    673
    674 if self.isOpen():

    ~\Anaconda3\lib\site-packages\serial\serialwin32.py in init(self, *args, **kwargs)
    29 self._overlapped_read = None
    30 self._overlapped_write = None
    ---> 31 super(Serial, self).init(*args, **kwargs)
    32
    33 def open(self):

    ~\Anaconda3\lib\site-packages\serial\serialutil.py in init(self, port, baudrate, bytesize, parity, stopbits, timeout, xonxoff, rtscts, write_timeout, dsrdtr, inter_byte_timeout, exclusive, **kwargs)
    238
    239 if port is not None:
    --> 240 self.open()
    241
    242 # - - - - - - - - - - - - - - - - - - - - - - - -

    ~\Anaconda3\lib\site-packages\serial\serialwin32.py in open(self)
    60 if self._port_handle == win32.INVALID_HANDLE_VALUE:
    61 self._port_handle = None # 'cause del is called anyway
    ---> 62 raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
    63
    64 try:

    SerialException: could not open port 'COM1': PermissionError(13, 'Access is denied.', None, 5)


  • administrators

    @rkm When you see that it is trying to pair over COM1, it means that the program is not detecting the correct USB port. This can be because of one or more of the following:

    • CP210x driver was not installed.
    • Your USB cable is not properly connected or is broken.
    • The USB port is not working. Try connecting to a different one.
    • Make sure the 4pin UART cable connecting the Bluetooth and the SmartInventor Board is disconnected and the red LED is blinking on the BLE board to indicate ready to pair. If you are not sure about this, please attach a photo of your setup.

    If none of the above resolve the issues, let me know!



  • The first time I tried pairing I got this output:

    Port : [COM1]

    Out[1]: False

    The second time I attempted pairing, after disconnecting everything, I got the same error that I initially posted. I am sure that the issue is not being caused by any of the potential causes you described. Can you offer any more help?



  • are you using the supplied cable? if not, I have read in the forums that if you are using a "charge only" cable, you will not get the data lines enabled. you will get power, so it looks like it works, but no data. Not sure if that helps at all.



  • This does not help, but thanks anyway.


  • administrators

    @rkm Could you attach a picture of your setup? (Bluetooth module connected to laptop) Thanks!



  • This post is deleted!


  • Here is a photo of my setup. (The CoDrone is on nearby)0_1572192544805_codrone setup (2).jpg


  • administrators

    @rkm For this case, it may be best to set up a video support call to walk through the steps we are suggesting. You can do so at this link.


Log in to reply
 

Looks like your connection to Robolink community was lost, please wait while we try to reconnect.