XO battery/performance[ Devel Digest, Vol 76, Issue 21]

James Cameron quozl at laptop.org
Wed Jun 13 02:25:50 EDT 2012

On Tue, Jun 12, 2012 at 11:07:44PM -0700, Yioryos Asprobounitis wrote:
> James wrote:
> > Could you please do another test, to verify that screen is not
> > configuring the serial port any differently with or without
> > ,n,8,1.  You don't need to connect the two laptops together, just
> > use the one you use as the serial terminal.? The test uses the
> > stty program to display the serial port configuration.
> Here you are.

Thanks.  Your results prove the ,n,8,1 is ineffective, and it must
have been line noise that caused your unreadable output last time.

> However I need to have the the 2 XOs connected because without it
> /dev/ttyUSB0 does not exist and if I connect just the adapter then
> stty fails with resource busy

stty will fail with device or resource busy if screen is running at
the time that stty is run.  Or, modemmanager may have been trying to
send AT commands to the serial adapter to see if it is a modem.  This
is one reason why I don't like using our OLPC Fedora builds as serial

http://wiki.laptop.org/go/Serial_adapters#Linux has a note about

So it probably wasn't connecting the two laptops that resolved the
device or resource busy error for you.  It was the passing of time,
enough to let modemmanager finish probing.

> $ screen /dev/ttyUSB0 115200
> ********* Today the output was readable! :-? ********

Good.  Therefore the problem was line noise, probably caused by the
contacts bouncing as they were mated, or by an earth loop.

> [olpc at xo-74-39-1a ~]$ screen /dev/ttyUSB0 9600,n,8,1
> ******HERE I get the "questionmark in back diamond" output******

Good.  Totally expected, because the EC would be transmitting at
115200 baud, with the serial adapter configured for 9600 baud, and the
resulting garbage data is translated by Terminal into black diamonds.

(I didn't think to warn you of this, because I had planned that the
tests you did were without any connection between the two laptops.
Thanks for taking the initiative.)

You can reduce the chance of contact noise derailing the transmission
by connecting the two laptops in a specific order:

- shutdown the target laptop,

- remove power cable and batteries from the target laptop,

- connect serial cable between laptops,

- restart screen,

- insert battery into the target laptop, which will start the EC
  running, and data will begin to appear,

- proceed with your test.

This ensures that at the time the contacts are mated, there is no
software reading the data, and no data being transmitted.

James Cameron

More information about the Devel mailing list