Turn off serial console, stty

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2  Next
Author Message
adex
DD-WRT Novice


Joined: 25 Feb 2008
Posts: 2

PostPosted: Mon Feb 25, 2008 20:27    Post subject: Turn off serial console, stty Reply with quote
Hello,

I have Linksys WRT54G V2 router. Can I detach SERIAL PORT 0 (/dev/tts/0) from Console (ash/BusyBox) in DDWRT (in OpenWrt I can detach with inittab)? And also is there any DD-WRT compilation wich have working STTY command? In DDWRT v23 I have error: can't resolve: 'setlocale' command when running STTY.

Cheers
Adex
Sponsor
adex
DD-WRT Novice


Joined: 25 Feb 2008
Posts: 2

PostPosted: Tue Feb 26, 2008 5:44    Post subject: Reply with quote
No one know how to do it???
dylpkls91
DD-WRT Novice


Joined: 18 May 2008
Posts: 17

PostPosted: Wed Jun 11, 2008 2:16    Post subject: Reply with quote
I am looking for an answer on how to detach the console from the serial port too.

As for your stty issue, after previously researching stty's availability in DD-WRT I found that the latest release of DD-WRT that still includes stty is v24 RC3. I have been using the Fonera-specific version however, so your results may be different.

Hope that helps,
Dylan V
cthulhufhtagn
DD-WRT Novice


Joined: 05 Aug 2008
Posts: 2

PostPosted: Tue Aug 05, 2008 20:14    Post subject: Reply with quote
I'm also interested in detaching the console from the serial port.

Regards!
jrodgers
DD-WRT Novice


Joined: 21 Oct 2008
Posts: 6

PostPosted: Tue Oct 21, 2008 15:35    Post subject: Reply with quote
I need to detach the serial from the console too. I came across the busybox app setconsole, but it's not included in DD-WRT. Anyone know how to compile this for us? It can be used like this:

$>setconsole /dev/null

to redirect kernel output.
soulstace
DD-WRT Guru


Joined: 04 Aug 2007
Posts: 6427

PostPosted: Tue Oct 21, 2008 16:19    Post subject: Reply with quote
Yes I compiled it for you, but it doesn't work

I wrote:
I compiled a version of busybox with setconsole, but dd-wrt doesn't allow setting it to /dev/null

Code:

root@DD-WRT:~# wget http://192.168.1.10/busybox
Connecting to 192.168.1.10 (192.168.1.10:80)
busybox 100% |*******************************| 755k 00:00:00 ETA
root@DD-WRT:~# chmod +x ./busybox
root@DD-WRT:~# ./busybox setconsole /dev/null
setconsole: TIOCCONS: Inappropriate ioctl for device
root@DD-WRT:~#


Any other ideas?

BTW I have stty compiled too. But can it even be used for this purpose?

Code:

root@DD-WRT:~# ./busybox stty
speed 38400 baud;
-brkint -imaxbel
tab3
root@DD-WRT:~# ./busybox stty --help

Usage: stty [-a|g] [-F DEVICE] [SETTING]...

Without arguments, prints baud rate, line discipline,
and deviations from stty sane.

Options:
        -F DEVICE       open device instead of stdin
        -a              print all current settings in human-readable form
        -g              print in stty-readable form
        [SETTING]       see manpage

root@DD-WRT:~#
switch
DD-WRT Guru


Joined: 30 Apr 2008
Posts: 967
Location: Romania

PostPosted: Tue Oct 21, 2008 20:15    Post subject: Reply with quote
Has anyone tried the optware-based busybox?
_________________
Q: How do I do ...? A: Read the tutorials or Search forums
jrodgers
DD-WRT Novice


Joined: 21 Oct 2008
Posts: 6

PostPosted: Tue Oct 21, 2008 22:31    Post subject: Reply with quote
Can you set it to /dev/ttyS1

Apparently on my router (Buffalo WHR-G125) there are 2 serial ports, but only one is brought out to pins on the PCB (ttyS0). So if I can redirect the console there it would hopefully free up ttyS0.

Also, can you please attach the binary for setconsole so I can download it?

Thanks in advance Smile
soulstace
DD-WRT Guru


Joined: 04 Aug 2007
Posts: 6427

PostPosted: Wed Oct 22, 2008 1:46    Post subject: Reply with quote
give it a shot

Edit:
updated to Busybox 1.13.0
stripped useless commands
added tty and cttyhack



busybox-stty-setconsole.zip
 Description:
busybox binary including stty and setconsole

Download
 Filename:  busybox-stty-setconsole.zip
 Filesize:  37.8 KB
 Downloaded:  3045 Time(s)

cthulhufhtagn
DD-WRT Novice


Joined: 05 Aug 2008
Posts: 2

PostPosted: Wed Feb 25, 2009 12:36    Post subject: Reply with quote
Has anyone managed to detach it? I haven't tried it yet, but thanks either way, soulstace Smile
turkey
DD-WRT Novice


Joined: 13 Nov 2007
Posts: 31

PostPosted: Sat Jan 16, 2010 22:15    Post subject: Reply with quote
I'd like to confirm that the attached busybox includes setserial, and i was able to detach the console from /dev/ttyS0.

I used this command:
./busybox setconsole /dev/tts/1

Thanks soulstace!!!!
Ingo Seidel
DD-WRT Novice


Joined: 19 Jan 2010
Posts: 1

PostPosted: Tue Jan 19, 2010 19:37    Post subject: Reply with quote
Turkey,

how exactly did you do it?
TIA,

Ingo
turkey
DD-WRT Novice


Joined: 13 Nov 2007
Posts: 31

PostPosted: Fri Apr 30, 2010 1:05    Post subject: Reply with quote
Ingo Seidel wrote:
Turkey,
how exactly did you do it?


sorry, i lost track of this thread...

I dropped the busybox in this thread in my jffs directory, and ran the command I mentioned above, which puts the console on /dev/tts/1 instead of /dev/tts/0

Now you can use /dev/tts/0 for serial communications.

I never know how detailed to be in my explanations here since some folks have no idea and some people are old hats, so let me know if you need more detail.
jasonchansouth
DD-WRT Novice


Joined: 28 Apr 2010
Posts: 1

PostPosted: Fri Apr 30, 2010 6:00    Post subject: Reply with quote
Thanks Turkey.

I did tried to put the busybox into my Asus using wget, after giving permission to run (chmod), I can do the setconsole to /dev/tts/1, however, I still failed to read anything from /dev/tts/0 (or which command you used to read data?). TX is always working even without setconsole to /dev/tts/1

Is that mandatory to put the new busybox into jffs?

And if it is hardware or DDWRT version specific?
FYI, I am using dd-wrt.v24-13577_NEWD_mini_usb_ftp.bin on WL520gu.

Thanks for advice.
turkey
DD-WRT Novice


Joined: 13 Nov 2007
Posts: 31

PostPosted: Fri Apr 30, 2010 11:43    Post subject: Reply with quote
Sounds like you're having a problem reading from the serial port. I'm not the right person to help you with that... Why don't you google 'linux shell serial read'

Sorry!
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum