lua-users home
lua-l archive

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


Hello!

Thanks for all your replies.


On Sat, Mar 30, 2013 at 7:44 PM, Petr Štetiar <ynezz@true.cz> wrote:
Helen Fornazier <helen@wizzilab.com> [2013-03-29 18:45:24]:

Hi,

> 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

You need to set include and lib paths also, something like:

CPPFLAGS='-I/opt/devel/openwrt.git/staging_dir/target-arm_v4t_uClibc-0.9.33.2_eabi/usr/include' \
LDFLAGS='-L/opt/devel/openwrt.git/staging_dir/target-arm_v4t_uClibc-0.9.33.2_eabi/usr/lib' \
./configure ...

Here's package for the OpenWRT:

        https://github.com/ynezz/openwrt/commit/d6b27eb64e3ac380cd5e6752b12f431cc8627194

Thank you, I didn't had the time to retry yet but when I do I'll tell you the results.
 

> 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.

Yes, exactly.

-- ynezz





> Hi Helen,
>
> You didn't say what OS, but I'm betting it's Linux, because that's the
> default way all Linux reads act. Here's the way I switched the keyboard
> (stdin) to read a character at a time:
>
> ==========================================
> function getch_unix()
>         os.execute("stty cbreak </dev/tty >/dev/tty 2>&1")
>         local key = io.read(1)
>         os.execute("stty -cbreak </dev/tty >/dev/tty 2>&1");
>         return(key);
> end
> ==========================================
>
> So in your case, instead of doing the stty commands and read on file
> number 1, you'll do it on the file number for your serial port. And you
> might need to change /dev/tty to whatever device the serial port is.

Hi Steve,

I am using Linux OpenWRT. Thanks for your reply, I'll try your solution when I have more time. For instance I am using ser2net and it is working really well.

>
> There's a BSD style one that's a little different, so if mine doesn't
> work I'll try to dig that up for you.
>
> HTH,
>
> SteveT

Helen Fornazier