Results 1 to 3 of 3
  1. #1
    Z.K. is offline Member
    Join Date
    Apr 2011
    Posts
    10
    Rep Power
    0

    Question Serial Port Problems in Ubuntu 10.04 64-bit

    I am trying to access a serial device. It is a USB to Serial device that acts kind of like a parallel port. It is called a UBW(Universal Bit Whacker from SparkFun.com). I was able to use C# in MonoDevelop to write to the C# port just fine, but I am tearing my hair out trying to do this in Java. I am fairly new to Java, but serial port programming should not be that difficult. Apparently it is though.

    I tried using Eclipse RXTX plugins, but that did not work. It seemed to work, but no data got to the UBW even though it seemed to detect the /dev/ttyAMC0 port which it uses. So, I created a symbolic link to ttyUSB0. It works fine in a terminal program, but not in Java.

    So, I decided to just install RXTX as it specifies on its web site and then I compiled the program and ran it from the command line using javac to compile and java to run the program. That did not work either.

    I have been working on a solution to this for over a week now. Is there no way to get Java to work with the serial port in Linux and 64-bit or am I going to have to go back to using C#. It seems kind of stupid to me to have a programming language that will not work with serial ports. There are still a lot of devices out there that use serial ports. I even saw an example where someone was using php to access serial ports in Linux. What is it with Java anyway. I am trying to learn Java, but if it can't do something this simple I am not sure it is worth learning. All I am trying to do is send a simple command to the serial port and have the UBW interpret that command and turn on an LED. This should be really simple.


    :confused:

  2. #2
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,058
    Rep Power
    5

    Default

    Serial ports were already old-school when Java came out. Thus, serial port I/O is in an optional library. You can read about and download it here.

  3. #3
    Z.K. is offline Member
    Join Date
    Apr 2011
    Posts
    10
    Rep Power
    0

    Default

    Quote Originally Posted by kjkrum View Post
    Serial ports were already old-school when Java came out. Thus, serial port I/O is in an optional library. You can read about and download it here.
    Not sure I agree with that, but I won't argue even though there are still a lot of companies out there that still use serial and parallel, not to mention usb to serial which is what my device is. I don't think serial or usb to serial will go away very soon. One would think most programming languages would still support it. I looked at that link before, but it is for x86 not 64-bit.

    Anyway, thanks for the response.

Similar Threads

  1. Using serial port com with Java?
    By AK2000 in forum Advanced Java
    Replies: 0
    Last Post: 02-16-2011, 04:07 PM
  2. Reading from Serial port!
    By Dogge in forum New To Java
    Replies: 2
    Last Post: 12-01-2010, 03:21 AM
  3. Replies: 1
    Last Post: 07-30-2010, 08:29 AM
  4. Serial Port
    By radhika in forum New To Java
    Replies: 5
    Last Post: 11-06-2009, 10:40 AM
  5. serial port
    By musiigedeo in forum Advanced Java
    Replies: 0
    Last Post: 07-23-2007, 04:52 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •