Hello I am having the same issue with MATLAB 2009b in Linux kernel 2.6.31. I have been able to get an older Pololu device (16 servo servo controller) to work by following this procedure:
Plugging in the older device --> Linux command prompt:
$ lsusb
Bus 002 Device 024: ID 10c4:803b Cygnal Integrated Products, Inc.
$ dmesg | grep tty
[77078.644447] usb 3-1: cp210x converter now attached to ttyUSB0
Where ttyUSB0 is the device I use for opening the MATLAB serial port with the following code (old_pololu_init):
clc
clear all
close all;
s1 = serial(’/dev/ttyUSB0’ ,‘Baudrate’,9600, …
‘DataBits’,8, …
‘Parity’,‘none’,…
‘InputBufferSize’,16384)
fopen(s1)
which gives me:
Serial Port Object : Serial-/dev/ttyUSB0
Communication Settings
Port: /dev/ttyUSB0
BaudRate: 9600
Terminator: ‘LF’
Communication State
Status: closed
RecordStatus: off
Read/Write State
TransferStatus: idle
BytesAvailable: 0
ValuesReceived: 0
ValuesSent: 0
I can then move the servos from my old pololu device using this command:
fwrite(s1,[128,1,3,0,127,0],‘uint8’)
and varying the last two columns of the uint8 matrix between 0,0 and 127,127
I can move the servo motor
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I have now upgraded to the Pololu Mini Maestro Servo controller. Following a modified version of the procedure above:
Plugging in the Mini Maestro–> Linux command prompt:
$ lsusb
Bus 003 Device 010: ID 1ffb:008c
$ dmesg | grep tty
[149398.188687] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
[149398.200068] cdc_acm 3-1:1.2: ttyACM1: USB ACM device
Where ttyACM0 is the device chosen for opening the MATLAB serial port:
clc
clear all
close all;
s2 = serial(’/dev/ttyACM0’ ,‘Baudrate’,9600, …
‘DataBits’,8, …
‘Parity’,‘none’,…
‘InputBufferSize’,16384)
fopen(s2)
I then get the following output:
Serial Port Object : Serial-/dev/ttyACM0
Communication Settings
Port: /dev/ttyACM0
BaudRate: 9600
Terminator: ‘LF’
Communication State
Status: closed
RecordStatus: off
Read/Write State
TransferStatus: idle
BytesAvailable: 0
ValuesReceived: 0
ValuesSent: 0
??? Error using ==> serial.fopen at 72
Port: /dev/ttyACM0 is not available. No ports are available.
Use INSTRFIND to determine if other instrument objects are connected to the requested device.
Error in ==> mini_maestro_init at 10
fopen(s2)
I am able to get the mini maestro to run with the maestro control center which ensures that my device is working, but I feel that my linux machine is not able to recognize the device because there is no text after the bus device number fro the lsusb call:
Bus 003 Device 010: ID 1ffb:008c
Do you think I need to install a driver to run the mini maestro separate from the Maestro control center?