views:

279

answers:

1

I have tried to develop a gsm modem library for handling sms built around system.io.ports.serialport. it does not handle unsolicited responses very well, in particular incomming calls. i resort to sending AT hangup commands for each incoming call, however the unsolicited responses can popup even while you are doing other processing. this makes it quite hard to handle correctly.

Please i welcome your suggestions.

Thanks.

+1  A: 

You probably want a separate thread that acts as a session handler, with a message queue interface towards the rest of your app. It should wait on inputs from either your application (to initiate a session) or your modem (incoming calls). When it's rebuffing an incoming call, session initiation requests from your application can wait.

MSalters