OpenWrt Forum Archive

Topic: Unbranded XDX-RN502R

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

Looking for a cheap and small device to hack on, I bought a router advertised as TopLink RT-3GWT, or Portable Wireless router model C1291, or CW-G3. I have seen other model numbers from other merchants that look the same, but the one I got has a writing on the PCB: XDX-RN502R V2.0

http://mesh.openisp.ca/hardware/Bococom-DWR150/RT-3GWT_2.jpg

http://mesh.openisp.ca/hardware/Bococom-DWR150/bococom-bare.jpg

Here are its characteristics:
* Ralink RT3050F
* 4MB Flash, 32MB RAM
* USB port
* Ethernet port
* RP-SMA antenna connector
* 12 volt power adapter

I can telnet into the original firmware and I get:

Welcome to  Bococom Router Series
  For detailed information, please check:
        www.bococom.com


BusyBox v1.12.1 (2010-11-26 17:38:48 CST) built-in shell (msh)
Enter 'help' for a list of built-in commands.

This lead me to a post on this forum about a similar board based on the big brother Ralink 3052 which has two antennas and an ethernet switch, the XDX-RN502J:

https://forum.openwrt.org/viewtopic.php?pid=163152

So I bought a TTL-level serial cable and soldered it. Here's the output of the original firmware:

U-Boot 1.1.3 (Apr  7 2010 - 09:43:57)                                           

Board: Ralink APSoC DRAM:  32 MB                                                
relocate_code Pointer at: 81fac000                                              
======= config usb otg =====                                                    
flash_protect ON: from 0xBF000000 to 0xBF0205C3                                 
protect on 0                                                                    
protect on 1                                                                    
protect on 2                                                                    
protect on 3                                                                    
protect on 4                                                                    
protect on 5
protect on 6                                                                    
protect on 7                                                                    
protect on 8                                                                    
protect on 9                                                                    
flash_protect ON: from 0xBF030000 to 0xBF03FFFF                                 
protect on 10                                                                   
*** Warning - bad CRC, using default environment                                

============================================                                    
Ralink UBoot Version: 3.2                                                       
--------------------------------------------                                    
ASIC 3052_MP2 (Port5<->None)                                                    
DRAM COMPONENT: 256Mbits                                                        
DRAM BUS: 16BIT                                                                 
Total memory: 32 MBytes                                                         
Date:Apr  7 2010  Time:09:43:57                                                 
============================================                                    
icache: sets:128, ways:4, linesz:32 ,total:16384                                
dcache: sets:128, ways:4, linesz:32 ,total:16384                                

 ##### The CPU freq = 320 MHZ ####                                              

SDRAM bus set to 16 bit                                                         
 SDRAM size =32 Mbytes                                                          

Please choose the operation:                                                    
   1: Load system code to SDRAM via TFTP.                                       
   2: Load system code then write to Flash via TFTP.                            
   3: Boot system code via Flash (default).                                     
   4: Entr boot command line interface.                                         
   9: Load Boot Loader code then write to Flash via TFTP.                       

You choosed 3                                                                   

 0                                                                              

3: System Boot system code via Flash.                                           
## Booting image at bf050000 ...                                                
   Image Name:   Linux Kernel Image                                             
   Created:      2011-05-25   7:38:47 UTC                                       

 System Control Status = 0x00400000                                             
   Image Type:   MIPS Linux Kernel Image (lzma compressed)                      
   Data Size:    3502016 Bytes =  3.3 MB                                        
   Load Address: 80000000                                                       
   Entry Point:  802d2000                                                       
   Verifying Checksum ... OK                                                    
   Uncompressing Kernel Image ... OK                                            
No initrd                                                                       
## Transferring control to Linux (at address 802d2000) ...                      
## Giving linux memsize in MB, 32                                               

Starting kernel ...                                                             


LINUX started...                                                                

 THIS IS ASIC                                                                   

3G Router Start!

Then the console goes silent and does not echo back what I type.

Choosing option #4 to enter the U-Boot menu, I'm able to see some variables:

RT3052 # printenv                                                               
bootcmd=tftp                                                                    
bootdelay=5                                                                     
baudrate=57600                                                                  
ethaddr="00:AA:BB:CC:DD:10"                                                     
ipaddr=10.10.10.123                                                             
serverip=10.10.10.3                                                             
preboot=echo;echo                                                               
ramargs=setenv bootargs root=/dev/ram rw                                        
addip=setenv bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):$(netdev):off
addmisc=setenv bootargs $(bootargs) console=ttyS0,$(baudrate) ethaddr=$(ethaddr) panic=1
flash_self=run ramargs addip addmisc;bootm $(kernel_addr) $(ramdisk_addr)
kernel_addr=BFC40000                                                            
u-boot=u-boot.bin                                                               
load=tftp 8A100000 $(u-boot)                                                    
u_b=protect off 1:0-1;era 1:0-1;cp.b 8A100000 BC400000 $(filesize)              
loadfs=tftp 8A100000 root.cramfs                                                
u_fs=era bc540000 bc83ffff;cp.b 8A100000 BC540000 $(filesize)                   
test_tftp=tftp 8A100000 root.cramfs;run test_tftp                               
stdin=serial                                                                    
stdout=serial                                                                   
stderr=serial                                                                   
ethact=Eth0 (10/100-M)                                                          

Environment size: 783/65532 bytes

Here are the other available commands:

RT3052 # help                                                                   
?       - alias for 'help'                                                      
boot    - boot default, i.e., run 'bootcmd'                                     
bootd   - boot default, i.e., run 'bootcmd'                                     
bootm   - boot application image from memory                                    
bootp   - boot image via network using BootP/TFTP protocol                      
cp      - memory copy                                                           
echo    - echo args to console                                                  
erase   - erase FLASH memory                                                    
go      - start application at address 'addr'                                   
help    - print online help                                                     
loadb   - load binary file over serial line (kermit mode)                       
md      - memory display                                                        
mdio   - Ralink PHY register R/W command !!                                     
mm      - memory modify (auto-incrementing)                                     
mw      - memory write (fill)                                                   
nm      - memory modify (constant address)                                      
printenv- print environment variables                                           
protect - enable or disable FLASH write protection                              
reset   - Perform RESET of the CPU                                              
run     - run commands in an environment variable                               
saveenv - save environment variables to persistent storage                      
setenv  - set environment variables                                             
spicmd  - read/write data from/to eeprom or vtss                                
tftpboot- boot image via network using TFTP protocol                            
loopback   - Ralink eth loopback test !!                                        
version - print monitor version

I compiled OpenWRT with these settings:

Target System: Ralink RT288x/RT3xxx
Subtarget: RT305x based boards
Target Profile Default Profile
Target images: ramdisk

Here's what I got by booting from the generated openwrt-ramips-rt305x-xdxrn502j-initramfs-uImage.bin image:

U-Boot 1.1.3 (Apr  7 2010 - 09:43:57)

Board: Ralink APSoC DRAM:  32 MB
relocate_code Pointer at: 81fac000
======= config usb otg ===== 
flash_protect ON: from 0xBF000000 to 0xBF0205C3
protect on 0
protect on 1
protect on 2
protect on 3
protect on 4
protect on 5
protect on 6
protect on 7
protect on 8
protect on 9
flash_protect ON: from 0xBF030000 to 0xBF03FFFF
protect on 10
============================================ 
Ralink UBoot Version: 3.2
-------------------------------------------- 
ASIC 3052_MP2 (Port5<->None)
DRAM COMPONENT: 256Mbits 
DRAM BUS: 16BIT 
Total memory: 32 MBytes
Date:Apr  7 2010  Time:09:43:57
============================================ 
icache: sets:128, ways:4, linesz:32 ,total:16384
dcache: sets:128, ways:4, linesz:32 ,total:16384 

 ##### The CPU freq = 320 MHZ #### 

SDRAM bus set to 16 bit 
 SDRAM size =32 Mbytes

Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   2: Load system code then write to Flash via TFTP. 
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   9: Load Boot Loader code then write to Flash via TFTP. 

You choosed 1

 0 

 eth_register  
Eth0 (10/100-M)
 enetvar=ethaddr,Eth addr:00:AA:BB:CC:DD:10
 00:AA:BB:CC:DD:10:

 eth_current->name = Eth0 (10/100-M)

   
