linux系统下smslib无法找到多口短信猫设备的解决方法
分享linux系统下smslib无法找到多口短信猫设备的解决方法
A brief note on How to add new enumeration to existing list of ports in Linux?
PRE Version 2.2 -- This section maybe wants removing now?
The RXTXcomm.jar file contains all the required classes that work with javax.comm API. One of them is RXTXCommDriver.class. RXTXCommDriver.java is available in ftp://ftp.qbang.org/pub/rxtx/rxtx-2.0-7pre2/src/ Download the RXTXCommDriver.java. In this code, you will find
if (osName.equals ("Linux")) { String[]Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes = Temp;
Replace this code with
if (osName.equals ("Linux")) { String[]Temp = { "ttyS", "ttyUSB", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes = Temp; }
Compile the RXTXCommDriver.java and add the resulting RXTXCommDriver.class file to RXTXcomm.jar in /usr/java/jdk1.5.0_07/jre/lib/ext/RXTXcomm.jar
P.S. : RXTXcomm.jar has two sub directories. gnu->io->RXTXCommDriver.class. Make sure the new compiled file goes into the right place. One way is to extract all files from RXTXcomm.jar. Replace the RXTXCommDriver.class with the new file. Create a new RXTXcomm.jar file using the following command
jar cvf RXTXcomm.jar gnu META-INF
Replace this new updated jar file with the old one. Then USB to Serial Converters should work great.
回帖 ( 0 )