Sie sind auf Seite 1von 11

Conceptronic C54BRS4A 2.

0
From WikiDevi
For a list of all currently documented Atheros chipsets with specifications, see Atheros.
Conceptronic C54BRS4A 2.0
"8WRGG19..1C1G" is silkscreened on the board.
This device is using AR2317-AC1A.

Manuf/OEM/ODM

Alpha Networks WRG-G19

Other WRG-G19s...
Country of manuf.: China
FLA1

RAM1

Switch model

Airlink101 AR335W

4 MiB

16 MiB

IP175C

Airlink101 AR430W

4 MiB

16 MiB

IP175C

Conceptronic C54BRS4A 2.0 2 MiB

16 MiB

D-Link DIR-300 rev A1

16 MiB

4 MiB

IP175E

Type: wireless router


Power: 5 VDC, 2.5 A
Connector type: barrel

Despite having 2MB Flash, this device still has a third-party firmware available for the device.
Teo Ramirez's c54brs4a v2 firmware (http://galinux.myftp.org/c54brs4a_v2-firmwares/)
The default SSID may be C54BRS4A.

CPU1: Atheros AR2317 (180 MHz)


FLA1: 2 MiB (STMicroelectronics 25P16V6P)
RAM1: 16 MiB (ESMT M12L128168A-7T)
Expansion IFs: none specified
JTAG: yes
Serial: yes, 3.3V TTL

Contents
1 General information
1.1 uname
1.2 cpuinfo
1.3 mtd
1.4 free
1.5 meminfo
1.6 loadavg
1.7 uptime
1.8 /proc/sys/net/ipv4
1.9 ps
1.10 /var/etc/httpd.cfg
2 Boot scripts
2.1 /etc/init.d/S03config
2.2 /etc/init.d/S10system.sh
2.3 /etc/scripts/layout.sh
3 Default config
4 Route/Bridge layout
5 Isolate a LAN port
6 Duplicate traffic
7 Assorted RGDB info

