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

Michael 'Mickey' Lauer mickey at
Thu Oct 18 10:36:24 CEST 2007

Mike (mwester) wrote:
> ...
>> 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.

I agree. However I think even more important for stability would be to revamp the
main loop to deal with the modem in a synchronous way.


Michael 'Mickey' Lauer | IT-Freelancer |

More information about the gsmd-devel mailing list