lxbzmy / java-simple-serial-connector

Automatically exported from code.google.com/p/java-simple-serial-connector
0 stars 0 forks source link

Port List not returning MacOSX #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. be on Mac OS X
2. if you call serialPortList.getPortNames()
3. it will not return anything because of the file rules it has for returning a 
file

What is the expected output? What do you see instead?
I expected to see ports.  instead I got A zero length array

What version of the product are you using? On what operating system?
0.9  MacOSX

Please provide any additional information below.
It would be helpful if we were allowed to specify the rules for finding ports.
Obviously I just went and found the ports needed myself.

This could also be an improvement for people trying to use a virtual port.

Btw I love this project.  It is very useful and very easy!

Original issue reported on code.google.com by Dtrac...@gmail.com on 24 Oct 2012 at 9:25

Attachments:

GoogleCodeExporter commented 9 years ago
I was having the same issue, and I had to look at the code in the library, 
specifically SerialPortList.java.
It was the file extension // "tty.(serial.*|usbserial.*)") that I changed to 
"cu.*".
You could also use tty.* but it comes up with a very long list.
attached:
 - Screenshot of the culprit method
 - jSSC.jar include

Original comment by sa...@uw.edu on 14 Mar 2013 at 4:55

Attachments:

GoogleCodeExporter commented 9 years ago
For Mac, you're best off specifying your own regex using the 
getPortNames(pattern) method. The default regex in SerialPortList.java for Mac 
won't match the kinds of serial port devices you find on the latest versions.

Original comment by s.donald...@gmail.com on 17 Jun 2014 at 11:08