OpenWrt Forum Archive

Topic: serial communication busybox console problem

The content of this topic has been archived on 4 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi, I know this issue has been discussed many times. But I still can't find a solution to my problem.
I have a Fonera 2100 with one serial port and want to communicate with a atmega microcontroller.
I want to have a 2 way communication: Handy -> Fonera -> Atmega -> Fonera -> Handy

The problem is that i want to detach the shell from serial port. I have uncommented the line in /etc/inittab : tts/0::askfirst:/bin/ash –login.
But I still get the message  "Please press Enter to activate this console" and all characters from TX are looped thru RX.

Is it somewhere hardcoded or do I need setserial/stty?

In one direction it works fine with the command: nc -l -p 3333 > /dev/tts/0
So I can Telnet to the port 3333 and everything gets forwarded to the serial port.

But how can I read the bytes from /dev/tts/0 and send them back over WIFI?

Another solution I've read would be to make a shell script and execute it with atmega (because shell is activated). But the atmega would get all sended characters back on RX which is not a good solution for me.

Greetings redreggae

ok...I flashed it with the circuitdb firmware where console output is disabled and setserial and stty installed.
http://www.circuitdb.com/articles/11/5

The only strange thing is in hterm every character from TX comes back to RX. I don't know if it's a hterm local echo problem or a fonera setting.

I've solved the problem.
I had to deactivate the local echo with: stty 9600 -echo < /dev/tts/0

The discussion might have continued from here.