Help! Cannot see com1
hacktorious
Posts: 72
I have connected my boe-bot to my PC via a USB to Serial Adapter:
parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/List/1/ProductID/378/Default.aspx?txtSearch=usb+to+serial+adapter&SortField=ProductName%2cProductName
I am attempting to run some java code to communicate with my boe-bot. However, it appears as I don't have a comport installed. It does show up in the device manager in windows.
I am running windows vista.
Here is the java code:
package robot;
import java.util.Enumeration;
import javax.comm.CommPort;
import javax.comm.CommPortIdentifier;
import javax.comm.PortInUseException;
public class ListOpenPorts {
private CommPortIdentifier portId;
private Enumeration portList;
public ListOpenPorts() {
portList = CommPortIdentifier.getPortIdentifiers();
}
public void list() throws InterruptedException, PortInUseException {
while (portList.hasMoreElements()) {
portId = (CommPortIdentifier) portList.nextElement();
if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
System.out.print("Serial Port = ");
}
if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) {
System.out.print("Parallel Port = ");
}
System.out.print(portId.getName() + ", ");
CommPort port = portId.open("OpenTest", 20);
Thread.sleep(250);
System.out.println("Opened." + portId.getCurrentOwner());
port.close();
}
}
public static void main(String[noparse]/noparse args) {
try {
ListOpenPorts openPorts = new ListOpenPorts();
openPorts.list();
} catch (InterruptedException ie) {
System.out.println("Unable to sleep.");
} catch (PortInUseException pe) {
System.out.println("Failed. Port In Use.");
}
}
}
I am not getting an error; the print statements are not printing data. This tells me something isn't right with the adapter.
Has anyone in this forum had issues with this? Does anyone have some advice on how I can go about troubleshooting this issue? Thanks.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Scott
If man made it, don't eat it!
Never under estimate the wisdom of nature!
www.POISONINGaNATION.com
parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/List/1/ProductID/378/Default.aspx?txtSearch=usb+to+serial+adapter&SortField=ProductName%2cProductName
I am attempting to run some java code to communicate with my boe-bot. However, it appears as I don't have a comport installed. It does show up in the device manager in windows.
I am running windows vista.
Here is the java code:
package robot;
import java.util.Enumeration;
import javax.comm.CommPort;
import javax.comm.CommPortIdentifier;
import javax.comm.PortInUseException;
public class ListOpenPorts {
private CommPortIdentifier portId;
private Enumeration portList;
public ListOpenPorts() {
portList = CommPortIdentifier.getPortIdentifiers();
}
public void list() throws InterruptedException, PortInUseException {
while (portList.hasMoreElements()) {
portId = (CommPortIdentifier) portList.nextElement();
if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
System.out.print("Serial Port = ");
}
if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) {
System.out.print("Parallel Port = ");
}
System.out.print(portId.getName() + ", ");
CommPort port = portId.open("OpenTest", 20);
Thread.sleep(250);
System.out.println("Opened." + portId.getCurrentOwner());
port.close();
}
}
public static void main(String[noparse]/noparse args) {
try {
ListOpenPorts openPorts = new ListOpenPorts();
openPorts.list();
} catch (InterruptedException ie) {
System.out.println("Unable to sleep.");
} catch (PortInUseException pe) {
System.out.println("Failed. Port In Use.");
}
}
}
I am not getting an error; the print statements are not printing data. This tells me something isn't right with the adapter.
Has anyone in this forum had issues with this? Does anyone have some advice on how I can go about troubleshooting this issue? Thanks.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Scott
If man made it, don't eat it!
Never under estimate the wisdom of nature!
www.POISONINGaNATION.com
Comments
Jeff T.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Scott
If man made it, don't eat it!
Never under estimate the wisdom of nature!
www.POISONINGaNATION.com
One step at a time!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Scott
If man made it, don't eat it!
Never under estimate the wisdom of nature!
www.POISONINGaNATION.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
I am reviewing the java comm installation for windows to make sure I didn't miss anything.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Scott
If man made it, don't eat it!
Never under estimate the wisdom of nature!
www.POISONINGaNATION.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
This is from the directions:
# Copy javax.comm.properties to your <JDK>\lib directory.
C:\>copy c:\commapi\javax.comm.properties c:\jdk1.1.6\lib
The javax.comm.properties file must be installed. If it is not, no ports will be found by the system.
I did this, but I don't think it is seeing the properties file.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Scott
If man made it, don't eat it!
Never under estimate the wisdom of nature!
www.POISONINGaNATION.com
USB Serial Converter
Under Ports I have the following:
USB Serial Port (COM1)
I am attempting to run a sample java file (BlackBox) written by Sun to find com ports. I am getting the following message:
No serial ports found!
The javax.comm.properties file is in the correct location so I am almost 100% certain this is not the cause.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Scott
If man made it, don't eat it!
Never under estimate the wisdom of nature!
www.POISONINGaNATION.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Scott
If man made it, don't eat it!
Never under estimate the wisdom of nature!
www.POISONINGaNATION.com