1: System Load Linux to SDRAM via TFTP. 
 Please Input new ones /or Ctrl-C to discard
        Input device IP (192.168.1.1) ==:      

        Input server IP (192.168.1.2) ==:

        Input Linux Kernel filename (xdxrn502j.bin) ==:


 netboot_common, argc= 3 
 *************buf = 0x81fcc740
 **********NexTxPacket = 81fe4840

 NetTxPacket = 0x81FE4840 

 NetRxPackets[0] = 0x81FE4E40

 NetRxPackets[1] = 0x81FE5440

 NetRxPackets[2] = 0x81FE5A40

 NetRxPackets[3] = 0x81FE6040

 NetRxPackets[4] = 0x81FE6640

 NetRxPackets[5] = 0x81FE6C40

 NetRxPackets[6] = 0x81FE7240

 NetRxPackets[7] = 0x81FE7840

 NetRxPackets[8] = 0x81FE7E40

 NetRxPackets[9] = 0x81FE8440

 NetRxPackets[10] = 0x81FE8A40

 NetRxPackets[11] = 0x81FE9040

 NetRxPackets[12] = 0x81FE9640

 NetRxPackets[13] = 0x81FE9C40

 NetRxPackets[14] = 0x81FEA240

 NetRxPackets[15] = 0x81FEA840

 NetRxPackets[16] = 0x81FEAE40

 NetRxPackets[17] = 0x81FEB440

 NetRxPackets[18] = 0x81FEBA40

 NetRxPackets[19] = 0x81FEC040

 KSEG1ADDR(NetTxPacket) = 0xA1FE4840 

 NetLoop,call eth_halt ! 

 NetLoop,call eth_init ! 
Trying Eth0 (10/100-M)

 Waitting for RX_DMA_BUSY status Start... done

 Header Payload scatter function is Disable !! 

 ETH_STATE_ACTIVE!! 
Using Eth0 (10/100-M) device
TFTP from server 192.168.1.2; our IP address is 192.168.1.1
Filename 'xdxrn502j.bin'.

 TIMEOUT_COUNT=10,Load address: 0x80800000
Loading: Got ARP REPLY, set server/gtwy eth addr (00:50:ba:0d:35:9e)
Got it
T #
 first block received  
################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################
done
Bytes transferred = 2243740 (223c9c hex)
NetBootFileXferSize= 00223c9c
Automatic boot of image at addr 0x80800000 ...
## Booting image at 80800000 ...
   Image Name:   MIPS OpenWrt Linux-3.2.15
   Created:      2012-04-25   4:18:59 UTC

 System Control Status = 0x00400000 
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    2243676 Bytes =  2.1 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 32

Starting kernel ...