General information
This information is sourced from here (http://galinux.myftp.org/c54brs4a_v2-firmwares/tools/advanced.txt).
Thanks to
Teo Ramirez (Spain)
teoDELETEramirezME()gmail.com
http://galinux.myftp.org

WI1 chip1: Atheros AR2317


WI1 802dot11 protocols: bg
WI1 antenna connector: none
ETH chip1: Atheros AR2317
Switch: IC+ Model?
LAN speed: 10/100
LAN ports: 4
WAN ports: 1
bg
Third party firmware supported: galinux (C54BRS4A)
Default IP address: 192.168.0.1

the IP 192.168.0.1 is used by 508 additional devices


(http://wikidevi.com/wiki/Special:Ask?
title=Special%3AAsk&q=%5B%5BDefault+IP+address::192.168.0.1%5D%5
(ethernet)=OUI+
(Eth)%0D%0A%3FEstimated+year+of+release=Est.+year&eq=yes&p%5Bfo
of which 1 are Conceptronic devices
(http://wikidevi.com/wiki/Special:Ask?
title=Special%3AAsk&q=%5B%5BDefault+IP+address::192.168.0.1%5D%5
(ethernet)=OUI+
(Eth)%0D%0A%3FEstimated+year+of+release=Est.+year&eq=yes&p%5Bfo

Default login user: admin


Default login password: admin

uname
# uname -a
Linux (none) 2.4.25-LSDK-5.0.0-RC5 #1 mar jul 5 23:14:58 UTC 2011 mips unknown

cpuinfo
# cat /proc/cpuinfo
system type
processor
cpu model
BogoMIPS
wait instruction
microsecond timers
tlb_entries
extra interrupt vector
hardware watchpoint
VCED exceptions
VCEI exceptions

mtd

:
:
:
:
:
:
:
:
:
:
:

Atheros AR531X_COBRA
0
unknown V6.4
183.50
no
yes
16
yes
no
not available
not available

admin:admin credentials used by 776 additional devices


(http://wikidevi.com/wiki/Special:Ask?
title=Special%3AAsk&q=%5B%5BGlobal+type::~embedded+system*%5D%
(ethernet)=OUI+
(Eth)%0D%0A%3FEstimated+year+of+release=Est.+year&eq=yes&p%5Bfo
of which 1 are Conceptronic devices
(http://wikidevi.com/wiki/Special:Ask?
title=Special%3AAsk&q=%5B%5BGlobal+type::~embedded+system*%5D%
(ethernet)=OUI+
(Eth)%0D%0A%3FEstimated+year+of+release=Est.+year&eq=yes&p%5Bfo

802dot11 OUI: 00:80:5A (http://hwaddress.com/?q=00:80:5A)


(1 E (http://wikidevi.com/wiki/Special:Ask?title=Special%3AAsk&q=%5B%
Ethernet OUI: 00:80:5A (http://hwaddress.com/?q=00:80:5A)
(1 E (http://wikidevi.com/wiki/Special:Ask?title=Special%3AAsk&q=%5B%

# cat
dev:
mtd0:
mtd1:
mtd2:
mtd3:
mtd4:
mtd5:
mtd6:

/proc/mtd
size
erasesize name
00200000 00010000 "spiflash"
00137000 00010000 "rootfs"
001d0000 00010000 "upgrade"
00010000 00010000 "rgdb"
00020000 00010000 "RedBoot"
00010000 00010000 "Board/RadioCfg"
00200000 00010000 "flash"

free
# free
total
14160
0
14160

Mem:
Swap:
Total:

used
13144
0
13144

free
1016
0
1016

shared
0

buffers
1032

meminfo
# cat /proc/meminfo
total:
used:
free:
Mem: 14499840 13746176
753664
Swap:
0
0
0
MemTotal:
14160 kB
MemFree:
736 kB
MemShared:
0 kB
Buffers:
1032 kB
Cached:
4348 kB
SwapCached:
0 kB
Active:
3860 kB
Inactive:
3164 kB
HighTotal:
0 kB
HighFree:
0 kB
LowTotal:
14160 kB
LowFree:
736 kB
SwapTotal:
0 kB
SwapFree:
0 kB

shared: buffers:
0 1056768

cached:
4452352

loadavg
# cat loadavg
#1 min, 5 min, 15 min, running/total last proc.
1.07 1.10 1.07 2/209 8630

uptime
# uptime, while heavy traffic and "devsniffing":
21:56:32 up 2:48, load average: 2.97, 2.76, 2.64

/proc/sys/net/ipv4
# ls /proc/sys/net/ipv4
tcp_timestamps
tcp_window_scaling
tcp_sack
tcp_retrans_collapse
ip_forward
ip_default_ttl
ip_autoconfig
ip_no_pmtu_disc
ip_nonlocal_bind
tcp_syn_retries
tcp_synack_retries
tcp_max_orphans
tcp_max_tw_buckets
ipfrag_high_thresh
ipfrag_low_thresh
ip_dynaddr
ipfrag_time
tcp_keepalive_time
tcp_keepalive_probes
tcp_keepalive_intvl
tcp_retries1
tcp_retries2
tcp_fin_timeout
tcp_tw_recycle
tcp_abort_on_overflow
tcp_stdurg
tcp_rfc1337
tcp_max_syn_backlog
ip_local_port_range
icmp_echo_ignore_all

icmp_echo_ignore_broadcasts
icmp_ignore_bogus_error_responses
route
igmp_max_memberships
inet_peer_threshold
inet_peer_minttl
inet_peer_maxttl
inet_peer_gc_mintime
inet_peer_gc_maxtime
tcp_orphan_retries
tcp_fack
tcp_reordering
tcp_ecn
tcp_dsack
tcp_mem
tcp_wmem
tcp_rmem
tcp_app_win
tcp_adv_win_scale
icmp_ratelimit
icmp_ratemask
tcp_tw_reuse
tcp_frto
tcp_low_latency
ipfrag_secret_interval
neigh
conf
netfilter
ip_conntrack_max

ps
# ps
PID
1
2
3
4
5
6
7
51
178
213

Uid
0
0
0
0
0
0
0
0
0
0

VmSize Stat Command


160 S
init
SW [keventd]
RWN [ksoftirqd_CPU0]
SW [kswapd]
SW [bdflush]
SW [kupdated]
SW [mtdblockd]
648 S
xmldb -n wrgg19_conceptronic_c54brs4a -t
96 D
ifconfig eth0 hw ether 00:80:5a:5c:XX:XX up
240 S
fresetd

306
384
602
640
646
647
648
25616
25618
25619
17408
18076
18077
18103
18117
18246
18284
29534
29542
31497

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

280
208
240
200
224
200
260
224
200
252
312
296
252
220
776
328
256
244
168
172

S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
R

wlxmlpatch
portt
telnetd -l /usr/sbin/login -u admin:(TELNET_PASS) -i br0
-sh
/usr/sbin/login admin (TELNET_PASS)
sh -c /bin/sh
/bin/sh
/usr/sbin/login admin (TELNET_PASS)
sh -c /bin/sh
/bin/sh
udhcpc -i vlan2 -p /var/run/udhcpc-vlan2.pid -s /var/
udhcpd /var/run/udhcpd-br0.conf
dhcpxmlpatch -f /var/run/udhcpd-br0.lease
sh /var/run/http-loop.sh
httpd -s wrgg19_conceptronic_c54brs4a -f /var/etc/htt
dnrd -s 8.8.4.4 -c off
dyndns -S 2 -u (MY_DYNDNS_NAME) -p (MY_DYNDNS_PASS) -i
syslogd -F sysact -F attack -F notice
klogd -l br0 -w vlan2
ps

/var/etc/httpd.cfg
# cat /var/etc/httpd.cfg
Umask 026
Tuning {
NumConnections 15
BufSize 12288
InputBufSize 4096
ScriptBufSize 4096
NumHeaders 100
Timeout 60
ScriptTimeout 60
MaxUploadSize 3735552
}
PIDFile /var/run/httpd.pid
LogGMT On
Control {
Types {
text/html { html htm }
text/xml { xml }
text/plain { txt }
image/gif { gif }
image/jpeg { jpg }
text/css { css }
application/ocstream { * }
}
Specials {
Dump { /dump }
CGI { cgi }
Imagemap { map }
Redirect { url }
Internal { _int }
}
External {
/sbin/atp { php }
/sbin/xgi { xgi bin }
/sbin/sgi { sgi }
}
IndexNames { index.html }
}
Server {
Interface br0
Virtual {
AnyHost
Control {
Realm ""
UserFile /var/etc/httpasswd
Error401File /www/sys/not_auth.php
SessionControl On
SessionIdleTime 3600
SessionMax 8
SessionFilter { php xgi
ErrorFWUploadFile
ErrorCfgUploadFile
InfoFWRestartFile
InfoCfgRestartFile
Alias /
Location /www

_int cgi }
/www/sys/wrongImg.htm
/www/sys/wrongConf.htm
/www/sys/restart.htm
/www/sys/restart2.htm

}
Control {
Alias /var
Location /var/www
}
Control {
Alias /HNAP1
Location /www/HNAP1
External {
/usr/sbin/hnap { hnap }
}
IndexNames { index.hnap }
}
}
}
Server {
Interface br0
Port 1900
ServerName "Linux, UPnP/1.0, C54BRS4A Ver 2.00"
Address 239.255.255.250 # UPnP broadcase
UDPServer On
Virtual {
AnyHost
Control {
Alias /
Location /www/upnp
External {
/usr/sbin/upnpdev { * }
}

}
}
}
Server {
Interface br0
Port 49152
ServerName "Linux, UPnP/1.0, C54BRS4A Ver 2.00"
Virtual {
AnyHost
Control {
Alias /
Location /htdocs/upnp
External {
/usr/sbin/upnpdev { upnp }
}
}
}
}
Server {
Interface vlan2
Port 8000
Virtual {
AnyHost
Control {
Realm ""
UserFile /var/etc/httpasswd
Error401File /www/sys/not_auth.php
SessionControl On
SessionIdleTime 3600
SessionMax 8
SessionFilter { php xgi
ErrorFWUploadFile
ErrorCfgUploadFile
InfoFWRestartFile
InfoCfgRestartFile
Alias /
Location /www

_int cgi }
/www/sys/wrongImg.htm
/www/sys/wrongConf.htm
/www/sys/restart.htm
/www/sys/restart2.htm

}
Control {
Alias /var
Location /var/www
}
}
}

Boot scripts
In /etc/init.d/rcS

/etc/init.d/S03config
/etc/init.d/S03config links to /etc/scripts/config.sh
#!/bin/sh
nvram=`cat /etc/config/nvram`
image_sign=`cat /etc/config/image_sign`
case "$1" in
start)
echo "Mounting proc and var ..."
mount -t proc none /proc
mount -t ramfs ramfs /var
mkdir -p /var/etc /var/log /var/run /var/state /var/tmp /var/etc/ppp /var/etc/config /var/dnrd /var/etc/iproute2
echo -n > /var/etc/resolv.conf
echo -n > /var/TZ
echo "127.0.0.1 hgw" > /var/hosts
echo "***************

SYS:001" > /var/log/messages

echo "Inserting modules ..." > /dev/console


insmod /lib/modules/sw_tcpip.o
insmod /lib/modules/ifresetcnt.o
# wireless driver
insmod /lib/modules/wlan.o
insmod /lib/modules/wlan_xauth.o
insmod /lib/modules/wlan_wep.o
insmod /lib/modules/wlan_tkip.o
insmod /lib/modules/wlan_scan_sta.o
insmod /lib/modules/wlan_scan_ap.o
insmod /lib/modules/wlan_ccmp.o
insmod /lib/modules/wlan_acl.o
insmod /lib/modules/ath_hal.o
insmod /lib/modules/ath_rate_atheros.o
# insert module ath_dfs.o for madwifi driver v5.2.0.112
test -f /lib/modules/ath_dfs.o && insmod /lib/modules/ath_dfs.o
# get the country code for madwifi, default is fcc.
ccode=`rgcfg getenv -n $nvram -e countrycode`
[ "$ccode" = "" ] && ccode="840"
insmod /lib/modules/ath_ahb.o countrycode=$ccode
wlanconfig ath0 create wlandev wifi0 wlanmode ap
env_wlan=`rgcfg getenv -n $nvram -e wlanmac`
[ "$env_wlan" = "" ] && env_wlan="00:13:10:d1:00:02"
ifconfig ath0 hw ether $env_wlan
insmod /lib/modules/ar231x_gpio.o
# prepare db...
echo "Start xmldb ..." > /dev/console
xmldb -n $image_sign -t > /dev/console &
sleep 1
/etc/scripts/misc/profile.sh get
/etc/templates/timezone.sh set
/etc/templates/logs.sh
# bring up network devices
env_wan=`rgcfg getenv -n $nvram -e wanmac`
[ "$env_wan" = "" ] && env_wan="00:13:10:d1:00:01"
ifconfig eth0 hw ether $env_wan up
rgdb -i -s /runtime/wan/inf:1/mac "$env_wan"

TIMEOUT=`rgdb -g /nat/general/tcpidletimeout`
[ "$TIMEOUT" = "" ] && TIMEOUT=7200 && rgdb -s /nat/general/tcpidletimeout $TIMEOUT
echo "$TIMEOUT" > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_established
# Setup VLAN
vconfig set_name_type VLAN_PLUS_VID_NO_PAD > /dev/console
vconfig add eth0 1
> /dev/null 2>&1
vconfig add eth0 2
> /dev/null 2>&1
brctl addbr br0
> /dev/console
brctl stp br0 off
> /dev/console
brctl setfd br0 0
> /dev/console
# Start up LAN interface & httpd
ifconfig br0 0.0.0.0 up
> /dev/console
/etc/templates/webs.sh start
> /dev/console
;;
stop)
umount /tmp
umount /proc
umount /var
;;
esac

/etc/init.d/S10system.sh
/etc/init.d/S10system.sh links to> /etc/scripts/system.sh
#!/bin/sh
case "$1" in
start)
echo "start fresetd ..."
> /dev/console
fresetd &
echo "start scheduled ..."
> /dev/console
/etc/templates/scheduled.sh start
> /dev/console
echo "setup layout ..."
> /dev/console
/etc/scripts/layout.sh start
> /dev/console
echo "start LAN ..."
> /dev/console
# SEE BELLOW
/etc/templates/lan.sh start
> /dev/console
echo "enable LAN ports ..."
> /dev/console
# SEE BELLOW
/etc/scripts/enlan.sh
> /dev/console
echo "start WLAN ..."
> /dev/console
/etc/templates/wlan.sh start
> /dev/console
echo "start Guest Zone"
> /dev/console
/etc/templates/gzone.sh start > /dev/console
/etc/templates/enable_gzone.sh start
> /dev/console
echo "start RG ..."
> /dev/console
/etc/templates/rg.sh start
> /dev/console
echo "start DNRD ..."
> /dev/console
/etc/templates/dnrd.sh start
> /dev/console
# start telnet daemon MOVED
#/etc/scripts/misc/telnetd.sh
> /dev/console
# Start UPNPD
if [ "`rgdb -i -g /runtime/router/enable`" = "1" ]; then
echo "start UPNPD ..."
> /dev/console
/etc/templates/upnpd.sh start
> /dev/console
fi
echo "start WAN ..."
> /dev/console
/etc/scripts/misc/setwantype.sh > /dev/console
/etc/templates/wan.sh start
> /dev/console
echo "start LLD2D ..."
> /dev/console
/etc/templates/lld2d.sh start
> /dev/console
if [ "`rgdb -i -g /runtime/func/neaps`" = "1" ]; then
echo "start Neaps ..."
> /dev/console
/etc/templates/neaps.sh start
> /dev/console
fi
if [ "`rgdb -i -g /runtime/func/lpd`" = "1" ]; then
echo "start lpd ..."
> /dev/console
/etc/templates/lpd.sh start
> /dev/console
fi
echo "start igmpproxy ..."
/etc/templates/igmpproxy.sh start > /dev/console
if [ -f /etc/templates/smbd.sh ]; then
echo "start smbtree search ..."
/etc/templates/smbd.sh smbtree_start > /dev/console
echo "start smbmount ..."
/etc/templates/smbd.sh smbmount_start > /dev/console
fi
if [ -f /etc/templates/ledctrl.sh ]; then
echo "Change the STATUS LED..."
/etc/templates/ledctrl.sh STATUS GREEN > /dev/console
fi
if [ -f /etc/scripts/misc/profile_ca.sh ]; then
echo "get certificate file ..."
> /dev/console
/etc/scripts/misc/profile_ca.sh start
> /dev/console
fi
if [ -f /etc/templates/wimax.sh ]; then
echo "start wimax connection ..."
/etc/templates/wimax.sh start > /dev/console
fi
# ONCE CONFIGURED var/etc/httpasswd BY PROFILE,
# START TELNET WITH SAME ADMIN/PASSWORD WITH SAME DATA THAN WEB CONFIG
/etc/scripts/misc/telnetd.sh
> /dev/console
# START FTP DAEMON
#/etc/scripts/misc/ftpd.sh
> /dev/console
# AWAITING FOR INCOMING LIVE CONFIG,
/etc/scripts/misc/remotecmd.sh > /dev/console
;;
stop)
if [ -f /etc/templates/wimax.sh ]; then
echo "stop wimax connection ..."
/etc/templates/wimax.sh stop > /dev/console
fi
echo "stop igmpproxy ..."
/etc/templates/igmpproxy.sh stop > /dev/console
if [ "`rgdb -i -g /runtime/func/lpd`" = "1" ]; then
echo "stop lpd ..."
> /dev/console
/etc/templates/lpd.sh stop
> /dev/console
fi
if [ "`rgdb -i -g /runtime/func/neaps`" = "1" ]; then
echo "stop Neaps ..."
> /dev/console
/etc/templates/neaps.sh stop
> /dev/console
fi
echo "stop LLD2D ..."
> /dev/console
/etc/templates/lld2d.sh stop
> /dev/console

echo "stop WAN ..."


> /dev/console
/etc/templates/wan.sh stop
> /dev/console
if [ "`rgdb -i -g /runtime/router/enable`" = "1" ]; then
echo "stop UPNPD ..."
> /dev/console
/etc/templates/upnpd.sh stop
> /dev/console
fi
echo "stop DNRD ..."
> /dev/console
/etc/templates/dnrd.sh stop
> /dev/console
echo "stop RG ..."
> /dev/console
/etc/templates/rg.sh stop
> /dev/console
echo "stop Guest Zone ..."
> /dev/console
/etc/templates/enable_gzone.sh stop > /dev/console
/etc/templates/gzone.sh stop
> /dev/console
echo "stop WLAN ..."
> /dev/console
/etc/templates/wlan.sh stop
> /dev/console
echo "stop LAN ..."
> /dev/console
/etc/templates/lan.sh stop
> /dev/console
echo "reset layout ..."
> /dev/console
/etc/scripts/layout.sh stop
> /dev/console
echo "stop scheduled ..."
> /dev/console
/etc/templates/scheduled.sh stop
> /dev/console
echo "stop fresetd ..."
> /dev/console
# KILL ONLY FTP DAEMON
killall stupid-ftpd
killall fresetd
;;
restart)
sleep 3
$0 stop
$0 start
;;
*)
echo "Usage: system.sh {start|stop|restart}"
;;
esac
exit 0

/etc/scripts/layout.sh
/etc/scripts/layout.sh start generates /var/run/layout_start.sh
#!/bin/sh
echo [$0] $1 ... > /dev/console
echo Start router layout ...
echo "WRITE 29 24 1"
> /proc/driver/ae531x
echo "WRITE 29 25 1"
> /proc/driver/ae531x
echo "WRITE 29 26 1"
> /proc/driver/ae531x # parece q encienden/apagan
echo "WRITE 29 27 1"
> /proc/driver/ae531x
echo "WRITE 29 28 2"
> /proc/driver/ae531x
echo "WRITE 29 30 2"
> /proc/driver/ae531x
echo "WRITE 29 23 07c2" > /proc/driver/ae531x
echo "WRITE 30 1 2f00" > /proc/driver/ae531x
echo "WRITE 30 2 0030" > /proc/driver/ae531x
echo "WRITE 30 9 1089" > /proc/driver/ae531x
ifconfig vlan1 up
ifconfig vlan2 up
brctl addif br0 ath0
brctl addif br0 vlan1
brctl setbwctrl br0 ath0 900
ifconfig br0 up
rgdb -i -s /runtime/router/enable 1

/etc/templates/lan.sh generates /var/run/lan_start.sh


#!/bin/sh
echo [$0] ... > /dev/console
echo "Start LAN (br0/192.168.0.2/255.255.255.0)..." > /dev/console
ifconfig br0 192.168.0.2 netmask 255.255.255.0
echo "Start DHCP server (br0) ..." > /dev/console
echo -n > /var/run/udhcpd-br0.lease
udhcpd /var/run/udhcpd-br0.conf &
dhcpxmlpatch -f /var/run/udhcpd-br0.lease &
echo $! > /var/run/dhcppatch-br0.pid
hostname
if [ -f /usr/sbin/igmpproxy ]; then
echo "Start igmp ..." > /dev/console
/etc/templates/igmpproxy.sh start
fi

/etc/scripts/enlan.sh
#!/bin/sh
##define IP_CTRL_SOFTWARE_RESET
0x8000
#define PHY_SW_RST
0x8000
echo "WRITE 0 0 8000" > /proc/driver/ae531x
echo "WRITE 1 0 8000" > /proc/driver/ae531x
echo "WRITE 2 0 8000" > /proc/driver/ae531x
echo "WRITE 3 0 8000" > /proc/driver/ae531x

/etc/templates/wlan.sh
#!/bin/sh
echo [$0] $1 ... > /dev/console
TEMPLATES="/etc/templates/wifi"
case "$1" in
start|restart)
[ -f /var/run/wlan_stop.sh ] && sh /var/run/wlan_stop.sh > /dev/console
rgdb -A $TEMPLATES/wlan_run.php -V generate_start=1 > /var/run/wlan_start.sh
rgdb -A $TEMPLATES/wlan_run.php -V generate_start=0 > /var/run/wlan_stop.sh
sh /var/run/wlan_start.sh > /dev/console
;;
stop)
if [ -f /var/run/wlan_stop.sh ]; then
sh /var/run/wlan_stop.sh > /dev/console
rm -f /var/run/wlan_stop.sh
fi

;;
*)
echo "$0 [start|stop|restart]" > /dev/console
;;
esac

/var/run/wlan-start.sh
# cat wlan_start.sh WEP, NO FILTER MAC
#!/bin/sh
echo [$0] ... > /dev/console
echo Start WLAN interface ath0 ... > /dev/console
iwpriv ath0 mode 2
iwpriv ath0 pureg 0 #pure g mode
iwpriv ath0 wmm 1
iwpriv ath0 doth 0 # 802.11h Support 1=Enable/0=Disable
iwconfig ath0 channel 5
iwpriv ath0 bintval 100
iwconfig ath0 rts 2346
iwconfig ath0 frag 2346
iwpriv ath0 dtim_period 1
iwpriv ath0 hide_ssid 0
iwconfig ath0 rate auto
iwconfig ath0 txpower 17
echo "To set txrate to (0M). set txpower to (17db)"
iwpriv ath0 protmode 0
iwpriv ath0 xr 0
echo 1 > /proc/net/br_forward_br0
iwpriv ath0 ap_bridge 1 # allow connected clients to access each other.
iwpriv ath0 maccmd 3 #clear the mac list
iwpriv ath0 maccmd 0
echo Start WLAN interface ath0 ... > /dev/console
iwpriv ath0 authmode 1
iwconfig ath0 key s:"(MY PASS)" [1]
iwconfig ath0 essid "WLAN_22"
ifconfig ath0 up
sleep 1

Default config
Mac:
It went unbootable when I set up 7D:4A:07:D3:A0:6C as wifi0 MAC. While in recovery mode, it identified as D-Link_53:11:01 (00:80:c8:53:11:01)
defaultvalue.xml contents:
<wrgg19_conceptronic_c54brs4a>
<wan>
<rg>
<inf id="1">
<mode>2</mode>
<etherlinktype>0</etherlinktype>
<static>
<ip></ip>
<netmask></netmask>
<gateway></gateway>
<clonemac></clonemac>
<mtu>1500</mtu>
</static>
<dhcp>
<clonemac></clonemac>
<autodns>1</autodns>
<mtu>1500</mtu>
</dhcp>
<pppoe>
<mode>2</mode>
<staticip></staticip>
<user></user>
<password></password>
<acname></acname>
<acservice></acservice>
<autoreconnect>1</autoreconnect>
<ondemand>0</ondemand>
<idletimeout>0</idletimeout>
<autodns>1</autodns>
<mtu>1492</mtu>
<clonemac></clonemac>
</pppoe>
<pptp>
<mode>2</mode>
<ip></ip>
<netmask></netmask>
<gateway></gateway>
<dns></dns>
<serverip></serverip>
<user></user>
<password></password>
<autoreconnect>1</autoreconnect>
<ondemand>0</ondemand>
<idletimeout>0</idletimeout>
<autodns>1</autodns>
<mtu>1400</mtu>
</pptp>
<l2tp>
<mode>2</mode>
<ip></ip>
<netmask></netmask>
<gateway></gateway>
<dns></dns>
<serverip></serverip>
<user></user>
<password></password>
<autoreconnect>1</autoreconnect>
<ondemand>0</ondemand>
<idletimeout>0</idletimeout>
<autodns>1</autodns>
<mtu>1400</mtu>
</l2tp>
</inf>
</rg>
</wan>

<lan>
<ethernet>
<ip>192.168.0.1</ip>
<netmask>255.255.255.0</netmask>
</ethernet>
<dhcp>
<mode>1</mode>
<server>
<enable>1</enable>
<pool id="1">
<startip>192.168.0.100</startip>
<endip>192.168.0.199</endip>
<netmask>255.255.255.0</netmask>
<domain></domain>
<leasetime>604800</leasetime>
<staticdhcp>
<enable>1</enable>
</staticdhcp>
</pool>
</server>
</dhcp>
</lan>
<dnsrelay>
<mode>2</mode>
<server>
<primarydns></primarydns>
<secondarydns></secondarydns>
</server>
</dnsrelay>
<nat>
<enable>1</enable>
<general>
<gamingmode>1</gamingmode>
</general>
<dmzsrv>
<enable>0</enable>
<ip>192.168.0.0</ip>
</dmzsrv>
<passthrough>
<pppoe>1</pppoe>
<ipsec>1</ipsec>
<pptp>1</pptp>
<l2tp>1</l2tp>
</passthrough>
</nat>
<security>
<dos>
<enable>1</enable>
</dos>
<log>
<systeminfo>1</systeminfo>
<debuginfo>0</debuginfo>
<attackinfo>1</attackinfo>
<droppacketinfo>0</droppacketinfo>
<noticeinfo>1</noticeinfo>
</log>
<firewall>
<pingallow>1</pingallow>
<httpallow>0</httpallow>
<httpremoteip></httpremoteip>
<httpremoteport>8080</httpremoteport>
</firewall>
<macfilter>
<action>0</action>
<enable>0</enable>
</macfilter>
<domainblocking>
<enable>0</enable>
</domainblocking>
<urlblocking>
<enable>0</enable>
</urlblocking>
</security>
<upnp>
<enable>1</enable>
<log>1</log>
<pppoesession>0</pppoesession>
<allow_disconnect_wan>1</allow_disconnect_wan>
</upnp>
<time>
<syncwith>0</syncwith>
<timezone>28</timezone>
<daylightsaving>0</daylightsaving>
<ntpserver>
<ip>2.conceptronic.pool.ntp.org</ip>
<interval>86400</interval>
</ntpserver>
</time>
<sys>
<hostname>c54brs4a</hostname>
<sessiontimeout>300</sessiontimeout>
<locale>en</locale>
<countrycode>826</countrycode>
<user id="1">
<name>admin</name>
<password>admin</password>
<group>0</group>
</user>
</sys>
<wireless>
<enable>1</enable>
<ssid>C54BRS4A</ssid>
<autochannel>0</autochannel>
<channel>6</channel>
<authtype>0</authtype>
<encrypttype>0</encrypttype>
<wep>
<length>64</length>
<format>2</format>
<defkey>1</defkey>
</wep>
<ssidhidden>0</ssidhidden>
<wlanmode>3</wlanmode>
<beaconinterval>100</beaconinterval>
<fraglength>2346</fraglength>
<rtslength>2346</rtslength>
<ctsmode>0</ctsmode>
<preamble>2</preamble>
<txrate>0</txrate>
<txpower>1</txpower>

<dtim>1</dtim>
<atheros>
<supermode>0</supermode>
<xr>0</xr>
</atheros>
<wps>
<enable>0</enable>
<configured>0</configured>
</wps>
<wpa>
<radius id="1">
<port>1812</port>
</radius>
</wpa>
<wmm>1</wmm>
</wireless>
</wrgg19_conceptronic_c54brs4a>

Route/Bridge layout
There are 3 'hidden pages' which are supposed to change this, but I've never tried, though: dev_bridge_dhcp.php dev_bridge_static.php dev_router_lan.php If you are willing
to give them a try, please be careful, you could get your device bricked.
Also, the scripts above seem interesting:
/etc/scripts/layout.sh
#!/bin/sh
echo [$0] $1 ... > /dev/console
case "$1" in
start)
[ -f /var/run/layout_stop.sh ] && sh /var/run/layout_stop.sh > /dev/console
rgdb -A /etc/scripts/layout_run.php -V generate_start=1 > /var/run/layout_start.sh
rgdb -A /etc/scripts/layout_run.php -V generate_start=0 > /var/run/layout_stop.sh
sh /var/run/layout_start.sh > /dev/console
;;
stop)
[ -f /var/run/layout_stop.sh ] && sh /var/run/layout_stop.sh > /dev/console
rm -f /var/run/layout_stop.sh
;;
*)
echo "Usage: $0 {start|stop}"
;;
esac

