fopen() error with serial device
Mostrar comentarios más antiguos
Hi,
under Linux we'd like to send a text string to a serial device:
% --- code ---> >> s = serial('/dev/ttyS0');
% a serial object s is returned
>> set(s,'BaudRate',19200); % adjust the baudrate
>> fopen(s)
Error using serial/fopen (line 72) Open failed: Port: /dev/ttyS0 is not available. No ports are available. Use INSTRFIND to determine if other instrument objects are connected to the requested device.
% the serial device is still there
>> instrfind
Serial Port Object : Serial-/dev/ttyS0
Communication Settings
Port: /dev/ttyS0
BaudRate: 19200
Terminator: 'LF'
Communication State
Status: closed
RecordStatus: off
Read/Write State
TransferStatus: idle
BytesAvailable: 0
ValuesReceived: 0
ValuesSent: 0
% --- code ---<
Are there special toolboxes neccessary to connect to a serial device?
Regards, Roger
1 comentario
2000rogers
el 20 de Jun. de 2013
Respuestas (0)
Categorías
Más información sobre Data Acquisition Toolbox en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!