lua-users home
lua-l archive

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


Dear LUA friends

I am very new in using Lua , and I want to detect incoming calls by
detect the ring on modem connected to PC port COM3 and then run an
application upon detecting that ring


I download the  luars232_v1.0.0-lua_for_windows form
http://github.com/ynezz/librs232/downloads


I connect to COM3 using  hyper-terminal , and when a call came the
word RING in capital letters displayed on the screen every 2 second
till the caller hangup or any one replay


I try to write my code example2.lua file (attached to you) based up on the example.lua file (attached to you) contained in the luars232 packagae  

in each run it gave me the same output which is 
-------------------------------------------------------------------------------

modem ring
OK, port open with values 'device: COM4, baud: 115200, data bits: 8, parity: none, stop bits: 1, flow control: off'


-------------------------------------------------------------------------------
but I want the code to run in a loop and till it find the word RING came , then it will exit the loop and run an application and exit

so how  I can check (read ) the word RING came from the COM3 port

thank you in advance

plz replay me



Attachment: example.lua
Description: Binary data

Attachment: example2.lua
Description: Binary data