/etc/scripts/layout_run.php
#!/bin/sh
echo [$0] $1 ... > /dev/console
<?
/* vi: set sw=4 ts=4: */
require("/etc/templates/troot.php");
/*
echo "config vlan ..." > /dev/console
# PHY 29, MII [28-24] - VLAN ID of Port [4-0]
echo "WRITE 29 24 3" > /proc/driver/ae531x
echo "WRITE 29 25 3" > /proc/driver/ae531x
echo "WRITE 29 26 3" > /proc/driver/ae531x
echo "WRITE 29 27 3" > /proc/driver/ae531x
echo "WRITE 29 28 5" > /proc/driver/ae531x
# PHY 29, MII 30 - default VLAN ID of Port 5 (cpu)
echo "WRITE 29 30 5" > /proc/driver/ae531x
# PHY 29, MII 23[10 to 6] - remove VLAN tags for Port [4-0]
# bit
5432 1098 7654 3210
# value 0000 0111 1100 0010 = 07c2
# bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
# value 0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 0 = 07c2
# [1] add tags for Port 5 (cpu)
echo "WRITE 29 23 07c2" > /proc/driver/ae531x
# PHY 30, MII 2[13:8] - VLAN3 output port mask
echo "WRITE 30 2 2f30" > /proc/driver/ae531x
# PHY 30, MII 3[13:8] - VLAN5 output port mask
echo "WRITE 30 3 303f" > /proc/driver/ae531x
# PHY 30, MII 9
# bit
2 1098 7654 3210
# value 1 0000 1000 1001 = 0x1089
# bit
12 11 10 9 8 7 6 5 4 3 2 1 0
# value 1 0 0 0 0 1 0 0 0 1 0 0 1 = 0x1089
# [12 to 8] Set Port [4-0] as WAN port
# [7] Enable tag VLAN function
# [3] Enable router function
# [2 to 0] LAN group number
echo "WRITE 30 9 1089" > /proc/driver/ae531x
*/
$mii_dev = "/proc/driver/ae531x";
$bridge = query("/bridge");
if ($bridge!=1) { $router_on = 1; }
else
{ $router_on = 0; }
if ($router_on==1)
{
if ($generate_start==1)
{
echo "echo Start router layout ...\n";
if (query("/runtime/router/enable")==1)
{
echo "echo Already in router mode!\n";
exit;
}
echo "echo \"WRITE 29 24 1\"
> ".$mii_dev."\n";
echo "echo \"WRITE 29 25 1\"
> ".$mii_dev."\n";
echo "echo \"WRITE 29 26 1\"
> ".$mii_dev."\n";
echo "echo \"WRITE 29 27 1\"
> ".$mii_dev."\n";
echo "echo \"WRITE 29 28 2\"
> ".$mii_dev."\n";
echo "echo \"WRITE 29 30 2\"
> ".$mii_dev."\n";
echo "echo \"WRITE 29 23 07c2\" > ".$mii_dev."\n";
#^bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
# value 0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 0 = 07c2
# [10 to 6] - remove VLAN tags for Port [4-0]

# [1] add tags for Port 5 (cpu)


echo "echo \"WRITE 30 1 2f00\" > ".$mii_dev."\n";
echo "echo \"WRITE 30 2 0030\" > ".$mii_dev."\n";
echo "echo \"WRITE 30 9 1089\" > ".$mii_dev."\n";
echo "ifconfig vlan1 up\n";
echo "ifconfig vlan2 up\n";
echo "brctl addif br0 ath0\n";
echo "brctl addif br0 vlan1\n";
echo "brctl setbwctrl br0 ath0 900\n";
echo "ifconfig br0 up\n";
echo "rgdb -i -s /runtime/router/enable 1\n";
}
else
{
echo
echo
echo
echo
echo

"brctl delif br0 vlan1\n";


"brctl delif br0 ath0\n";
"ifconfig vlan1 down\n";
"ifconfig vlan2 down\n";
"rgdb -i -s /runtime/router/enable \"\"\n";

}
}
else
{
if ($generate_start==1)
{
echo "echo Start bridge layout ...\n";
if (query("/runtime/router/enable")==0)
{
echo "echo Already in bridge mode!\n";
exit;
}
echo "echo \"WRITE 29 24 1\"
> ".$mii_dev."\n"; #NIC is aside the antenna
echo "echo \"WRITE 29 25 1\"
> ".$mii_dev."\n";
echo "echo \"WRITE 29 26 1\"
> ".$mii_dev."\n";
echo "echo \"WRITE 29 27 1\"
> ".$mii_dev."\n"; #Nic is aside the WAN port
echo "echo \"WRITE 29 28 1\"
> ".$mii_dev."\n";
echo "echo \"WRITE 29 30 1\"
> ".$mii_dev."\n";
echo "echo \"WRITE 29 23 07c0\" > ".$mii_dev."\n";
#^bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
# value 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 = 07c0
# [10 to 6] - remove VLAN tags for Port [4-0]
# [1] add tags for Port 5 (cpu)
echo "echo \"WRITE 30 9 0000\" > ".$mii_dev."\n";
echo "brctl addif br0 eth0\n";
echo "brctl addif br0 ath0\n";
echo "brctl setbwctrl br0 ath0 900\n";
echo "ifconfig br0 up\n";
echo "rgdb -i -s /runtime/router/enable 0\n";
}
else
{
echo "echo Stop bridge layout ...\n";
echo "brctl delif br0 ath0\n";
echo "brctl delif br0 eth0\n";
echo "rgdb -i -s /runtime/router/enable \"\"\n";
}
}
?>

