openmoko u-boot now has gsm passthrough !

Harald Welte laforge at
Sat Sep 1 19:46:21 CEST 2007


Friday evening I was able to resolve the bogus character / transmission
errors in u-boot's ttyacm code.  Friday night I implemented multi-serial
support for s3c24xx in u-boot as well as a fairly generic 'terminal
program' inside u-boot.  Today (well, Saturday) I was able to get it
working, first on GTA02, then later on GTA01.

The latter is much more difficult due to the multiplexed debug port.

In any case, this is how it works:

1) the s3c24xx serial driver now exports all three serial ports as
   s3ser0..2, see:

GTA01Bv4 # coninfo
List of available devices:
vga      80000002 S.O 
serial   80000003 SIO 
nulldev  80000003 SIO 
s3ser2   00000003 .IO 
s3ser1   00000003 .IO 
s3ser0   00000003 .IO 
usbtty   00000003 .IO stdin stdout stderr 

'serial' is actually a u-boot default alias for s3ser0.

2) there now is a generic terminal command called 'terminal'.  You have
to specify which console device you want to access, e.g.

GTA01Bv4 # terminal s3ser0
switching s3ser0 from console into GSM mode
Entering terminal mode for port serial
Use '~.' to leave the terminal and get back to u-boot

As the message states, you can leave the terminal program by pressing
'~' followed by '.'  This was inspired by the good old 'cu' program of
taylor UUCP which I've been using for a long, long time.  Unlike cu
however, there is no timeout, and you don't have to pres CR before
typing the tilde (~).

3) in order to power up the GSM modem, you will need to issue the new
   "neo1973 gsm on" command.  You can power it off using "neo1973 gsm off" 

Now how do you get passthrough mode?  Well, in good old unix philosophy,
we offer a toolbox.  So if you run a terminal program such as minicom on
your PC and attach it to /dev/ttyACM0, then you will need an init string
that enables the GSM Modem and switches into terminal mode.  After that,
your PC terminal program is connected straight to the GSM modem!

In fact, beceause this implementation is based around the u-boot console
device switch, we can do other funny applications with it.  You can also
have a "GPS passthrough" if you use s3ser1 instead of 0.

It's actually even more fun: You can theoretically first use the
'terminal' command to register to the network and establish a CSD call.
Then you can exit the terminal program and use 'setenv stdout s3ser0'
and 'setenv stdin s3ser0' to connect u-boot's command line interface to
the CSD call.  In the end, you should be able to access the u-boot
command line via the GSM network.  Not that this has any practical use.
But I think it's incrediby cool ;)

Please note that on GTA01, you can only use the terminal emulator for
the GSM modem if your u-boot commandline stdin/stdout/stderr is
configured on some serial port != serial and != s3ser0.  So if you
access the u-boot command line via usbtty, then it should just work

There are OM2007.1 u-boot builds with the current SVN head (2887)
available at;O=D

I've did some basic testing on GTA01Bv4, GTA02v1 and GTA02v2.  Didn't
have time to look at GTA01Bv3 for those who still have that first public
hardware version.

In any case, all those features are inredibly new and untested.  
"May contain traces of bugs"

Happy hacking.  And please put some of your exploration results into the
wiki.  I've started a bit at

- Harald Welte <laforge at>         
Software for the world's first truly open Free Software mobile phone

More information about the openmoko-uboot mailing list