gsmd patch, was Re: [patch] modify some functions for phonebook

Mike (mwester) mwester at dls.net
Thu Oct 18 06:21:08 CEST 2007


...
> 8f0be827f5da5c62c64e287a0054d9597b00cee8 makes sure no clients can
> submit their commands through usock before gsmd executes the commands
> from its init sequence. This eliminates a timing issue where
> openmoko-dialer commands (e.g. the antenna power-up, register to
> network) could sometimes be queued before the AT interpreter was
> initialised by gsmd.
>
> I think the proper solution to this is to not fork gsmd into
> background before it is actually ready to accept clients, this should
> remove all timing problems. Optimally the usock socket would be opened
> only after the modem has responded and we have sent the initial
> commands to it. I'm happy to implement this and submit a patch, what
> does everyone think about this approach?

I'm in agreement with this.  I would add that I'd like to see the code that
initializes the serial port support a platform plug-in or something similar.
Specifically, the logic in the /etc/init.d/gsmd startup script should all be
moved into a platform-specific bit of code in the early initialization of
the gsmd process.  This eliminates a nasty race condition we currently have,
will permit us to eliminate the unnecessary delays in both the gsmd startup
script as well as in gsmd itself (we really don't need to wait a full second
just to flush the serial port buffers, not at 115000 baud!), and generally
permit us to deal with the idiosyncracies of the GTA01 platform more
gracefully.

Mike (mwester)




More information about the gsmd-devel mailing list