Serial adapters: Difference between revisions

From OLPC
Jump to navigation Jump to search
Line 12: Line 12:
The new adapters are able to do TTL<->RS232, TTL<->USB, and RS232<->USB. In the RS232 modes they are able to work with both straight and NULL modem cables. Because of this they are a bit more complicated than the ATest adapters.
The new adapters are able to do TTL<->RS232, TTL<->USB, and RS232<->USB. In the RS232 modes they are able to work with both straight and NULL modem cables. Because of this they are a bit more complicated than the ATest adapters.


This complexity is in the form of 2 jumper blocks on the adapters. Blocks J4 and J6.
This complexity is in the form of 2 jumper blocks on the adapters. Blocks '''J4''' and '''J6'''.


=== J4: Mode select block ===
=== J4: Mode select block ===
J4 selects between the 3 modes of operation.
'''J4''' selects between the 3 modes of operation.


Mode 1: TTL<->USB
Mode 1: TTL<->USB
Line 28: Line 28:
=== J6: Null Modem block ===
=== J6: Null Modem block ===


[[Image:serialadapter_top.jpg|thumb|New Serial Adapter]]In the RS232 modes 2 & 3, J6 will swap the TX and RX lines. Normally changing these jumpers is not necessary.
[[Image:serialadapter_top.jpg|thumb|New Serial Adapter]]In the RS232 modes 2 & 3, '''J6''' will swap the TX and RX lines. Normally changing these jumpers is not necessary.
* RS232 NULL Modem: 1&2, 5&6
* RS232 NULL Modem: 1&2, 5&6
* RS232 Normal: 3&4, 7&8
* RS232 Normal: 3&4, 7&8
Line 34: Line 34:
To make the adapter appear like a serial port you would find on a PC you would use normal wiring. Connection between the adapter and the PC would use a NULL modem or crossover cable. Just like you would use if you were connecting 2 PC's to each other.
To make the adapter appear like a serial port you would find on a PC you would use normal wiring. Connection between the adapter and the PC would use a NULL modem or crossover cable. Just like you would use if you were connecting 2 PC's to each other.


If you are using a serial cable that is wired to be straight thru then you would use NULL modem wiring.
If you are using a serial cable that is wired to be straight through then you would use NULL modem wiring.


If you are using Mode 1 then the settings for J6 do not make any difference because the DB9 is not used.
If you are using Mode 1 then the settings for '''J6''' do not make any difference because the '''DB9''' is not used.


=== Schematics and Board Layout ===
=== Schematics and Board Layout ===

Revision as of 23:56, 23 October 2007

  This page is monitored by the OLPC team.

This page contains information about a +3.3V serial/RS-232/USB adapter that is used in low level laptop development.

Hardware

OLPC has two different serial adapters for obtaining serial output from the laptop: the original +3.3V serial/RS-232 level converter that came with the ´´ATest´´ boards, and a new multi-purpose serial adapter which supports +3.3V serial to RS-232 or USB.

Multipurpose Serial Adapter

New Serial Adapter


The new adapters are able to do TTL<->RS232, TTL<->USB, and RS232<->USB. In the RS232 modes they are able to work with both straight and NULL modem cables. Because of this they are a bit more complicated than the ATest adapters.

This complexity is in the form of 2 jumper blocks on the adapters. Blocks J4 and J6.

J4: Mode select block

J4 selects between the 3 modes of operation.

Mode 1: TTL<->USB

  • Jumper 1&2, 5&6

Mode 2: RS232<->USB

  • Jumper 3&4, 7&8

Mode 3: TTL<->RS232

  • Jumper 2&4, 6&8

J6: Null Modem block

New Serial Adapter

In the RS232 modes 2 & 3, J6 will swap the TX and RX lines. Normally changing these jumpers is not necessary.

  • RS232 NULL Modem: 1&2, 5&6
  • RS232 Normal: 3&4, 7&8

To make the adapter appear like a serial port you would find on a PC you would use normal wiring. Connection between the adapter and the PC would use a NULL modem or crossover cable. Just like you would use if you were connecting 2 PC's to each other.

If you are using a serial cable that is wired to be straight through then you would use NULL modem wiring.

If you are using Mode 1 then the settings for J6 do not make any difference because the DB9 is not used.

Schematics and Board Layout

Media:OLPC_serial.pdf
Media:OLPC_serial_layout.pdf

Original Serial Adapter

The original adapter that came with the ´´ATest´´ boards

Original Serial Adapter

was very simple and only does +3.3V serial to RS232 voltage level conversion.

The XO laptop has two serial ports provided for low level debugging. One (J1) is connected to the serial console on the main processor (Southbridge, actually). The second (CN24) is connected directly to the embedded controller on the motherboard.

The pinout of the serial connection on the laptop is:

  1. +3.3V is provided by the laptop on this pin, for use by the serial adapter
  2. TX serial data
  3. RX serial data
  4. GND return for both data and power

In addition, the EC serial connector (CN24) has an additional pin (5), used to provide a clock for programming the serial ROM in recovery mode. This pin expects a +3.3V compatible 65 MHz clock signal, if used. The EC serial port may be used for monitoring by connecting a laptop/serial adapter cable to the first four pins of the connector.

Software

The TTL<->USB chip is a a FT232R made by FTDI and has drivers for all major operating systems. On Windows it will show up as a COMn device and on Linux as a /dev/ttyUSBn device. Where 'n' is a number. On PC systems this will usually start with COM5 and on Linux ttyUSB0. Need some MacOS user to fill in how serial ports work on a Mac

Drivers

Windows and MacOs

Linux

  • The ftdi driver is included the 2.6.x series of kernels and is included by most distributions plug it in and it should just "work".

Flow Control

In the USB modes the hardware flow control pins are wired so that they are de-asserted. Therefore the hardware flow control setting does not matter. The RS232 flow control lines on the DB9 were left unconnected and can float such that the flow control is asserted. So in RS232 modes hardware flow control must be disabled.

Quirks and Known Problems

Conflict with Braille TTY (brltty) software

Ubuntu distros come with the brltty package installed. This package conflicts with using the device as a plain serial port. Upon insertion the brltty driver takes over the device and disconnects the /dev/ttyUSBn device. The solution to this is to remove or disable the brltty package. On Ubuntu you can do this with

sudo apt-get remove brltty