fopen() error with serial device
Show older comments
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 Comment
2000rogers
on 20 Jun 2013
Answers (0)
Categories
Find more on Data Acquisition Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!