Thank you very much for all of your answers.
I tried to install ynezz/librs232, but when I execute :
> ./configure --build=i686-pc-linux-gnu --host=mips-openwrt-linux-uclibc --target=mips-openwrt-linux-uclibc --prefix=$PWD/dist
I got this message :
configure: WARNING:
*** Lua (>=5.0) headers and/or librairies couldn't be found in your system.
*** Try to install liblua, liblualib and liblua-dev with your software package manager.
*** librs232 will be built without Lua bindings library.
./configure: line 11854: 1: command not found
But I have all this packages installed. Do you know if there is something that I am missing?
I check the configure file, it checks if I have lua in my system,
but as I am cross compiling I think it should just get the headers and
not the compiling flags.
Now I am testing ser2net, it works really well, I tested with telnet. I just have a simple (maybe stupid) question, I am really new in Lua : In my Lua code, when I write:
> require "nixio"
> nixio.connect(localhost, 2001, "inet", "stream")
> so = nixio.connect(localhost, 2001, "inet", "stream")
> print(so)
nixio socket 4
> so.send("test")
stdin:1: bad argument #1 to 'send' (nixio.socket expected, got string)
stack traceback:
[C]: in function 'send'
stdin:1: in main chunk
[C]: ?
>
the variable so is not a nixio.socket ?