OpenWrt Forum Archive

Topic: Fonera 2100 serial console need urgent help

The content of this topic has been archived between 26 Mar 2018 and 27 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hey there

i'm make a project using Fonera 2100 to connect with my PIC16F chip
so i need to disable console at ttyS0 because i need that serial port to comunicate with the others chips
i searched tons of times at google about that serial console but i don't know how we can disable it

thanks in advance

any help?

Only way is probably disable it in inittab and remove it from kernel config in target/linux/architecture.
In inittab try remove:

ttyS0::askfirst:/bin/ash --login

In kernel config:

CONFIG_CMDLINE="rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200"
replace with:
CONFIG_CMDLINE="rootfstype=squashfs,yaffs,jffs2 noinitrd"

how i disable it on kernel? i need to compile all again? thx

I don't know other way. You must recompile kernel again.

can you post all steps i need to do? because i'm new on linux and in this things :S sorry

This will be very dificult because you must know how to compile programs in linux.
I look for info about fonera and I found firmware use serial console to display info about boot process,
then maybe disabling serial console doesn't help.
Mayby only thing you will need is disable shell on /etc/inittab as I post in previous post.
info about fonera:
http://nuwiki.openwrt.org/toh/fon/fonera
http://wiki.cuwin.net/index.php?title=F … th_OpenWRT

(Last edited by jaro on 31 Mar 2010, 15:21)

i already tried that on inittab commenting ttyS0 line but when i need to run any program using serial port it says it is busy sad maybe i need to compile kernel with that 2 things


by the way i already know how to compile kernel, i already was at command: make menuconfig, but i didn't saw any option to disable console so i posted here how to disable serial console smile

(Last edited by pedrodv on 31 Mar 2010, 16:15)

pedrodv wrote:

can you post all steps i need to do?

Take a look here.

Ok, try edit file in build host
If fonera is Atheros AR231x/AR5312 architecture then edit trunk/target/linux/atheros/config-2.6.30 and change:

CONFIG_CMDLINE="console=ttyS0,9600 rootfstype=squashfs,jffs2"

to:

CONFIG_CMDLINE="rootfstype=squashfs,jffs2"

so for compiling that we need to download the source code, last time i tried i downloaded it from http://downloads.openwrt.org/kamikaze/8 … ce.tar.bz2 i downloaded it from the right place?

\8.09.2\target\linux\atheros\config-default:

CONFIG_CMDLINE="console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit"

i need to change to:

CONFIG_CMDLINE="rootfstype=squashfs,jffs2 init=/etc/preinit" ? thx

(Last edited by pedrodv on 31 Mar 2010, 16:43)

Yes, try this. Kamikaze 8.09.2 is last stable version.
I use trunk  - development version from svn.
But I think disabling console doesn't help and problem is probably something else.

(Last edited by jaro on 31 Mar 2010, 17:28)

well i can give you the site for more information, i already compile some software with sdk but only with tutorials lol http://www.jbprojects.net/projects/wifirobot/
the use 2 serial ports, one for console and another for the program carserver so i though if we disable console on ttyS0 we can use ttyS0 to that program, i already have stty and setserial.
thanks for the help and sorry if i'm to novice in this tinhgs :S

what aditional packages i need to compile the same software as aheros? like with luci, all that options...

(Last edited by pedrodv on 31 Mar 2010, 17:59)

I look at source of carserver.c. It has hardcoded tts/1 serial device in it. Did you change it to /dev/ttyS0 or /dev/tts/0?

yes i already changed it but when i press FORWARD my forward testing LED doesnt work :S
thats why i thought i need to disable serial console maybe doing some conflicts

(Last edited by pedrodv on 1 Apr 2010, 01:30)

any news? thx

to compile kernel with extra packages we can just put xxx.ipk package on /packages and then select them on make menuconfig?

Maybe someone knows how to compile a unique busybox with setconsole enabled for Atheros based routers and run
$> mknod -m 622 /dev/tty0 c 4 0
$> ./busybox setconsole /dev/tty0

Check the following link. There's a working busybox with setconsole and stty enabled for Broadcom based routers.
DD-WRT Forum :: View topic - Turn off serial console, stty

And try these,
OpenWrt / Serial dev/tts/0
OpenWrt / Fonera I/O?
OpenWrt / Use of /dev/tts/0

And there's a good reason to do this,
OpenWrt / Serial port
to turn FON2200 into a cheap ethernet to RS232 converter.

Edit:
I just read that kernel messages are still sent out to serial console so re-compiling might be necessary.
OpenWrt / disable serial console completely

Or try the Firmware Modification Kit.

Note that even you can unbind /dev/ttyS0 from console, the Redboot/CFE messages are still sent out to console.

/src/linux/danube/linux-2.6.23/Documentation/serial-console.txt - DD-WRT - Trac
/src/linux/danube/linux-2.6.23/Documentation/networking/netconsole.txt - DD-WRT - Trac