[    0.000000] Linux version 3.2.15 (nicolas@cortex) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #6 Wed Apr 25 00:18:02
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] Ralink RT3350 id:1 rev:2 running at 320.00 MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[1] active PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=XDXRN502J console=ttyS1,57600 mtdparts=physmap-flash.0:192k(u-boot)ro,64k(u-boot-env)ro,64k(factory2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 16kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=0000f648
[    0.000000] Readback ErrCtl register=0000f648
[    0.000000] Memory: 28612k/32768k available (1889k kernel code, 4156k reserved, 316k data, 1532k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:48
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.010000] Calibrating delay loop... 212.58 BogoMIPS (lpj=1062912)
[    0.090000] pid_max: default: 32768 minimum: 301
[    0.090000] Mount-cache hash table entries: 512
[    0.100000] NET: Registered protocol family 16
[    0.110000] MIPS: machine is XDX RN502J
[    0.140000] bio: create slab <bio-0> at 0
[    0.150000] Switching to clocksource MIPS
[    0.170000] NET: Registered protocol family 2
[    0.170000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.190000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.200000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.220000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.230000] TCP reno registered
[    0.240000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.250000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.260000] NET: Registered protocol family 1
[    4.160000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    4.170000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    4.190000] msgmni has been set to 55
[    4.200000] io scheduler noop registered
[    4.210000] io scheduler deadline registered (default)
[    4.220000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    4.230000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[    4.250000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    4.270000] physmap platform flash device: 00800000 at bf000000
[    4.280000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a8
[    4.300000] Amd/Fujitsu Extended Query Table at 0x0040
[    4.310000]   Amd/Fujitsu Extended Query version 1.1.
[    4.320000] number of CFI chips: 1
[    4.330000] 6 cmdlinepart partitions found on MTD device physmap-flash.0
[    4.340000] Creating 6 MTD partitions on "physmap-flash.0":
[    4.350000] 0x000000000000-0x000000030000 : "u-boot"
[    4.370000] 0x000000030000-0x000000040000 : "u-boot-env"
[    4.390000] 0x000000040000-0x000000050000 : "factory"
[    4.400000] 0x000000050000-0x000000130000 : "kernel"
[    4.420000] 0x000000130000-0x000000400000 : "rootfs"
[    4.430000] mtd: partition "rootfs" set to be root filesystem
[    4.440000] split_squashfs: no squashfs found in "physmap-flash.0"
[    4.460000] 0x000000050000-0x000000400000 : "firmware"
[    4.480000] TCP westwood registered
[    4.490000] NET: Registered protocol family 17
[    4.500000] 8021q: 802.1Q VLAN Support v1.8
[    4.530000] Freeing unused kernel memory: 1532k freed
[    5.690000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/input0
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
- init -

Please press Enter to activate this console. [    9.670000] Compat-wireless backport release: compat-wireless-2012-04-17-1-r31387
[    9.680000] Backport based on wireless-testing.git master-2012-04-17
[    9.740000] cfg80211: Calling CRDA to update world regulatory domain
[    9.940000] cfg80211: World regulatory domain updated:
[    9.950000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    9.970000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    9.980000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   10.000000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   10.010000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.030000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.160000] SCSI subsystem initialized
[   10.240000] usbcore: registered new interface driver usbfs
[   10.250000] usbcore: registered new interface driver hub
[   10.270000] usbcore: registered new device driver usb
[   10.480000] usbcore: registered new interface driver rtl8187
272+0 records in
272+0 records out
[   10.830000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.130000] nf_conntrack version 0.5.0 (471 buckets, 1884 max)
[   11.560000] batman_adv: B.A.T.M.A.N. advanced 2012.1.0 (compatibility version 14) loaded
[   11.650000] i2c /dev entries driver
[   11.700000] dwc_otg: version 2.72a 24-JUN-2008
[   11.710000] dwc_otg: Core Release: 2.66a
[   11.920000] dwc_otg: Periodic Transfer Interrupt Enhancement - disabled
[   11.930000] dwc_otg: Multiprocessor Interrupt Enhancement - disabled
[   11.940000] dwc_otg: Using DMA mode
[   11.950000] dwc_otg: Device using Buffer DMA mode
[   11.960000] dwc_otg dwc_otg.0: DWC OTG Controller
[   11.970000] dwc_otg dwc_otg.0: new USB bus registered, assigned bus number 1
[   11.990000] dwc_otg dwc_otg.0: irq 26, io mem 0x101c0000
[   12.000000] dwc_otg: Init: Port Power? op_state=1
[   12.010000] dwc_otg: Init: Power Port (0)
[   12.020000] hub 1-0:1.0: USB hub found
[   12.020000] hub 1-0:1.0: 1 port detected
[   12.100000] Initializing USB Mass Storage driver...
[   12.110000] usbcore: registered new interface driver usb-storage
[   12.120000] USB Mass Storage support registered.
[   12.170000] Linux video capture interface: v2.00
[   12.250000] usbcore: registered new interface driver zd1211rw
[   12.310000] gspca_main: v2.14.0 registered
[   16.590000] ramips-wdt: timeout value 60 must be 0 < timeout < 40
[   24.800000] device eth0.1 entered promiscuous mode
[   24.810000] device eth0 entered promiscuous mode
[   24.940000] br-lan: port 1(eth0.1) entering forwarding state
[   24.960000] br-lan: port 1(eth0.1) entering forwarding state
^[OM


BusyBox v1.19.4 (2012-04-23 23:51:27 EDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 ATTITUDE ADJUSTMENT (31387, r31387)
 -----------------------------------------------------
  * 1/4 oz Vodka      Pour all ingredients into mixing
  * 1/4 oz Gin        tin with ice, strain into glass.
  * 1/4 oz Amaretto
  * 1/4 oz Triple sec
  * 1/4 oz Peach schnapps
  * 1/4 oz Sour mix
  * 1 splash Cranberry juice
 -----------------------------------------------------
root@OpenWrt:/#

This is promising! The wireless card works (after enabling it in /etc/config/wireless and doing /etc/init.d/network restart), and there are eth0, eth0.1 and eth0.2 although there's only one ethernet port. I suppose this is because the XDX-RN502J board has more than one, and this can be fixed by some configuration. The LAN LED flashes correctly, and the 3G LED flashes during boot, then stays ON. When I bring wlan0 up with ifconfig, the WIFI LED goes ON. All good :)

However, when restarting the network, I see these errors:

root@OpenWrt:/# /etc/init.d/network restart
/sbin/wifi: eval: line 1: hostapd_set_log_options: not found
/sbin/wifi: eval: line 1: hostapd_set_bss_options: not found
/sbin/wifi: eval: line 1: hostapd: not found
Failed to start hostapd for phy0

I don't know how to fix that.

I would now like to write this image to the flash memory, but I don't know how I should do that. I'm currently booting with a ramfs+initrd image. Ideally, I would flash from the web interface, so nobody else has to solder a cable to flash this model.

Currently, here are the options I see for flashing:
* Using "2: Load system code then write to Flash via TFTP." from U-Boot menu
* Using "4: Entr boot command line interface." from U-Boot menu, download the image (how?) and write it to the correct address (which?)
* Download the image while running OpenWRT and write it with mtd or dd
* Original firmware web interface, which has a form to upload a firmware

Here's the mtd layout:

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00030000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00010000 00010000 "factory"
mtd3: 000e0000 00010000 "kernel"
mtd4: 002d0000 00010000 "rootfs"
mtd5: 003b0000 00010000 "firmware"

I'm not sure where to start.

It is important to me to test the flashing from the original firmware, so I made a backup of the mtdX devices so I can copy them back in case I wipe it. I guess I could restore it by booting this ramfs image I'm using, then dd the mtd partitions back to the flash.

great work !
I have the same model at home waiting to get some time to post the details you mentioned above.
I also connected serial TTl and i'm unable to get commands to it.
Please detail for me how you managed to ged it into its bootloader and send openwrt.
I have some upgrade images and i want to work on flashing from original web gui.
PM me and let's work together.

Over the last few days, I used the patch that added support for the XDX-RN502J to add support to my XDX-RN502R. I have pushed my changes to GitHub in this branch: https://github.com/elecnix/openwrt/tree/xdx-rn502r My plan is to produce a patch and submit it to inclusion in OpenWRT trunk, but I'm stuck with one problem: the ethernet port has a bug.

Here's the issue: tcpdump on the router sees all traffic from the connected computer or network. However, nothing goes out. When I ping my laptop from the router, the LAN LED does not even flash. A friend had a look at the Ralink documentation, and he asked to have a look at the memory registers at address 0x10110000, so I went into the U-Boot shell and I'm copying it here. I have no idea what to do with this, and since I haven't heard from my friend, I'm updating this thread to get more help.

RT3052 # md 0x10110000 256
10110000: 04000000 7fffffff ffc86e5a 00000014    ........Zn......
10110010: 0f000000 00401555 03030303 0000016e    ....U.@.....n...
10110020: 00000000 00000004 00000000 00000000    ................
10110030: 00000000 00080000 0000e40d 09692a44    ............D*i.
10110040: 00001001 00001001 00001002 00000001    ................
10110050: 00002001 00004003 00006005 00008007    . ...@...`......
10110060: 0000a009 0000c00b 0000e00d 0001000f    ................
10110070: ffff506f ffffffff ffffffff ffffffff    oP..............
10110080: 81808100 00000000 00000000 02404040    ............@@@.
10110090: 10007f7f 00000000 00007f7f 0008a301    ................
101100a0: 00000000 00000005 00000005 00000005    ................
101100b0: 00000005 00000005 0000001e 00000000    ................
101100c0: 80001f00 00000000 3f502b28 0002500c    ........(+P?.P..
101100d0: 00000000 00000000 40000000 0000006a    ...........@j...
101100e0: 00000000 00000000 00000000 00000000    ................
101100f0: 00000000 00000000 00000000 00000000    ................
10110100: 00000000 00000000 00000000 00000000    ................
10110110: 00000000 00000000 00000000 00000000    ................
10110120: 00000000 00000000 00000000 00000000    ................
10110130: 00000000 00000000 00000000 00000000    ................
10110140: 00000000 00000000 00000000 00000000    ................
10110150: 00000000 00000000 00000000 00000000    ................
10110160: 00000000 00000000 00000000 00000000    ................
10110170: 00000000 00000000 00000000 00000000    ................
10110180: 00000000 00000000 00000000 00000000    ................
10110190: 00000000 00000000 00000000 00000000    ................
101101a0: 00000000 00000000 00000000 00000000    ................
101101b0: 00000000 00000000 00000000 00000000    ................
101101c0: 00000000 00000000 00000000 00000000    ................
101101d0: 00000000 00000000 00000000 00000000    ................
101101e0: 00000000 00000000 00000000 00000000    ................
101101f0: 00000000 00000000 00000000 00000000    ................
10110200: 00000000 00000000 00000000 00000000    ................
10110210: 00000000 00000000 00000000 00000000    ................
10110220: 00000000 00000000 00000000 00000000    ................
10110230: 00000000 00000000 00000000 00000000    ................
10110240: 00000000 00000000 00000000 00000000    ................
10110250: 00000000 00000000 00000000 00000000    ................
10110260: 00000000 00000000 00000000 00000000    ................
10110270: 00000000 00000000 00000000 00000000    ................
10110280: 00000000 00000000 00000000 00000000    ................
10110290: 00000000 00000000 00000000 00000000    ................
101102a0: 00000000 00000000 00000000 00000000    ................
101102b0: 00000000 00000000 00000000 00000000    ................
101102c0: 00000000 00000000 00000000 00000000    ................
101102d0: 00000000 00000000 00000000 00000000    ................
101102e0: 00000000 00000000 00000000 00000000    ................
101102f0: 00000000 00000000 00000000 00000000    ................
10110300: 00000000 00000000 00000000 00000000    ................
10110310: 00000000 00000000 00000000 00000000    ................
10110320: 00000000 00000000 00000000 00000000    ................
10110330: 00000000 00000000 00000000 00000000    ................
10110340: 00000000 00000000 00000000 00000000    ................
10110350: 00000000 00000000 00000000 00000000    ................
10110360: 00000000 00000000 00000000 00000000    ................
10110370: 00000000 00000000 00000000 00000000    ................
10110380: 00000000 00000000 00000000 00000000    ................
10110390: 00000000 00000000 00000000 00000000    ................
101103a0: 00000000 00000000 00000000 00000000    ................
101103b0: 00000000 00000000 00000000 00000000    ................
101103c0: 00000000 00000000 00000000 00000000    ................
101103d0: 00000000 00000000 00000000 00000000    ................
101103e0: 00000000 00000000 00000000 00000000    ................
101103f0: 00000000 00000000 00000000 00000000    ................
10110400: 00000000 00000000 00000000 00000000    ................
10110410: 00000000 00000000 00000000 00000000    ................
10110420: 00000000 00000000 00000000 00000000    ................
10110430: 00000000 00000000 00000000 00000000    ................
10110440: 00000000 00000000 00000000 00000000    ................
10110450: 00000000 00000000 00000000 00000000    ................
10110460: 00000000 00000000 00000000 00000000    ................
10110470: 00000000 00000000 00000000 00000000    ................
10110480: 00000000 00000000 00000000 00000000    ................
10110490: 00000000 00000000 00000000 00000000    ................
101104a0: 00000000 00000000 00000000 00000000    ................
101104b0: 00000000 00000000 00000000 00000000    ................
101104c0: 00000000 00000000 00000000 00000000    ................
101104d0: 00000000 00000000 00000000 00000000    ................
101104e0: 00000000 00000000 00000000 00000000    ................
101104f0: 00000000 00000000 00000000 00000000    ................
10110500: 00000000 00000000 00000000 00000000    ................
10110510: 00000000 00000000 00000000 00000000    ................
10110520: 00000000 00000000 00000000 00000000    ................
10110530: 00000000 00000000 00000000 00000000    ................
10110540: 00000000 00000000 00000000 00000000    ................
10110550: 00000000 00000000 00000000 00000000    ................
10110560: 00000000 00000000 00000000 00000000    ................
10110570: 00000000 00000000 00000000 00000000    ................
10110580: 00000000 00000000 00000000 00000000    ................
10110590: 00000000 00000000 00000000 00000000    ................
101105a0: 00000000 00000000 00000000 00000000    ................
101105b0: 00000000 00000000 00000000 00000000    ................
101105c0: 00000000 00000000 00000000 00000000    ................
101105d0: 00000000 00000000 00000000 00000000    ................
101105e0: 00000000 00000000 00000000 00000000    ................
101105f0: 00000000 00000000 00000000 00000000    ................
10110600: 00000000 00000000 00000000 00000000    ................
10110610: 00000000 00000000 00000000 00000000    ................
10110620: 00000000 00000000 00000000 00000000    ................
10110630: 00000000 00000000 00000000 00000000    ................
10110640: 00000000 00000000 00000000 01010404    ................
10110650: 00000000 00000000 00000000 00000000    ................
10110660: 00000000 00000000 00000000 00000000    ................
10110670: 00000000 00000000 00000000 00000000    ................
10110680: 00000000 00000000 00000000 00000000    ................
10110690: 00000000 00000000 00000000 00000000    ................
101106a0: 00000000 00000000 00000000 00000000    ................
101106b0: 00000000 00000000 00000000 00000000    ................
101106c0: 00000000 00000000 00000000 00000000    ................
101106d0: 00000000 00000000 00000000 00000000    ................
101106e0: 00000000 00000000 00000000 00000000    ................
101106f0: 00000000 00000000 00000000 00000000    ................
10110700: 00000000 00000000 00000000 00000000    ................
10110710: 00000000 00000000 00000000 00000000    ................
10110720: 00000000 00000000 00000000 00000000    ................
10110730: 00000000 00000000 00000000 00000000    ................
10110740: 00000000 00000000 00000000 00000000    ................
10110750: 00000000 00000000 00000000 00000000    ................
10110760: 00000000 00000000 00000000 00000000    ................
10110770: 00000000 00000000 00000000 00000000    ................
10110780: 00000000 00000000 00000000 00000000    ................
10110790: 00000000 00000000 00000000 00000000    ................
101107a0: 00000000 00000000 00000000 00000000    ................
101107b0: 00000000 00000000 00000000 00000000    ................
101107c0: 00000000 00000000 00000000 00000000    ................
101107d0: 00000000 00000000 00000000 00000000    ................
101107e0: 00000000 00000000 00000000 00000000    ................
101107f0: 00000000 00000000 00000000 00000000    ................
10110800: 04000000 7fffffff ffc86e5a 00000014    ........Zn......
10110810: 0f000000 00401555 03030303 0000016e    ....U.@.....n...
10110820: 00000000 00000004 00000000 00000000    ................
10110830: 00000000 00080000 0000e40d 09692a44    ............D*i.
10110840: 00001001 00001001 00001002 00000001    ................
10110850: 00002001 00004003 00006005 00008007    . ...@...`......
10110860: 0000a009 0000c00b 0000e00d 0001000f    ................
10110870: ffff506f ffffffff ffffffff ffffffff    oP..............
10110880: 81808100 00000000 00000000 02404040    ............@@@.
10110890: 10007f7f 00000000 00007f7f 0008a301    ................
101108a0: 00000000 00000005 00000005 00000005    ................
101108b0: 00000005 00000005 0000001e 00000000    ................
101108c0: 80001f00 00000000 3f502b28 0002500c    ........(+P?.P..
101108d0: 00000000 00000000 40000000 0000006a    ...........@j...
101108e0: 00000000 00000000 00000000 00000000    ................
101108f0: 00000000 00000000 00000000 00000000    ................
10110900: 00000000 00000000 00000000 00000000    ................
10110910: 00000000 00000000 00000000 00000000    ................
10110920: 00000000 00000000 00000000 00000000    ................
10110930: 00000000 00000000 00000000 00000000    ................
10110940: 00000000 00000000 00000000 00000000    ................
10110950: 00000000 00000000    ........

i've flashed the WR5123GN 4M build and it worked for 6 days with > 6 clients in AP mode.
Also tested UMTS modem connection and it worked without issue.
maybe it's not the answer you're hoping for but i suggest to try patching the WR5123GN profile instead

You say nothing of your config. By default openwrt groups port0-port4 of internal switch into 2 vlan. After that two interfaces - eth0.1 and eth0.2 may be configured. I think you have to configure and check/ping both (we don't known which port physically connected).

I applied the patch that adds swconfig support to ramips chips (http://patchwork.openwrt.org/patch/2159/) and here is the output:

root@bococom1:/# swconfig dev rt305x show
Global attributes:
        enable_vlan: 1
        alternate_vlan_disable: 0
Port 0:
        disable: 0
        doubletag: 0
        en_vlan: 1
        untag: 1
        led: 0
        lan: 0
        recv_bad: 0
        recv_good: 5383
        pvid: 2
        link: port:0 link:up speed:100baseT full-duplex 
Port 1:
        disable: 0
        doubletag: 0
        en_vlan: 1
        untag: 1
        led: 0
        lan: 1
        recv_bad: 0
        recv_good: 0
        pvid: 1
        link: port:1 link:down
Port 2:
        disable: 0
        doubletag: 0
        en_vlan: 1
        untag: 1
        led: 0
        lan: 1
        recv_bad: 0
        recv_good: 0
        pvid: 1
        link: port:2 link:down
Port 3:
        disable: 0
        doubletag: 0
        en_vlan: 1
        untag: 1
        led: 0
        lan: 1
        recv_bad: 0
        recv_good: 0
        pvid: 1
        link: port:3 link:down
Port 4:
        disable: 0
        doubletag: 0
        en_vlan: 1
        untag: 1
        led: 0
        lan: 1
        recv_bad: 0
        recv_good: 0
        pvid: 1
        link: port:4 link:down
Port 5:
        disable: 1
        doubletag: 0
        en_vlan: 1
        untag: 1
        led: ???
        lan: 1
        recv_bad: 0
        recv_good: 0
        pvid: 1
        link: port:5 link:down
Port 6:
        disable: 0
        doubletag: 0
        en_vlan: 1
        untag: 0
        led: ???
        lan: ???
        recv_bad: ???
        recv_good: ???
        pvid: 1
        link: port:6 link:up speed:1000baseT full-duplex 
VLAN 1:
        ports: 1 2 3 4 6t 
VLAN 2:
        ports: 0 6t

Yes, it's default hardware config. It shows that port0 physically connected (rcvd pkts !=0 and link up). And your active interface eth0.2. So you need configure it properly. By default eth0.2 - WAN smile. Show/see your /etc/config/network.

I was booting the patched image without flashing, but when I write it to flash I get the config generated by ramips_setup_rt3x5x_vlans:

config interface 'lan'
        option ifname 'eth0.1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
                              
config switch                 
        option name 'rt305x'  
        option reset '1'    
        option enable_vlan '1'
                              
config switch_vlan            
        option device 'rt305x'
        option vlan '1'       
        option ports '1 2 3 4  6t'
                                  
config switch_vlan                
        option device 'rt305x'    
        option vlan '2'           
        option ports '0  6t'

I tried to ping 192.168.1.2 and got no response. I changed the lan bridge to use eth0.2, restarted the network, and got the same result.

It's strange. Please change port0 and port4:

config interface 'lan'
        option ifname 'eth0.1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
                              
config switch                 
        option name 'rt305x'  
        option reset '1'    
        option enable_vlan '1'
                              
config switch_vlan            
        option device 'rt305x'
        option vlan '1'       
        option ports '0 1 2 3   6t'
                                  
config switch_vlan                
        option device 'rt305x'    
        option vlan '2'           
        option ports '4  6t'

restart network and show swconfig output

I just found that if there's no config in /etc/config/network for an interface, it is not created and ifconfig -a does not show it. I added a config for eth0.2 and assigned static 192.168.1.1 and I was able to ping my laptop!

Thanks for the help! I will try what you say, because I want to understand how this works. You know the XDX-RN502R has only one physical ethernet port? I know there's a switch inside, but that's just confusing me for now smile

elecnix wrote:

You know the XDX-RN502R has only one physical ethernet port?

I see photo smile. And I met the same problem while porting to Dlink DIR-620 revA (rt3052).

I know there's a switch inside, but that's just confusing me for now smile

Welcome to virtual lan world... Good luck!

The discussion might have continued from here.