9 pin to usb adapter

pcatterall

Well-Known Member
Joined
2 Aug 2004
Messages
5,506
Location
Home East Lancashire boat Spain
Visit site
I asked recently about getting my AIS to work with a new laptop. The original set up used a laptop which had a 9 pin connector which was not fitted to the 'new' laptop.
Advice from the forum ( and the manual when I got my hands on it) was to use an adapter
( about £20 from NASA or £3 on ebay) I went for the ebay option which arrived today. With the adapter is a driver. What does the driver actually do? I note that the cable has a 9 pin end but looking into the usb end can only see 4 connectors.
Can someone explain what goes on here. There are probably some other numpties like me who may learn something useful from a simple explanation!!
 
PCatterall,

Does your adapter look like this ?

http://www.google.co.uk/products/ca...a=X&ei=XZKqT9PJGILpOauZmOkM&ved=0CKIBEPMCMAA#

Your old latop had a serial port (also known as RS232)

The adapter allows you to connect to your new laptop (without a serial port) via the usb connection.

Depending on which version of windows you are using will depend whether a separate driver is needed. The older the version, the more likely.

Plug the USB end of the adapter into the laptop and the AIS devise into the 9pin connector on the other end of the adapter. If a driver is required, windows will ask for it.
 
Last edited:
RS232 (your "nine pin") and USB have nothing in common electrically, so peering at the number of conductors is a complete red herring.

RS232 dates back to the late sixties or thereabouts, and uses a simple protocol with patterns of +12v and -12v to signal letters in a fashion not totally dissimilar to morse code. There's one wire doing this in each direction, plus a ground wire for reference. The other six originally controlled things like hanging up the telephone connected to your mainframe computer, or telling the other end to wait while it processed the data. Those extra wires are more or less obsolete now but hang around for compatibility with various improvised uses that were made of them over the years (like sucking power from the signalling wires to run small circuits).

USB is a much more modern system, looking more like a network than a simple point-to-point connection. There's a packet-switching protocol going on, under the control of the master station on the bus which lives at the root of the tree of devices (you can have up to 127 devices in the tree, and the original wiring scheme ensured you could only plug things together in a valid topology, though dodgy Chinese adaptors have reduced the reliability of that assertion to some extent). Each station on the bus has a unique ID so that messages for it can be sent to it alone, and messages from it can be identified. The actual electrical connectors consist of two data wires (bi-directional) and two power wires designed from the start to power the kind of small devices that used to improvise a power supply from spare signalling wires in serial or parallel connection.

The "adapter" you have is actually a complete RS232 serial port that provides one side of the old sixties serial connection. Driver software on the computer pretends that this serial port is part of the computer just like the operating system was used to dealing with when they were built in. The driver uses the USB connection to talk to the actual hardware in the box at the end of the cable; the higher levels of the operating system don't know about this and just see it as a normal serial port.

The driver that does this fakery might come with the adaptor, or it might well be already part of the computer's OS. They'll include the CD just in case you have an old system that doesn't already know about these things, but chances are you won't need it. It's usually simpler if you can avoid using third-party drivers like this.

There's a lot more going on in that cheap little box than just a dumb adaptor from one type of plug to the other :)

Pete
 
I note that the cable has a 9 pin end but looking into the usb end can only see 4 connectors.
Can someone explain what goes on here. There are probably some other numpties like me who may learn something useful from a simple explanation!!

I can't give you a wire to wire breakdown but essentially, if you broke into your 9 pin plug you would almost certainly find that only 3 or 4 pins are actually connected. Certainly only, IRC, 3 or 4 are actually in use.
 
RS232 (your "nine pin") and USB have nothing in common electrically, so peering at the number of conductors is a complete red herring.

RS232 dates back to the late sixties or thereabouts, and uses a simple protocol with patterns of +12v and -12v to signal letters in a fashion not totally dissimilar to morse code. There's one wire doing this in each direction, plus a ground wire for reference. The other six originally controlled things like hanging up the telephone connected to your mainframe computer, or telling the other end to wait while it processed the data. Those extra wires are more or less obsolete now but hang around for compatibility with various improvised uses that were made of them over the years (like sucking power from the signalling wires to run small circuits).

USB is a much more modern system, looking more like a network than a simple point-to-point connection. There's a packet-switching protocol going on, under the control of the master station on the bus which lives at the root of the tree of devices (you can have up to 127 devices in the tree, and the original wiring scheme ensured you could only plug things together in a valid topology, though dodgy Chinese adaptors have reduced the reliability of that assertion to some extent). Each station on the bus has a unique ID so that messages for it can be sent to it alone, and messages from it can be identified. The actual electrical connectors consist of two data wires (bi-directional) and two power wires designed from the start to power the kind of small devices that used to improvise a power supply from spare signalling wires in serial or parallel connection.

The "adapter" you have is actually a complete RS232 serial port that provides one side of the old sixties serial connection. Driver software on the computer pretends that this serial port is part of the computer just like the operating system was used to dealing with when they were built in. The driver uses the USB connection to talk to the actual hardware in the box at the end of the cable; the higher levels of the operating system don't know about this and just see it as a normal serial port.

