So... I'm totally new to lua and I was able to write a simple program that listen in the foreground for modem_messages and depending on the message, it either responds back or write to a file. Now that I had it working in foreground (using event.pull), I wanted to have it run in driver mode (event.listen). The problem is that now it can't write to the file while in driver mode and I get a "file not found" error if I run.
print(io.open("/tmp/arp.cache", "a"))
Since I also have a message to my assert line, I see that message appended in /tmp/events.log.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
So... I'm totally new to lua and I was able to write a simple program that listen in the foreground for modem_messages and depending on the message, it either responds back or write to a file. Now that I had it working in foreground (using event.pull), I wanted to have it run in driver mode (event.listen). The problem is that now it can't write to the file while in driver mode and I get a "file not found" error if I run.
Since I also have a message to my assert line, I see that message appended in /tmp/events.log.
Driver mode code: http://pastebin.com/bbf9XuXX
Link to post
Share on other sites