That's a fantastic hack! I have just one question, how did you use stty to talk to the serial port with Lua? I have a LEGO Mindstorms set I want to program, and I flashed pbLua on it and am building a little framework to talk to it, but it's having trouble sending lots of text to the serial port (the brick freezes).
What I'm doing is similar to what you are (as far as I know, anyway, I'm pretty new to Lua), which is just opening and writing to the socket. I can get/send text, but I'm wondering if there's some other mysterious setting I need to change for it to work. Also, since this is serial over USB, I'm not sure if it's the same thing at all, actually...
> how did you use stty to talk to the serial port with Lua
The stty being used is the command line program. You can find it on any regular Unix box. It is used to set baud rate, stop bits and similar details, not to do the actual communication which should work just fine once the parameters have been set correctly.
No, I understand that. I'm just unsure whether there's a parameter that can make my terminal hang or whether it's completely irrelevant due to the USB connection.
In my Lua code, for example, I have to pause a bit every line, otherwise it hangs. I'm wondering if that's normal.
What I'm doing is similar to what you are (as far as I know, anyway, I'm pretty new to Lua), which is just opening and writing to the socket. I can get/send text, but I'm wondering if there's some other mysterious setting I need to change for it to work. Also, since this is serial over USB, I'm not sure if it's the same thing at all, actually...