Isolate a LAN port


LAN ports used to be assigned to vlan1. Let's change one of them:
vconfig add eth0 6 # don't use vlan 3-5
ifconfig vlan6 up
echo "WRITE 29 24 6" > /proc/driver/ae531x # Rear port 4 goes to vlan6
brctl addif br0 vlan6 # if you don't add it to the brigde, that IP will have no networking
route add -host 192.168.0.102 dev vlan6

now, route should give out sort of this:


Kernel IP routing table
Destination
Gateway
Genmask
192.168.0.102
*
255.255.255.255
192.168.0.0
*
255.255.255.0
77.27.16.0
*
255.255.248.0
239.0.0.0
*
255.0.0.0
default
1.16.27.77.dyna 0.0.0.0
# ^ note that I'm running one more brigde in my

Flags Metric Ref


Use Iface
UH
0
0
0 vlan6
U
0
0
0 br0
U
0
0
0 vlan2
U
0
0
0 br0
UG
0
0
0 vlan2
computer, between the router and my ISP.

Duplicate traffic
Actually, this will not work unless you patch the kernel with and added feature, although there is an easier working way of "teeing", but only UPD (use google);
Esto no funciona sin parchear el ncleo.
Con esto ya basta ejecutar el siguiente comando en el sistema remoto para para retransmitir con iptables [28] hacia nuestro sistema de monitorizacin:
iptables -t mangle -I FORWARD -j ROUTE -- gw 192.168.100.21 -- tee

