Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2006

Tip: Looking for answers? Try searching our database.

using  javax.comm with usb-serial port adapter

Thread view: 
yakka - 07 Aug 2006 15:25 GMT
Hi there,

I have written an application for reading data from a lab instrement
through RS-232 interface.
The instrument has only a serial port output for printer, so it only
sends data.
The problem is mainboard of computer has only one serial port but I
need to communicate another device through RS-232 interface. Is it
possible to use a usb adapter to connect device with javax.comm api.
Thanks in advance...

                        Yalçin Öksüz

                        Hacettepe University

                        Türkiye
PaullyB - 07 Aug 2006 21:54 GMT
> Hi there,
>
[quoted text clipped - 12 lines]
>
>                          Türkiye

I have used the javax.comm api to communicate with a GPS receiver using
a USB-to-serial adapter on a PC running windows and have not had any
problems.  The only thing I noticed is that the port number is variable
so you need to programmatically determine which com port the
usb-to-serial device is registered on.  For example, if you plug in the
adapter it might register as com5.  If you unplug it and plug it back
into the same USB port, it would register as com6 (at least this is the
sort of behavior that I saw).  I dealt with this programmatically by
enumerating over the available serial ports and checking if the device
on the current port was the device of interest.

I also used rxtx to do communications when running linux and did not
have any problems using an adapter.

Good luck,
p
yakka - 08 Aug 2006 10:06 GMT
PaullyB yazdi:
> > Hi there,
> >
[quoted text clipped - 29 lines]
> Good luck,
> p

Thank you very much for your help, I am a beginner in java and trying
to learn it from books, so it is very nice to get help from experienced
programmers.

                 Yalçin Öksüz


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.