Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > using javax.comm with usb-serial port adapter

Reply
Thread Tools

using javax.comm with usb-serial port adapter

 
 
yakka
Guest
Posts: n/a
 
      08-07-2006
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

 
Reply With Quote
 
 
 
 
PaullyB
Guest
Posts: n/a
 
      08-07-2006
yakka wrote:
> 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



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

 
Reply With Quote
 
 
 
 
yakka
Guest
Posts: n/a
 
      08-08-2006

PaullyB yazdi:
> yakka wrote:
> > 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

>
>
> 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



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

 
Reply With Quote
 
jc9121 jc9121 is offline
Junior Member
Join Date: Aug 2006
Posts: 1
 
      08-17-2006
Hi Paully B.
Thanks for the info!

jc
 

Last edited by jc9121; 01-01-2011 at 05:12 PM..
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Cisco 1-Port 10 Gigabit Ethernet LAN/WAN-PHY Shared Port Adapter flamer die.spam@hotmail.com Cisco 1 03-09-2010 09:27 PM
Re: Cisco 1-Port 10 Gigabit Ethernet LAN/WAN-PHY Shared Port Adapter bod43 Cisco 0 03-09-2010 03:12 AM
ExpressCard wireless adapter vs PC card wireless adapter =?Utf-8?B?a2V2aW5sYQ==?= Wireless Networking 6 12-21-2008 08:18 PM
2-FXS VoIP adapter versus 2-port FXO VoIP adapter? GS VOIP 5 04-19-2007 07:45 AM
Wireless Notebook Adapter - Linksys PCMCIA adapter Error Exception E06D7363 pattyjamas@hotmail.com Wireless Networking 0 02-21-2005 07:05 PM



Advertisments