Issue in getting motor ids

Hi. I want to use Pypot for commanding my MX-64 motors (2 motors). I can set the port, but I can not get the motor IDs! I tried many of the baud rates, but it does not work. When I use R+ manager or DynamixelSDK, I can find the motor’s IDs. I should say that also, when I check the serial port using Herborist, this tool can not find the motors! Can anyone help me? What is the problem?

my code:

import pypot.dynamixel
ports = pypot.dynamixel.get_available_ports()
if not ports:
    raise IOError('no port found!')
print('ports found', ports)
print('connecting on the first available port:', ports[0])
dx1_io = pypot.dynamixel.DxlIO(ports[0], 57600 )
print(dx1_io.scan())

the print(dx1_io.scan()) shows [] (empty list].

Can you enable logging at the top of your script and copy/paste the result here?

import logging                                                             
h = logging.StreamHandler()                                                
h.setLevel("DEBUG")                                                        
l = logging.getLogger("pypot") 
l.setLevel("DEBUG")                                              
l.addHandler(h)    

Yes. I’ll do it. I can probably do this on Saturday (the setup is at my university, and Friday is our free workday at the week in Iran😅).
Tanks.

1 Like

Hi again!
I put your code on top of my script like below, but nothing happened!

the code:

import pypot.dynamixel
import logging                                                            
h = logging.StreamHandler()                                                
h.setLevel("DEBUG")                                                        
l = logging.getLogger("pypot")                                            
l.addHandler(h)  
ports = pypot.dynamixel.get_available_ports()
if not ports:
    raise IOError('no port found!')
print('ports found', ports)
print('connecting on the first available port:', ports[1])
dx1_io = pypot.dynamixel.DxlIO('COM3', baudrate=57600)
print(dx1_io.scan())

Did I conduct the work correctly?

It was missing setting the DEBUG level for the logger indeed. Here you go:

import pypot.dynamixel
import logging                                                            
h = logging.StreamHandler()                                                
h.setLevel("DEBUG")                                                        
l = logging.getLogger("pypot")                                            
l.addHandler(h)
l.setLevel("DEBUG")  
ports = pypot.dynamixel.get_available_ports()
if not ports:
    raise IOError('no port found!')
print('ports found', ports)
dx1_io = pypot.dynamixel.DxlIO('COM3', baudrate=57600)
print(dx1_io.scan())

You should see all packets sent to Dxl motors for the scan, and responses, if any.

Also, make sure that you did not configure your MX-64 with Protocol 2.0. Pypot expects Protocol 1.0 for this model (check with R+).

1 Like

Thanks. The problem was with my protocol2 settings. I changed the protocol settings to 1. Can I change it back to 2 (because now R+ can not detect the motors)?

Dynamixel Wizard can change the firmware as well, see https://emanual.robotis.com/docs/en/popup/faq_protocol_compatibility_table/

1 Like