Sin embargo, si deseamos ver todo el trfico que se intenta enviar un host concreto, en este caso 192.168.100.22, deberamos hacer la retransmisin antes que en la subtabla
FORWARD por si las reglas de filtrado actuasen antes de dicha subtabla eliminando paquetes que el host est enviando:

a
iptables -t mangle -I PREROUTING -s 192.168.0.102 -j ROUTE -- gw 192.168.0.104 -- tee
iptables -t mangle -I POSTROUTING -d 1 92.168.0.102 -j ROUTE -- gw 192.168.0.104 -- tee

Assorted RGDB info

# rgdb -i -g /runtime/wan/inf:1/gateway < it gives out your ISP gateway


if( get("j",$_PREFIX."/wan/rg/inf:1/mode") == "5" )
$path = $prefix."/wan/rg/inf:1/l2tp/mode";
$l2tpMode = get("j",$path);
$path = $prefix."/wan/rg/inf:1/l2tp/ip";
$l2tpIp = get("j",$path);
$path = $prefix."/wan/rg/inf:1/l2tp/netmask";
$l2tpMask = get("j",$path);
$path = $prefix."/wan/rg/inf:1/l2tp/gateway";
$l2tpGw = get("j",$path);
$path = $prefix."/wan/rg/inf:1/l2tp/dns";
$l2tpDns = get("j",$path);
$path = $prefix."/wan/rg/inf:1/l2tp/serverip";
$l2tpSrvIp = get("j",$path);
$path = $prefix."/wan/rg/inf:1/l2tp/user";
$l2tpUser = get("j",$path);
$path = $prefix."/wan/rg/inf:1/l2tp/password";
$l2tpPass = get("j",$path);
$l2tpPass = $G_PASSWORD;
$path = $prefix."/wan/rg/inf:1/l2tp/autoreconnect";
$l2tpAuto = get("j",$path);
$path = $prefix."/wan/rg/inf:1/l2tp/ondemand";
$l2tpDemand = get("j",$path);
$path = $prefix."/wan/rg/inf:1/l2tp/idletimeout";
$l2tpIdle = get("j",$path);
$path = $prefix."/wan/rg/inf:1/l2tp/mtu";
$path = $prefix."/wan/rg/inf:1/dhcp/clonemac";
$path = $_PREFIX."/lan/ethernet/ip";
$lanIp = get("j", $path );
$path = $_PREFIX."/lan/ethernet/netmask";
$lanMask = get("j", $path );
$path = $_PREFIX."/sys/hostname";
$hostName = get("j", $path );
$path = $PREFIX."/dnsrelay/mode";
$dnsMode = get("j", $path );
$checkIP = get("j", "/lan/ethernet/ip");
$checkMask = get("j", "/lan/ethernet/netmask");

# rgdb -i -g /lan/ethernet/ip < it gives out the router's IP (LAN gateway)


$wanIp = get("h", "/wan/rg/inf:1/static/ip");
# cable status
xmldbc -x /runtime/switch/port:1/linktype
xmldbc -x /runtime/switch/port:2/linktype
xmldbc -x /runtime/switch/port:3/linktype
xmldbc -x /runtime/switch/port:4/linktype
xmldbc -x /runtime/switch/wan_port

"get:psts -i 3"
"get:psts -i 2"
"get:psts -i 1"
"get:psts -i 0"
"get:psts -i 4"

# rgdb -i -g /runtime/layout/wanif
vlan2
# rgdb -i -g /runtime/layout/lanif
br0
# rgdb -i -g /runtime/layout/wlanif
ath0

Retrieved from "https://wikidevi.com/w/index.php?title=Conceptronic_C54BRS4A_2.0&oldid=126001"


Categories: Embedded system/wireless router Wireless embedded system
This page was last modified on 21 May 2014, at 02:20.
This page has been accessed 2,091 times.
Content is available under Creative Commons Attribution Share Alike unless otherwise noted.

Das könnte Ihnen auch gefallen