Hi

On 03/01/2010 07:22 PM, 白い熊 wrote:
Marius Vollmer<[email protected]>  writes:
Ahh, tough.  Maybe you can wrap pnatd somehow so that the sub-process
that Emacs sees does only exit at the very end.

Yeah, the problem is that the only solution of this sort, I've found is
just init pnatd, wait half a second, send one AT command, wait half a
second etc. After the SMS dispatch, wait 10 seconds, then kill the pnatd
process.

Personally, I don't like this way.

But one should be able to do something of this sort in Emacs.

I considered running pnatd without a filter, just outputting its feed to
a buffer. Then at periodic intervals process whether the buffer has been
updated, tail the buffer's contents and check for an error or OK. But
this still requires some looping sleep-for periods etc.

Could the solution be via Transaction Queues? Never used those, but it
seems that queueing the AT commands could be the way to go, I'm just
thinking it might rest on the same problem, i.e. the process feedback
would only update and give hints to the transaction queue after the
process end. Trying to study now, how these Transaction Queues work...

I would like an alternative way which is to use Bluetooth DUN profile (or call dbus org.bluez.Serial.Connect method) to expose the modem as a TTY port. Then you could talk it with minicom or your program through AT command. Mine would be:

        rfcomm bind 0 00:BD:3A:D4:4E:53 1

You can take a look at oFono[1] (it's GPLed) source ofono/gatchat/gatchat.c. It implements the transaction with the TTY port which you want to talk.

[1] git://git.kernel.org/pub/scm/network/ofono/ofono.git
_______________________________________________
maemo-developers mailing list
[email protected]
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to