I have a problem with reading data over an usb-to-uart ftdi interface (C232HD). The interface is connected to a microcontroller which is transmitting the data.
I can see on minicom how data is received, but no chance to see it in matlab.
I also have created as symbolic link from /dev/ttyUSB0 to /dev/ttyS100. I tried also the java.opts file to place in userpath.
See : <https://ch.mathworks.com/matlabcentral/answers/95024-why-is-my-serial-port-not-recognized-with-matlab-on-linux-or-solaris>
On another Windows Machine it works fine. It seems to be a Linux problem.
MATLAB can recognize the port.
>> instrhwinfo('serial')ans = HardwareInfo with properties: AvailableSerialPorts: {2×1 cell} JarFileVersion: 'Version 3.11' ObjectConstructorName: {2×1 cell} SerialPorts: {2×1 cell}
Access to your hardware may be provided by a support package. Go to the Support Package Installer to learn more.
>> ans.AvailableSerialPortsans = 2×1 cell array '/dev/ttyS1' '/dev/ttyS0'>> instrhwinfo('serial')ans = HardwareInfo with properties: AvailableSerialPorts: {3×1 cell}JarFileVersion: 'Version 3.11'ObjectConstructorName: {3×1 cell}SerialPorts: {3×1 cell}
Access to your hardware may be provided by a support package. Go to the Support Package Installer to learn more.
>> ans.AvailableSerialPortsans = 3×1 cell array '/dev/ttyUSB0' '/dev/ttyS1' '/dev/ttyS0'
MATLAB properly recognizes /dev/ttyUSB0.
The port permissions of /dev/ttyUSB0 is 666
>> system('ls -als /dev/ttyUSB0')0K crw-rw-rw- 1 root root 188, 0 Jan 16 14:27 /dev/ttyUSB0
Best Answer