Start-up Script not working
Start-up Script not working
Anyone else have issues getting the interface start script to work? Everything works fine when I telnet into router and manually start interface.sh Problem is that when i build the start script and add the link, he unit will not automatically start when powered back on. If I telnet in again, it will start manually just fine.
I created the script exactly like stated by typing "vi /etc/init.d/AVR" and filling in the required info. I then created the link. Is there something else I am missing. The MPD autorun work fine by the way.
Chris
I created the script exactly like stated by typing "vi /etc/init.d/AVR" and filling in the required info. I then created the link. Is there something else I am missing. The MPD autorun work fine by the way.
Chris
Re: Start-up Script not working
Did you get it to work?
What's your /etc/init.d and /etc/rc.d directories look like?
What's your /etc/init.d and /etc/rc.d directories look like?
Re: Start-up Script not working
Check your symbolic links, and check your file permissions. The startup script probably needs to be executable (again, check the file permissions) to work.
Jeff Keyzer
http://mightyohm.com
http://mightyohm.com
Re: Start-up Script not working
I seem to remember that one of the later sections didn't explicitly state that chmod needed to be run on a particular file to make it executable, and it confused me for a little while. Here's the command as used in Part 6 to make the display.sh file executable.
Code: Select all
Be sure to make the script executable by using chmod:
root@OpenWrt:~# chmod ugo+x display.sh
Re: Start-up Script not working
Thanks for the replies. Sorry I am just getting back to responding. Got called out of town the day after posting question.
Jeff - I had failed to make the AVR script executable as you stated. Thanks for the help. Works great now.
Chris
Jeff - I had failed to make the AVR script executable as you stated. Thanks for the help. Works great now.
Chris
Re: Start-up Script not working
i have the same problem too..but i fixed the file permission and its running..
but another problem come..i can't browsing via my pc browser...hmm is there any problem with my config network?
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
but another problem come..i can't browsing via my pc browser...hmm is there any problem with my config network?
Re: Start-up Script not working
Hello,
I noticed that my radio is not playing things after turning power on, and waiting some time for warm-up. I thought, that this is permission problem, but then checked processess list and it looks fine listed mpd and symbolic link to AVR executed and running), so permissions are valid I suppose (checked that with command). Then I played a bit with tuner knob, and saw that it starts to playing things. So it looks like it is not playing until knob is touched from the beginning, after I move tuner knob a bit (even a little) it starts to playing. Anyone noticed similar behaviour? Is there a way to resolve this? Other thing is that radio is played with extremely low volume (even if mpc's volume is set to 80%). I remember that when I was going through each part of tutorial, in part 5 the volume of slay radio was reeeeally high, but now I can hear nearly nothing through headphones. Is there something I can do with that? I'm affraid that audio amplifier that I planned to use would not be happy with such low volume on the input.
anrandap
I noticed that my radio is not playing things after turning power on, and waiting some time for warm-up. I thought, that this is permission problem, but then checked processess list and it looks fine
Code: Select all
ps -ef
Code: Select all
ls -la
anrandap
Re: Start-up Script not working
Just add the following to the start() section of /etc/init.d/mpd
I think the lines were already there in the default file, but commented out.
Code: Select all
mpc volume 100
mpc play
Re: Start-up Script not working
Hello,
Gerben, thanks for the quick response. I was extremely busy last few days and had no time for testing. I've done that today. So.. I had examined /etc/init.d/mpd file and there already was
but I was lack of
line, so I've added it. Unfortunately - it didn't do the job. My radio seems to work as follows
1. It does not work at all - well, actually it works but no audio output is produced (display is fine, air light is ok, I can telnet to the router, I can get http interface - router's web site content, but there is no sound at the output - air light is on, but not blinking so I suppose it is not getting data from online radio stream),
2. It works but with low volume (display is fine, air light is ok, I can telnet to the router, I can get http interface - router's web site content, sound is produced but volume is rather very low - I can hear nearly nothing through headphones),
3. It works fine - volume is high as expected (every other thing is OK too).
I have no idea what makes the difference, I did not change any configuration between switching power ON/OFF. I've noticed that when radio is in state 1, then swithing OFF, turning tuner knob a bit and switching ON makes radio going to state 2. For now, I don't know what is turning my radio to mode 3.
I've some diagnostic data. In state 1:
dmesg
ps -ef
In state 2:
dmesg
ps -ef
In state 3:
dmesg
ps-ef
There is a difference in processess list between state 1 and 2, but there shouldn't be any difference in startup sequence - I have only turned the power switch ON. There is also a difference in VSZ column between state 2 and 3 - virtual memory size occupied by mpd has changed. Size of display2.sh also differs by a few bytes.
I don't think it is permission problem:
Other files content:
display.sh
display2.sh
interface.sh
network interface
Thanks in advance.
anrandap
Gerben, thanks for the quick response. I was extremely busy last few days and had no time for testing. I've done that today. So.. I had examined /etc/init.d/mpd file and there already was
Code: Select all
mpc play
Code: Select all
mpc volume 100
1. It does not work at all - well, actually it works but no audio output is produced (display is fine, air light is ok, I can telnet to the router, I can get http interface - router's web site content, but there is no sound at the output - air light is on, but not blinking so I suppose it is not getting data from online radio stream),
2. It works but with low volume (display is fine, air light is ok, I can telnet to the router, I can get http interface - router's web site content, sound is produced but volume is rather very low - I can hear nearly nothing through headphones),
3. It works fine - volume is high as expected (every other thing is OK too).
I have no idea what makes the difference, I did not change any configuration between switching power ON/OFF. I've noticed that when radio is in state 1, then swithing OFF, turning tuner knob a bit and switching ON makes radio going to state 2. For now, I don't know what is turning my radio to mode 3.
I've some diagnostic data. In state 1:
dmesg
Code: Select all
root@OpenWrt:/# dmesg
CPU revision is: 00029029
Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 16kB, 2-way, linesize 16 bytes.
Linux version 2.4.35.4 (jkeyzer@wavelen) (gcc version 3.4.6 (OpenWrt-2.0)) #3 Mon Dec 1 17:35:57 PST 2008
Setting the PFC to its default value
Determined physical RAM map:
memory: 01000000 @ 00000000 (usable)
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200
CPU: BCM5354 rev 3 at 240 MHz
Using 120.000 MHz high precision timer.
Calibrating delay loop... 237.56 BogoMIPS
Memory: 14272k/16384k available (1419k kernel code, 2112k reserved, 96k data, 84k init, 0k highmem)
Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
Checking for 'wait' instruction... unavailable.
POSIX conformance testing by UNIFIX
PCI: no core
PCI: Fixing up bus 0
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Registering mini_fo version $Id$
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
squashfs: version 3.0 (2006/03/15) Phillip Lougher
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 3) is a 16550A
b44.c:v0.93 (Mar, 2004)
PCI: Setting latency timer of device 00:01.0 to 64
eth0: Broadcom 47xx 10/100BaseT Ethernet bc:ae:c5:a7:6c:d5
Physically mapped flash: Found an alias at 0x400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0xc00000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1c00000 for the chip at 0x0
Amd/Fujitsu Extended Query Table v1.1 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Flash device: 0x400000 at 0x1c000000
bootloader size: 131072
Physically mapped flash: Filesystem type: squashfs, size=0x13e028
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00020000 : "cfe"
0x00020000-0x003f0000 : "linux"
0x0009a800-0x001e0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x003f0000-0x00400000 : "nvram"
0x001e0000-0x003f0000 : "rootfs_data"
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Ethernet Bridge 008 for NET4.0
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 84k freed
Algorithmics/MIPS FPU Emulator v1.5
diag: Detected 'ASUS WL-520gU'
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
roboswitch: Probing device eth0: found!
mini_fo: using base directory: /
mini_fo: using storage directory: /jffs
jffs2.bbc: SIZE compression mode activated.
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
BFL_ENETADM not set in boardflags. Use force=1 to ignore.
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
eth0.0: add 01:00:5e:00:00:01 mcast address to master interface
eth0.1: add 01:00:5e:00:00:01 mcast address to master interface
PCI: Setting latency timer of device 00:05.0 to 64
PCI/DMA
wl0: wlc_attach: chiprev 3 coreunit 0 corerev 13 cccap 0x104007ea maccap 0x30482205 band 2.4G, phy_type 5 phy_rev 0 an
wl0: Broadcom BCM4318 802.11 Wireless Controller 4.150.10.5
CSLIP: code copyright 1989 Regents of the University of California
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2002 Netfilter core team
ip_conntrack version 2.1 (5953 buckets, 5953 max) - 344 bytes per conntrack
SB USB20H init
SB COREREV: 2
SB USB20H resetting
USB20H fcr: 0x64
USB20H shim cr: 0x8f7
PCI: Setting latency timer of device 00:03.0 to 64
usb-ohci.c: USB OHCI at membase 0xb8003000, IRQ 6
usb-ohci.c: usb-00:03.0, PCI device 14e4:471a
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
usb.c: registered new driver audio
audio.c: v1.0.0:USB Audio Class driver
hub.c: new USB device 00:03.0-1, assigned address 2
usbaudio: device 2 audiocontrol interface 0 has 1 input and 1 output AudioStreaming interfaces
usbaudio: device 2 interface 2 altsetting 1 channels 2 framesize 2 configured
usbaudio: valid input sample rate 48000
usbaudio: valid input sample rate 44100
usbaudio: device 2 interface 2 altsetting 1: format 0x01000010 sratelo 44100 sratehi 48000 attributes 0x01
usbaudio: device 2 interface 2 altsetting 2 channels 2 framesize 3 configured
usbaudio: valid input sample rate 48000
usbaudio: valid input sample rate 44100
usbaudio: device 2 interface 2 altsetting 2: format 0x01000800 sratelo 44100 sratehi 48000 attributes 0x01
usbaudio: device 2 interface 2 altsetting 3 channels 2 framesize 2 configured
usbaudio: valid input sample rate 96000
usbaudio: device 2 interface 2 altsetting 3: format 0x01000010 sratelo 96000 sratehi 96000 attributes 0x00
usbaudio: device 2 interface 2 altsetting 4 channels 2 framesize 3 configured
usbaudio: valid input sample rate 96000
usbaudio: device 2 interface 2 altsetting 4: format 0x01000800 sratelo 96000 sratehi 96000 attributes 0x00
usbaudio: device 2 interface 1 altsetting 0 does not have an endpoint
usbaudio: device 2 interface 1 altsetting 1 channels 2 framesize 2 configured
usbaudio: valid output sample rate 48000
usbaudio: valid output sample rate 44100
usbaudio: device 2 interface 1 altsetting 1: format 0x01000010 sratelo 44100 sratehi 48000 attributes 0x01
usbaudio: device 2 interface 1 altsetting 2 channels 2 framesize 3 configured
usbaudio: valid output sample rate 48000
usbaudio: valid output sample rate 44100
usbaudio: device 2 interface 1 altsetting 2: format 0x01000800 sratelo 44100 sratehi 48000 attributes 0x01
usbaudio: device 2 interface 1 altsetting 3 channels 2 framesize 2 configured
usbaudio: valid output sample rate 96000
usbaudio: device 2 interface 1 altsetting 3: format 0x01000010 sratelo 96000 sratehi 96000 attributes 0x00
usbaudio: device 2 interface 1 altsetting 4 channels 2 framesize 3 configured
usbaudio: valid output sample rate 96000
usbaudio: device 2 interface 1 altsetting 4: format 0x01000800 sratelo 96000 sratehi 96000 attributes 0x00
usbaudio: device 2 interface 1 altsetting 5 channels 2 framesize 2 configured
usbaudio: valid output sample rate 192000
usbaudio: device 2 interface 1 altsetting 5: format 0x01000010 sratelo 192000 sratehi 192000 attributes 0x00
usbaudio: registered dsp 14,3
usbaudio: constructing mixer for Terminal 3 type 0x0301
usbaudio: registered mixer 14,0
usbaudio: constructing mixer for Terminal 4 type 0x0101
usbaudio: registered mixer 14,16
usb_audio_parsecontrol: usb_audio_state at 80875940
Code: Select all
root@OpenWrt:/# ps -ef
PID USER VSZ STAT COMMAND
1 root 1920 S init
2 root 0 SW [keventd]
3 root 0 RWN [ksoftirqd_CPU0]
4 root 0 SW [kswapd]
5 root 0 SW [bdflush]
6 root 0 SW [kupdated]
8 root 0 SW [mtdblockd]
55 root 0 SWN [jffs2_gcd_mtd4]
65 root 1928 S /bin/sh /etc/init.d/rcS S boot
66 root 1916 S logger -s -p 6 -t
84 root 1936 S syslogd -C16
86 root 1916 S klogd
185 root 0 SW [khubd]
384 root 1520 S /usr/sbin/nas -P /var/run/nas.wl0.pid -H 34954 -i wl0
571 root 1868 S /usr/sbin/dropbear -p 22
574 root 1920 S /usr/sbin/httpd -p 80 -h /www -r OpenWrt
578 root 1916 S telnetd -l /bin/login
600 nobody 1208 S /usr/sbin/dnsmasq -K -D -y -Z -b -E -s lan -S /lan/ -
617 root 7040 S /usr/bin/mpd
623 root 1952 S /bin/sh /etc/rc.common /etc/rc.d/S99AVR boot
625 root 1924 S /bin/sh - /root/interface.sh
641 root 1924 S /bin/sh - /root/display2.sh
647 root 1912 S head -n 1
808 root 1924 S /bin/ash --login
1138 root 1920 R ps -ef
1139 root 1924 S /bin/sh - /root/display2.sh
1140 root 0 []
1141 root 1920 R nc localhost 6600
1142 root 1916 S grep -e ^Name:
root@OpenWrt:/#
dmesg
Code: Select all
root@OpenWrt:/# dmesg
CPU revision is: 00029029
Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 16kB, 2-way, linesize 16 bytes.
Linux version 2.4.35.4 (jkeyzer@wavelen) (gcc version 3.4.6 (OpenWrt-2.0)) #3 Mon Dec 1 17:35:57 PST 2008
Setting the PFC to its default value
Determined physical RAM map:
memory: 01000000 @ 00000000 (usable)
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200
CPU: BCM5354 rev 3 at 240 MHz
Using 120.000 MHz high precision timer.
Calibrating delay loop... 238.38 BogoMIPS
Memory: 14272k/16384k available (1419k kernel code, 2112k reserved, 96k data, 84k init, 0k highmem)
Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
Checking for 'wait' instruction... unavailable.
POSIX conformance testing by UNIFIX
PCI: no core
PCI: Fixing up bus 0
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Registering mini_fo version $Id$
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
squashfs: version 3.0 (2006/03/15) Phillip Lougher
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 3) is a 16550A
b44.c:v0.93 (Mar, 2004)
PCI: Setting latency timer of device 00:01.0 to 64
eth0: Broadcom 47xx 10/100BaseT Ethernet bc:ae:c5:a7:6c:d5
Physically mapped flash: Found an alias at 0x400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0xc00000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1c00000 for the chip at 0x0
Amd/Fujitsu Extended Query Table v1.1 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Flash device: 0x400000 at 0x1c000000
bootloader size: 131072
Physically mapped flash: Filesystem type: squashfs, size=0x13e028
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00020000 : "cfe"
0x00020000-0x003f0000 : "linux"
0x0009a800-0x001e0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x003f0000-0x00400000 : "nvram"
0x001e0000-0x003f0000 : "rootfs_data"
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Ethernet Bridge 008 for NET4.0
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 84k freed
Algorithmics/MIPS FPU Emulator v1.5
diag: Detected 'ASUS WL-520gU'
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
roboswitch: Probing device eth0: found!
mini_fo: using base directory: /
mini_fo: using storage directory: /jffs
jffs2.bbc: SIZE compression mode activated.
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
BFL_ENETADM not set in boardflags. Use force=1 to ignore.
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
eth0.0: add 01:00:5e:00:00:01 mcast address to master interface
eth0.1: add 01:00:5e:00:00:01 mcast address to master interface
PCI: Setting latency timer of device 00:05.0 to 64
PCI/DMA
wl0: wlc_attach: chiprev 3 coreunit 0 corerev 13 cccap 0x104007ea maccap 0x30482205 band 2.4G, phy_type 5 phy_rev 0 ana_rev 6
wl0: Broadcom BCM4318 802.11 Wireless Controller 4.150.10.5
CSLIP: code copyright 1989 Regents of the University of California
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2002 Netfilter core team
ip_conntrack version 2.1 (5953 buckets, 5953 max) - 344 bytes per conntrack
SB USB20H init
SB COREREV: 2
SB USB20H resetting
USB20H fcr: 0x64
USB20H shim cr: 0x8f7
PCI: Setting latency timer of device 00:03.0 to 64
usb-ohci.c: USB OHCI at membase 0xb8003000, IRQ 6
usb-ohci.c: usb-00:03.0, PCI device 14e4:471a
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
usb.c: registered new driver audio
audio.c: v1.0.0:USB Audio Class driver
hub.c: new USB device 00:03.0-1, assigned address 2
usbaudio: device 2 audiocontrol interface 0 has 1 input and 1 output AudioStreaming interfaces
usbaudio: device 2 interface 2 altsetting 1 channels 2 framesize 2 configured
usbaudio: valid input sample rate 48000
usbaudio: valid input sample rate 44100
usbaudio: device 2 interface 2 altsetting 1: format 0x01000010 sratelo 44100 sratehi 48000 attributes 0x01
usbaudio: device 2 interface 2 altsetting 2 channels 2 framesize 3 configured
usbaudio: valid input sample rate 48000
usbaudio: valid input sample rate 44100
usbaudio: device 2 interface 2 altsetting 2: format 0x01000800 sratelo 44100 sratehi 48000 attributes 0x01
usbaudio: device 2 interface 2 altsetting 3 channels 2 framesize 2 configured
usbaudio: valid input sample rate 96000
usbaudio: device 2 interface 2 altsetting 3: format 0x01000010 sratelo 96000 sratehi 96000 attributes 0x00
usbaudio: device 2 interface 2 altsetting 4 channels 2 framesize 3 configured
usbaudio: valid input sample rate 96000
usbaudio: device 2 interface 2 altsetting 4: format 0x01000800 sratelo 96000 sratehi 96000 attributes 0x00
usbaudio: device 2 interface 1 altsetting 0 does not have an endpoint
usbaudio: device 2 interface 1 altsetting 1 channels 2 framesize 2 configured
usbaudio: valid output sample rate 48000
usbaudio: valid output sample rate 44100
usbaudio: device 2 interface 1 altsetting 1: format 0x01000010 sratelo 44100 sratehi 48000 attributes 0x01
usbaudio: device 2 interface 1 altsetting 2 channels 2 framesize 3 configured
usbaudio: valid output sample rate 48000
usbaudio: valid output sample rate 44100
usbaudio: device 2 interface 1 altsetting 2: format 0x01000800 sratelo 44100 sratehi 48000 attributes 0x01
usbaudio: device 2 interface 1 altsetting 3 channels 2 framesize 2 configured
usbaudio: valid output sample rate 96000
usbaudio: device 2 interface 1 altsetting 3: format 0x01000010 sratelo 96000 sratehi 96000 attributes 0x00
usbaudio: device 2 interface 1 altsetting 4 channels 2 framesize 3 configured
usbaudio: valid output sample rate 96000
usbaudio: device 2 interface 1 altsetting 4: format 0x01000800 sratelo 96000 sratehi 96000 attributes 0x00
usbaudio: device 2 interface 1 altsetting 5 channels 2 framesize 2 configured
usbaudio: valid output sample rate 192000
usbaudio: device 2 interface 1 altsetting 5: format 0x01000010 sratelo 192000 sratehi 192000 attributes 0x00
usbaudio: registered dsp 14,3
usbaudio: constructing mixer for Terminal 3 type 0x0301
usbaudio: registered mixer 14,0
usbaudio: constructing mixer for Terminal 4 type 0x0101
usbaudio: registered mixer 14,16
usb_audio_parsecontrol: usb_audio_state at 80c7a940
root@OpenWrt:/#
Code: Select all
root@OpenWrt:/# ps -ef
PID USER VSZ STAT COMMAND
1 root 1920 S init
2 root 0 SW [keventd]
3 root 0 SWN [ksoftirqd_CPU0]
4 root 0 SW [kswapd]
5 root 0 SW [bdflush]
6 root 0 SW [kupdated]
8 root 0 SW [mtdblockd]
55 root 0 SWN [jffs2_gcd_mtd4]
65 root 1928 S /bin/sh /etc/init.d/rcS S boot
66 root 1916 S logger -s -p 6 -t
84 root 1936 S syslogd -C16
86 root 1916 S klogd
181 root 0 SW [khubd]
385 root 1520 S /usr/sbin/nas -P /var/run/nas.wl0.pid -H 34954 -i wl0
571 root 1868 S /usr/sbin/dropbear -p 22
574 root 1920 S /usr/sbin/httpd -p 80 -h /www -r OpenWrt
578 root 1916 S telnetd -l /bin/login
600 nobody 1208 S /usr/sbin/dnsmasq -K -D -y -Z -b -E -s lan -S /lan/ -
617 root 7092 S /usr/bin/mpd
623 root 1952 S /bin/sh /etc/rc.common /etc/rc.d/S99AVR boot
625 root 1924 S /bin/sh - /root/interface.sh
641 root 1924 S /bin/sh - /root/display2.sh
663 root 6424 S /usr/bin/mpd
664 root 6488 S /usr/bin/mpd
668 root 1912 S head -n 1
984 root 1924 S /bin/ash --login
1061 root 1912 S sleep 1
1062 root 1920 R ps -ef
root@OpenWrt:/#
dmesg
Code: Select all
root@OpenWrt:/# dmesg
CPU revision is: 00029029
Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 16kB, 2-way, linesize 16 bytes.
Linux version 2.4.35.4 (jkeyzer@wavelen) (gcc version 3.4.6 (OpenWrt-2.0)) #3 Mon Dec 1 17:35:57 PST 2008
Setting the PFC to its default value
Determined physical RAM map:
memory: 01000000 @ 00000000 (usable)
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200
CPU: BCM5354 rev 3 at 240 MHz
Using 120.000 MHz high precision timer.
Calibrating delay loop... 238.38 BogoMIPS
Memory: 14272k/16384k available (1419k kernel code, 2112k reserved, 96k data, 84k init, 0k highmem)
Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
Checking for 'wait' instruction... unavailable.
POSIX conformance testing by UNIFIX
PCI: no core
PCI: Fixing up bus 0
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Registering mini_fo version $Id$
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
squashfs: version 3.0 (2006/03/15) Phillip Lougher
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 3) is a 16550A
b44.c:v0.93 (Mar, 2004)
PCI: Setting latency timer of device 00:01.0 to 64
eth0: Broadcom 47xx 10/100BaseT Ethernet bc:ae:c5:a7:6c:d5
Physically mapped flash: Found an alias at 0x400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0xc00000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1c00000 for the chip at 0x0
Amd/Fujitsu Extended Query Table v1.1 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Flash device: 0x400000 at 0x1c000000
bootloader size: 131072
Physically mapped flash: Filesystem type: squashfs, size=0x13e028
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00020000 : "cfe"
0x00020000-0x003f0000 : "linux"
0x0009a800-0x001e0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x003f0000-0x00400000 : "nvram"
0x001e0000-0x003f0000 : "rootfs_data"
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Ethernet Bridge 008 for NET4.0
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 84k freed
Algorithmics/MIPS FPU Emulator v1.5
diag: Detected 'ASUS WL-520gU'
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
roboswitch: Probing device eth0: found!
mini_fo: using base directory: /
mini_fo: using storage directory: /jffs
jffs2.bbc: SIZE compression mode activated.
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
BFL_ENETADM not set in boardflags. Use force=1 to ignore.
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
eth0.0: add 01:00:5e:00:00:01 mcast address to master interface
eth0.1: add 01:00:5e:00:00:01 mcast address to master interface
PCI: Setting latency timer of device 00:05.0 to 64
PCI/DMA
wl0: wlc_attach: chiprev 3 coreunit 0 corerev 13 cccap 0x104007ea maccap 0x30482205 band 2.4G, phy_type 5 phy_rev 0 ana_rev 6
wl0: Broadcom BCM4318 802.11 Wireless Controller 4.150.10.5
CSLIP: code copyright 1989 Regents of the University of California
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2002 Netfilter core team
ip_conntrack version 2.1 (5953 buckets, 5953 max) - 344 bytes per conntrack
SB USB20H init
SB COREREV: 2
SB USB20H resetting
USB20H fcr: 0x64
USB20H shim cr: 0x8f7
PCI: Setting latency timer of device 00:03.0 to 64
usb-ohci.c: USB OHCI at membase 0xb8003000, IRQ 6
usb-ohci.c: usb-00:03.0, PCI device 14e4:471a
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
usb.c: registered new driver audio
audio.c: v1.0.0:USB Audio Class driver
hub.c: new USB device 00:03.0-1, assigned address 2
usbaudio: device 2 audiocontrol interface 0 has 1 input and 1 output AudioStreaming interfaces
usbaudio: device 2 interface 2 altsetting 1 channels 2 framesize 2 configured
usbaudio: valid input sample rate 48000
usbaudio: valid input sample rate 44100
usbaudio: device 2 interface 2 altsetting 1: format 0x01000010 sratelo 44100 sratehi 48000 attributes 0x01
usbaudio: device 2 interface 2 altsetting 2 channels 2 framesize 3 configured
usbaudio: valid input sample rate 48000
usbaudio: valid input sample rate 44100
usbaudio: device 2 interface 2 altsetting 2: format 0x01000800 sratelo 44100 sratehi 48000 attributes 0x01
usbaudio: device 2 interface 2 altsetting 3 channels 2 framesize 2 configured
usbaudio: valid input sample rate 96000
usbaudio: device 2 interface 2 altsetting 3: format 0x01000010 sratelo 96000 sratehi 96000 attributes 0x00
usbaudio: device 2 interface 2 altsetting 4 channels 2 framesize 3 configured
usbaudio: valid input sample rate 96000
usbaudio: device 2 interface 2 altsetting 4: format 0x01000800 sratelo 96000 sratehi 96000 attributes 0x00
usbaudio: device 2 interface 1 altsetting 0 does not have an endpoint
usbaudio: device 2 interface 1 altsetting 1 channels 2 framesize 2 configured
usbaudio: valid output sample rate 48000
usbaudio: valid output sample rate 44100
usbaudio: device 2 interface 1 altsetting 1: format 0x01000010 sratelo 44100 sratehi 48000 attributes 0x01
usbaudio: device 2 interface 1 altsetting 2 channels 2 framesize 3 configured
usbaudio: valid output sample rate 48000
usbaudio: valid output sample rate 44100
usbaudio: device 2 interface 1 altsetting 2: format 0x01000800 sratelo 44100 sratehi 48000 attributes 0x01
usbaudio: device 2 interface 1 altsetting 3 channels 2 framesize 2 configured
usbaudio: valid output sample rate 96000
usbaudio: device 2 interface 1 altsetting 3: format 0x01000010 sratelo 96000 sratehi 96000 attributes 0x00
usbaudio: device 2 interface 1 altsetting 4 channels 2 framesize 3 configured
usbaudio: valid output sample rate 96000
usbaudio: device 2 interface 1 altsetting 4: format 0x01000800 sratelo 96000 sratehi 96000 attributes 0x00
usbaudio: device 2 interface 1 altsetting 5 channels 2 framesize 2 configured
usbaudio: valid output sample rate 192000
usbaudio: device 2 interface 1 altsetting 5: format 0x01000010 sratelo 192000 sratehi 192000 attributes 0x00
usbaudio: registered dsp 14,3
usbaudio: constructing mixer for Terminal 3 type 0x0301
usbaudio: registered mixer 14,0
usbaudio: constructing mixer for Terminal 4 type 0x0101
usbaudio: registered mixer 14,16
usb_audio_parsecontrol: usb_audio_state at 80c9f940
root@OpenWrt:/#
Code: Select all
root@OpenWrt:/# ps -ef
PID USER VSZ STAT COMMAND
1 root 1920 S init
2 root 0 SW [keventd]
3 root 0 SWN [ksoftirqd_CPU0]
4 root 0 SW [kswapd]
5 root 0 SW [bdflush]
6 root 0 SW [kupdated]
8 root 0 SW [mtdblockd]
55 root 0 SWN [jffs2_gcd_mtd4]
65 root 1928 S /bin/sh /etc/init.d/rcS S boot
66 root 1916 S logger -s -p 6 -t
84 root 1936 S syslogd -C16
86 root 1916 S klogd
193 root 0 SW [khubd]
384 root 1520 S /usr/sbin/nas -P /var/run/nas.wl0.pid -H 34954 -i wl0
571 root 1868 S /usr/sbin/dropbear -p 22
574 root 1920 S /usr/sbin/httpd -p 80 -h /www -r OpenWrt
578 root 1916 S telnetd -l /bin/login
600 nobody 1208 S /usr/sbin/dnsmasq -K -D -y -Z -b -E -s lan -S /lan/ -
617 root 7092 S /usr/bin/mpd
623 root 1952 S /bin/sh /etc/rc.common /etc/rc.d/S99AVR boot
625 root 1924 S /bin/sh - /root/interface.sh
641 root 1932 S /bin/sh - /root/display2.sh
663 root 6376 S /usr/bin/mpd
664 root 6440 S /usr/bin/mpd
986 root 1912 S head -n 1
1418 root 1924 S /bin/ash --login
1496 root 1912 S sleep 1
1497 root 1920 R ps -ef
root@OpenWrt:/#
I don't think it is permission problem:
Code: Select all
root@OpenWrt:/etc/init.d# ls -la
drwxr-xr-x 1 root root 0 Jan 1 00:04 .
drwxr-xr-x 1 root root 0 Jan 1 00:01 ..
-rwxr-xr-x 1 root root 172 Jan 1 00:02 AVR
-rwxr-xr-x 1 root root 1756 Oct 4 2008 boot
-rwxr-xr-x 1 root root 281 Dec 2 2008 cron
-rwxr-xr-x 1 root root 6196 Dec 2 2008 dnsmasq
-rwxr-xr-x 1 root root 243 Oct 4 2008 done
-rwxr-xr-x 1 root root 1176 Dec 2 2008 dropbear
-rwxr-xr-x 1 root root 178 Dec 2 2008 firewall
-rwxr-xr-x 1 root root 1498 Oct 4 2008 fstab
-rwxr-xr-x 1 root root 1005 Dec 2 2008 httpd
-rwxr-xr-x 1 root root 1238 Oct 4 2008 led
-rwxr-xr-x 1 root root 722 Jan 1 00:03 mpd
-rwxr-xr-x 1 root root 4577 Oct 4 2008 netconfig
-rwxr-xr-x 1 root root 414 Oct 4 2008 network
-rwxr-xr-x 1 root root 2040 Dec 2 2008 nvram
-rwxr-xr-x 1 root root 134 Oct 4 2008 rcS
-rwxr-xr-x 1 root root 123 Oct 4 2008 sysctl
-rwxr-xr-x 1 root root 329 Dec 2 2008 telnet
-rwxr-xr-x 1 root root 99 Oct 4 2008 umount
-rwxr-xr-x 1 root root 154 Oct 4 2008 usb
-rwxr-xr-x 1 root root 140 Oct 4 2008 watchdog
root@OpenWrt:/etc/init.d#
Code: Select all
root@OpenWrt:/# cd root
root@OpenWrt:~# ls -la
drwxr-xr-x 1 root root 0 Jan 1 00:01 .
drwxr-xr-x 1 root root 0 Jan 1 2000 ..
drwxr-xr-x 1 root root 0 Jan 1 00:03 .mpd
-rwxr-xr-x 1 root root 609 Jan 1 00:17 display.sh
-rwxr-xr-x 1 root root 1348 Jan 1 00:08 display2.sh
-rwxr-xr-x 1 root root 3278 Jan 1 00:05 interface.sh
drwxr-xr-x 1 root root 0 Jan 1 00:02 music
root@OpenWrt:~#
display.sh
Code: Select all
root@OpenWrt:~# cat display.sh
#! /bin/sh -
# display.sh - Wifi Radio LCD display routines
# 12/12/08 Jeff Keyzer http://mightyohm.com
# This shell script queries mpd for current song information and sends
# relevant bits of it to the serial port, where an AVR-based LCD display
# is waiting.
#
# For more information, visit
# http://mightyohm.com/blog/
#
trap 'exit 1' SIGINT # exit on ctrl-c, useful for debugging
stty 9600 < /dev/tts/0 # set serial port to 9600 baud
# so we can talk to the AVR
while true # loop forever
do
echo "currentsong" | nc localhost 6600 | grep -e "^Title: " -e "^Name: " > /dev/tts/0
sleep 1
done
root@OpenWrt:~#
Code: Select all
root@OpenWrt:~# cat display2.sh
#! /bin/sh -
# display2.sh - Wifi Radio LCD display routines, revision 2
# 01/29/08 Jeff Keyzer http://mightyohm.com
# This shell script queries mpd for current song information and sends
# relevant bits of it to the serial port, where an AVR-based LCD display
# is waiting.
#
# For more information, visit
# http://mightyohm.com/blog/tag/wifiradio/
#
# This work is protected by the
# Creative Commons Attribution-Share Alike 3.0 United States License.
# http://creativecommons.org/licenses/by-sa/3.0/us/
#
trap 'exit 1' SIGINT # exit on ctrl-c, useful for debugging
#stty 9600 -echo < /dev/tts/0 # set serial port to 9600 baud
# so we can talk to the AVR
while true # loop forever
do
# get name of current song from the mpd server
name=$(echo "currentsong" | nc localhost 6600 | grep -e "^Name: ")
#echo $name
echo $name > /dev/tts/0 # send it to the AVR for display
# get the artist/title of the current song, if it exists
title=$(echo "currentsong" | nc localhost 6600 | grep -e "^Title: ")
if [ -z "$title" ] # check if a title was returned
then
title="Title: NULL" # no, let the AVR know not to display a title
fi
#echo $title
echo $title > /dev/tts/0 # send it to the AVR for display
sleep 1 # wait a while, this determines the base rate at which
# the AVR display loops
done
root@OpenWrt:~#
Code: Select all
root@OpenWrt:~# cat interface.sh
#! /bin/sh -
# interface.sh - Wifi Radio User Interface Script
# 01/29/09 Jeff Keyzer http://mightyohm.com
#
# This shell script sets up a playlist in mpd and changes playlist entries
# based on the position of a tuner knob connected to an AVR on the router's
# serial port.
#
# The script expects the AVR to send data at 9600 baud (8N1) to the router,
# in the format "tuner: value", one line at a time.
#
# This script also launches display.sh, the LCD display script.
#
# For more information, visit
# http://mightyohm.com/blog/tag/wifiradio/
#
# This work is protected by the
# Creative Commons Attribution-Share Alike 3.0 United States License.
# http://creativecommons.org/licenses/by-sa/3.0/us/
# Some configuration settings
VOLUME=100
STATIONS=10
MAXADC=1024
ADCBIN=$(expr "(" $MAXADC / $STATIONS ")" + 1)
trap 'kill $! ; exit 1' SIGINT # exit on ctrl-c, useful for debugging
# kills the display.sh process before exiting
stty 9600 -echo < /dev/tts/0 # set serial port to 9600 baud
# so we can talk to the AVR
# turn off local echo to make TX/RX directions
# completely separate from each other
# mpd setup
mpc volume $VOLUME # adjust this to suit your speakers/amplifier
mpc clear # clear current playlist
# build a playlist, substitute your favorite radio stations here
# the first line becomes station #1, and so on.
mpc add http://relay3.slayradio.org:8000/ # Slay Radio
mpc add http://listen.idealsound.ca:8000/ # IdealSound DNB
mpc add http://205.188.215.228:8006/ # di.fm Ambient
mpc add http://205.188.215.232:8016 # di.fm Soulful House
mpc add http://ipx.psyradio.org:8010/ # psyradio.fm
mpc add http://205.188.215.225:8002 # di.fm Breaks
mpc add http://bcb-high.rautemusik.fm/ # RauteMusik Big City Beats
mpc add http://di-fm-01.quintex.com:8888 # di.fm NYC Exposure
mpc add http://208.122.59.30:7234 # di.fm Future Synthpop
mpc add http://scfire-mtc-aa03.stream.aol.com:80/stream/1026 # di.fm Progressive
mpc playlist # show the resulting playlist
oldstation=0 # var to keep track of what station we're playing
# Tell the AVR we're ready to start doing stuff
echo "AVR Start!\n" > /dev/tts/0
# launch LCD display routines in the background
/root/display2.sh &
while true # loop forever
do
inputline="" # clear input
# Loop until we get a valid tuner position from the AVR
until inputline=$(echo $inputline | grep -e "^tuner: ")
do
inputline=$(head -n 1 < /dev/tts/0)
done
value=$(echo $inputline | sed 's/tuner: //') # strip out the tuner: part
#echo "$value"
# compute playlist positon based on tuner value
# the tuner range is 0 to MAXADC
# the ADC range is separated into equally sized bins, each bin
# is one station
# station ends up being an integer from 1 to STATIONS
# that determines what station to play
station=$(expr $value / $ADCBIN + 1)
# if station has changed, we need to change position in the playlist
if [ "$station" -ne "$oldstation" ]
then
echo "Tuner Position: " $value
echo "New station..."
mpc play $station
fi
oldstation=$station # remember what station we're on so we know
# if we need to change stations next time around
done
root@OpenWrt:~#
Code: Select all
root@OpenWrt:/etc/init.d# ifconfig
eth0 Link encap:Ethernet HWaddr BC:AE:C5:A7:6C:D5
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:388 errors:0 dropped:0 overruns:0 frame:0
TX packets:246 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:27370 (26.7 KiB) TX bytes:43615 (42.5 KiB)
Interrupt:4
eth0.0 Link encap:Ethernet HWaddr BC:AE:C5:A7:6C:D5
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:390 errors:0 dropped:0 overruns:0 frame:0
TX packets:247 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:20467 (19.9 KiB) TX bytes:42469 (41.4 KiB)
eth0.1 Link encap:Ethernet HWaddr BC:AE:C5:A7:6C:D5
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:13715 errors:0 dropped:0 overruns:0 frame:0
TX packets:13715 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:906930 (885.6 KiB) TX bytes:906930 (885.6 KiB)
wl0 Link encap:Ethernet HWaddr BC:AE:C5:A7:6C:D5
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7119 errors:0 dropped:0 overruns:0 frame:2939
TX packets:5219 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9293154 (8.8 MiB) TX bytes:374654 (365.8 KiB)
Interrupt:2 Base address:0x5000
root@OpenWrt:/etc/init.d#
anrandap