(Last edited by fyi on 12 Apr 2010, 10:54)

hum, what do you think about this
compile and change this:

\8.09.2\target\linux\atheros\config-default:

CONFIG_CMDLINE="console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit"

i need to change to:

CONFIG_CMDLINE="rootfstype=squashfs,jffs2 init=/etc/preinit" ?

and that thing on inittab

i used image builder from atheros openwrt, tomorrow i will try with the new kernel

(Last edited by pedrodv on 13 Apr 2010, 23:33)

hey again, i decidec to compile kamikaze but i had one error and dunno what do to :S
i downloaded http://downloads.openwrt.org/kamikaze/8 … ce.tar.bz2
1. changed /target/linux/atheros/config-default
1.1: CONFIG_CMDLINE="console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit" to CONFIG_CMDLINE="rootfstype=squashfs,jffs2 init=/etc/preinit"

2.  ./scripts/feeds update -a
    ./scripts/feeds install webif

3. make menuconfig
3.1 changed target system to atheros 231x/5312
3.2 select all packages by default (y)
3.3 busybox added setconsole and stty

4. make

and after 2 hours (aprox.) i got this error:

make -r world: build failed. Please re-run make with V=99 to see what's going on make: *** [world] Error 1

can any1 help me? :S what i'm doing wrong?

btw i think i got that error after or during compiling iptables, i'm not sure but could be something wrong with iptables thx

(Last edited by pedrodv on 19 Apr 2010, 23:34)

make[1] world
make[2] target/compile
make[3] -C target/linux compile
make[2] package/cleanup
make[2] package/compile
make[3] -C package/base-files compile
make[3] -C package/bridge-utils compile
make[3] -C package/busybox compile
make[3] -C package/dnsmasq compile
make[3] -C package/dropbear compile
make[3] -C package/e2fsprogs compile
make[3] -C package/lua compile
make[3] -C feeds/luci/bitlib compile
make[3] -C feeds/luci/luaposix compile
make[3] -C feeds/packages/libs/libnotimpl compile
make[3] -C package/uci compile
make[3] -C feeds/luci/luci-addons compile
make[3] -C feeds/luci/luasocket compile
make[3] -C feeds/packages/net/olsrd compile
make[3] -C package/iproute2 compile
make[3] -C package/iptables compile
make[3] -C package/firewall compile
make[3] -C package/qos-scripts compile
make[3] -C package/libtool compile
make[3] -C package/libpcap compile
make[3] -C package/zlib compile
make[3] -C feeds/packages/libs/rrdtool-1.0.x compile
make[3] -C feeds/packages/utils/collectd compile
make[3] -C feeds/packages/net/miniupnpd compile
make[3] -C feeds/packages/net/ntpclient compile
make[3] -C feeds/packages/net/ddns-scripts compile
make[3] -C feeds/luci/luci compile
make[3] -C package/ncurses compile
make[3] -C feeds/packages/utils/nano compile
make[3] -C package/openssl compile
make[3] -C package/wireless-tools compile
make[3] -C package/madwifi compile
make[3] -C package/mac80211 compile
make[3] -C package/libnl compile
make[3] -C package/hostapd compile
make[3] -C package/hotplug2 compile
make[3] -C package/kernel compile
make[3] -C package/mmc_over_gpio compile
make[3] -C package/mtd compile
make[3] -C package/linux-atm compile
make[3] -C package/ppp compile
make[3] -C package/udev compile
make[3] -C package/util-linux-ng compile
make[2] package/install
make[3] -C package/base-files install
make[3] -C package/bridge-utils install
make[3] -C package/busybox install
make[3] -C package/dnsmasq install
make[3] -C package/dropbear install
make[3] -C package/e2fsprogs install
make[3] -C feeds/luci/bitlib install
make[3] -C feeds/luci/luaposix install
make[3] -C feeds/luci/luci install
make[3] -C feeds/luci/luci-addons install
make[3] -C feeds/packages/net/ddns-scripts install
make[3] -C feeds/packages/utils/nano install
make[3] -C feeds/packages/net/ntpclient install
make[3] -C package/firewall install
make[3] -C package/hostapd install
make[3] -C package/hotplug2 install
make[3] -C package/iproute2 install
make[3] -C package/iptables install

make -r world: build failed. Please re-run make with V=99 to see what's going on make: *** [world] Error 1

i got this

by the way i'm compiling with make V=99 to see more detailed error, can any1 help me in this problem?

(Last edited by pedrodv on 20 Apr 2010, 13:08)

ok i compiled it successfully.
When i tested it serial port was (again) busy :S

i dont know what to do now :S

pedrodv wrote:

how he decompressed lzma file to chage console= null?

Do you mean "LZMA SDK from 7zip?"

(Last edited by fyi on 20 Apr 2010, 23:17)