The driver that does this fakery might come with the adaptor, or it might well be already part of the computer's OS. They'll include the CD just in case you have an old system that doesn't already know about these things, but chances are you won't need it. It's usually simpler if you can avoid using third-party drivers like this.

There's a lot more going on in that cheap little box than just a dumb adaptor from one type of plug to the other :)

Pete

thanks for that, will old ones work with win7 or is it still plug and pray
 
Me too

Prior to buying it I had a cable but no driver and it wasn't recognised.

10 mins after installing the driver I was sitting on my boat watching boats on my XP as they wandered up and down The Solent. :)
 
thanks for that, will old ones work with win7 or is it still plug and pray

The last version of Windows I used in anger ( :) ) was Windows ME, so I'm not really the person to ask about practical questions with modern-day Windows.

(I use a Mac at home and Linux at work.)

Pete
 
I've recently bought one (for XP) for 2.40!

I have the same one, and yes, most seem to work with no difficulties these days. In the past some of the drivers were notoriously difficult to set up, and I even have one device which will pass most AIS data....but not the longer AIS sentences containing ship's name/destination/etc. (probably due to a buffer size limitation; or speed;etc ... couldn't be bothered to investigate further).
 
RS232 had a number of configs but the basic was earth (pins 1 and,or 7 IIRC) and a transmit and receive wires (on pins 2 and 3). Gets a bit sexier with CTS (clear to send) and RTS (request to send) data logic providing additional control and 2 other lines saying "hi, I'm here and ready" (DTE and DTR). 2 different plugs were used; 9pin and 25pin.
Don't get me started on HPGPIB (general purpose interface bus) and how that worked :-)
 
The last version of Windows I used in anger ( :) ) was Windows ME,

Anger is certainly the correct word for than O/S. :( In contrast I have never been able to fault XP (Prof). I bought a copy of 7 because of a terrific pre-release offer but it is still sitting in its cellophane wrapper, so can't comment. Odd the way Windows lurches from great-to-awfull and back again.
 
Anger is certainly the correct word for than O/S. :( In contrast I have never been able to fault XP (Prof). I bought a copy of 7 because of a terrific pre-release offer but it is still sitting in its cellophane wrapper, so can't comment. Odd the way Windows lurches from great-to-awfull and back again.

i too got a "Special Deal" on 7
cant fault it
install new hardware it goes looking for drivers for you
 
Special thanks prv for that excellent explanation. I need to read it a couple more times to get it properly into the brain. I hope/expect it will be a useful reference to others as well.

:)

The essential point of that post is summed up in the last sentence. The preceding verbiage is just supporting evidence to help get the point across. I find it mildly frustrating when people insist on taking two wildly different digital interfaces (or even one digital and one analogue) and think that if they can only find the right wires to solder together it will somehow magically work. Counting the number of conductors in the respective plugs (as in a couple of places in this thread) is a symptom of this mindset.

Pete
 
:)

The essential point of that post is summed up in the last sentence. The preceding verbiage is just supporting evidence to help get the point across. I find it mildly frustrating when people insist on taking two wildly different digital interfaces (or even one digital and one analogue) and think that if they can only find the right wires to solder together it will somehow magically work. Counting the number of conductors in the respective plugs (as in a couple of places in this thread) is a symptom of this mindset.

Pete

You have just ruined a large number of tv program's and films for everyone! Luckily you didn't rule out making a bomb using Sellotape, cotton wool, a tv remote and a mobile phone though...
 
The "adaptor" is actually a chip that kids your external equipment into thinking it is connected to a normal RS232 interface. This connects to your computer using USB and then the driver in your computer kids your application software that it is connected to an RS232 port. Neither your application software nor the hardware it is communicating with know anything about the USB part of the connection.
 
Luckily you didn't rule out making a bomb using Sellotape, cotton wool, a tv remote and a mobile phone though...

I have twice been accused of making a bomb, once at school, once at work, when I've accidentally left electronic components lying around. Thanks to Hollywood, people's image of a bomb consists mostly of circuitry and flashing lights, instead of the rather more essential component of, erm, explosive.

(There was a guy in my year at school with a tennis-ball-sized lump of plastic explosive in his desk drawer, but that wasn't me.)

Pete
 
I bought a cheap USB to serial adapter a few years ago on Ebay to use my charting software on a new laptop without a serial port, after much faffing around I just couldn't get it to input NMEA to the laptop. The laptop would recognize the device and say it was working OK but nothing. I borrowed another adapter and hey presto nmea input right away. So be wary if you are having any problems, try borrowing one that is known to work if you can't get it set up.
 
I use a lot of these in industrial automation, some of the cheaper ones will just not work and I suspect these are designed for domestic appliances. My first piece of advice is to plug the adapter into your PC first to see if the PC will recognise it. I cant explain why, but if you try it with the equipment also connected a problem will arise. This happened to me on 2 seperate occasions, even uninstalling the adapter afterwards did not help. In any case if you do not get it working, there is a unit available from B&B Electronics that has worked for me in all applications.:)
 
Top