lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Asko,

Please send me a copy too.

Thanks!
xu

2008/6/23 Asko Kauppi <askok@dnainternet.net>

Matthew Paul Del Buono kirjoitti 22.6.2008 kello 16:41:



The devil is in the details of port and driver configuration.
Windows provides a rococo collection of capabilities for a basic
RS-232 UART. If it thinks it the port might really be a modem, or
if the port itself has a dedicated "provider", then things can
get even more complex quite quickly. For a real fun read, track
down the documentation on establishing a data call under the
Windows Telephony API and try to make sense of it. Hand coding a
send/expect module to dial the phone with classic Hayes AT
commands (even after handling all the phone-line errors like no
answer, wrong number, a FAX answered instead of a data modem,
etc.) looks quite pleasant after that...


That's curious -- I've never had such an issue before so long as I built the DCB correctly and called SetCommState(). But you may know something I don't.

In any case, good luck :) My recommendation is just to keep in mind that you may want to port this later, so when you're coding things, keep in the back of your head "How might I be able to easily port this later?" when you write a function, etc.

-- Matthew P. Del Buono

For a ported serial module, see:

http://lua-users.org/lists/lua-l/2007-09/msg00465.html

Stefan's link seems to be down, has anyone have a more recent URL?

If needed, one can get the code from me (I haven't used it in few years, though).  Would be pleasant for someone to make it a Rock.

-asko