MATLAB: Is it possible to support 1024 serial ports in Win32 systems in MATLAB

MATLAB

I can try to use port 356 but the current serial library only supports 256. I would like to be able to use 1024 serial ports on Windows operating systems.

Best Answer

For serial ports not supported by MATLAB, it is possible to enable them by saving a string in the 'java.opts' file as such:
For a Linux operating system:
-Dgnu.io.rxtx.SerialPorts=/dev/rfcomm0:/dev/ttySa0
For a Windows operating system:
-Dgnu.io.rxtx.SerialPorts=COM1004:COM1005:COM1006
For more details, click on the following link:
<http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F>
Generic java.opts info:
1) Put the java.opts file into the appropriate directory. Where you put the file depends on what operating system you are running.
2) On UNIX systems, put the java.opts file in the directory where you intend to start the MATLAB software session, and navigate to that directory before doing so.
3) On Microsoft® Windows® systems:
i) Put the java.opts file in a directory the directory where you intend to start the MATLAB software session.
ii) Create a shortcut to the MATLAB software.
iii) Right-click the shortcut and select Properties.
iv) In the Properties dialog box, specify the MATLAB startup directory for the name of the directory in which you created the java.opts file.
4) On Apple® Mac OS® systems, put the java.opts file into the /Applications/matlab directory.