Menu

Probleme with HCIDriver.init

Help
Nicolas
2005-01-10
2013-04-10
  • Nicolas

    Nicolas - 2005-01-10

    Hi,

    I'm trying to use the JavaBluetooth Api with ecplise, but I've got a probleme.
    The first thing i make is :
        HCIDriver.init(new UARTTransport("serial0"));

    Then, when I run, i've got this error message :

    java.lang.Error: Unresolved compilation problems:
        The import javax.comm cannot be resolved
        The import javax.comm cannot be resolved
        The import javax.comm cannot be resolved
        The import javax.comm cannot be resolved
        The import javax.comm cannot be resolved
        The import javax.comm cannot be resolved
        The import javax.comm cannot be resolved
        SerialPortEventListener cannot be resolved or is not a valid superinterface
        CommPortIdentifier cannot be resolved or is not a type
        CommPortIdentifier cannot be resolved
        CommPortIdentifier cannot be resolved
        SerialPort cannot be resolved or is not a type
        SerialPort cannot be resolved
        SerialPort cannot be resolved
        SerialPort cannot be resolved
        NoSuchPortException cannot be resolved or is not a type
        SerialPortEvent cannot be resolved (or is not a valid type) for the argument event of the method serialEvent

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at org.javabluetooth.stack.hci.UARTTransport.<init>(UARTTransport.java:25)
        at Test.main(Test.java:34)
    Exception in thread "main"

    I imported the comm.jar, so i don't understand why javax.comm cannot be resolved.

     
    • Patrick Kosiol

      Patrick Kosiol - 2005-03-01

      First of all you have to copy the comm.jar, javax.comm.properties and win32com.dll in your project folder. Than add the comm.jar as Library (by using "Libraries->Add JARs" in the project properties) to the "Java Build Path"
      Now everything should work.

      Hint: by using Windows you have to use "HCIDriver.init(new UARTTransport("COM1"));" or any other COM-Port

       
    • Jojo

      Jojo - 2005-04-04

      Hello!!!
      I have the same problem. I tried your solution but the problem is the same.
      I really don't know what to do...
      If anybody has another solution, thank you

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.