Navigation

    Robolink logo
    • Register
    • Login
    • Search
    • [[global:header.categories]]
    • [[global:header.recent]]
    • [[global:header.tags]]
    • [[global:header.popular]]
    • [[global:header.users]]
    • [[global:header.groups]]
    As of September 2021, we have moved technical support to Robolink Help

    Welcome to the Robolink Community forum!

    You can post here to interact with others in the Robolink community. We're checking it weekly, and we'll respond to some messages. If you're looking for technical support, head over to Robolink Help.

    Pairing Test issue

    CoDrone Lite/Pro
    2
    5
    2597
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Alpha last edited by

      when I using python to do a pair test I got error from the result.

      Below is my python code I use:

      import CoDrone
      drone = CoDrone.CoDrone()
      drone.pair(drone.Nearest)

      and below is the output result I got:

      "C:\Program Files (x86)\Python38-32\python.exe" "C:/Users/jia_f/Documents/SIT (ICT)/Modules Notes/ICT2111-Integrative Team Project/Distek ITP Project/Python Program/Test.py"
      Traceback (most recent call last):
      File "C:/Users/jia_f/Documents/SIT (ICT)/Modules Notes/ICT2111-Integrative Team Project/Distek ITP Project/Python Program/Test.py", line 3, in <module>
      drone.pair(drone.Nearest)
      File "C:\Program Files (x86)\Python38-32\lib\site-packages\CoDrone\codrone.py", line 725, in pair
      self.open(port_name)
      File "C:\Program Files (x86)\Python38-32\lib\site-packages\CoDrone\codrone.py", line 666, in open
      self._serialPort = serial.Serial(
      File "C:\Program Files (x86)\Python38-32\lib\site-packages\serial\serialwin32.py", line 31, in init
      super(Serial, self).init(*args, **kwargs)
      File "C:\Program Files (x86)\Python38-32\lib\site-packages\serial\serialutil.py", line 240, in init
      self.open()
      File "C:\Program Files (x86)\Python38-32\lib\site-packages\serial\serialwin32.py", line 62, in open
      raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
      serial.serialutil.SerialException: could not open port 'COM8': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)

      Process finished with exit code 1

      robolink_leila 1 Reply Last reply Reply Quote 0
      • robolink_leila
        robolink_leila @Alpha last edited by

        @alpha You don't need to run all three functions 🙂 You can stick with the last one only. The middle one is if you know your drone's four-digit ID. The example given uses '1234' but you can find out your drone ID by looking at the output once your drone pairs. Let me know if you have any more questions!

        1 Reply Last reply Reply Quote 0
        • A
          Alpha @robolink_leila last edited by

          @robolink_leila
          thanks for the info, it works.

          0_1590220753199_9797bae4-5ad3-4788-a308-1d9f10139b83-image.png

          1 Reply Last reply Reply Quote 0
          • A
            Alpha last edited by

            @robolink_leila
            thanks for the information, it works.

            0_1590220711432_de49cf9b-6746-4a83-87a9-c583a61ea7dd-image.png

            robolink_leila 1 Reply Last reply Reply Quote 0
            • robolink_leila
              robolink_leila @Alpha last edited by robolink_leila

              @alpha Try the following steps if you are having difficulty pairing:

              1. Disconnect and reconnect the BLE board to your computer. Make sure the BLE board is not connected to anything else but your computer.
              2. Check your device manager to verify which COM port is being detected. Go to the start menu and search for "Device Manager". In the window, check under the list of USB devices. If nothing is showing up, then try a different USB cable or port until it does.
              3. Once you can verify which port is being detected, try calling the pair() function with the specific port using one of the following:
              drone.pair(port_name = 'COM3')
              drone.pair('1234', 'COM3')
              drone.pair(drone.Nearest, 'COM3')
              

              Let me know if this works for you!

              A 1 Reply Last reply Reply Quote 0
              • First post
                Last post