Poray PRP-X5

This device is NOT RECOMMENDED for future use with OpenWrt due to low flash/ram.
DO NOT BUY DEVICES WITH 4MB FLASH / 32MB RAM if you intend to flash an up-to-date and secure OpenWrt version onto it! See 4/32 warning for details.

1) This device does not have sufficient resources (flash and/or RAM) to provide secure and reliable operation.
This means that even setting a password or changing simple network settings might not be possible any more, rendering the device effectively useless. See OpenWrt on 4/32 devices what you can do now.

2) OpenWrt support for this device has ended in 2022.
19.07.10 was the last official build for 4/32 devices.

A portable router with an onboard 5200mAh rechargeable_battery. It provides 150MBit/s 802.11bgn wireless connectivity, one Fast Ethernet port as well as two USB ports (of which one only offers power but no data connection).
Note: Many of these routers are marketed as a “3G travel router” but none actually include a 3G modem - the marketing term rather means that the OEM firmware supports USB 3G modems because it contains drivers for USB modems! Ignore that, because with OpenWrt ANY router with USB supports 3G hardware... ;-)

Also known as: HOTSION HOT-V9, Southriver Products SP-PRP-X5 Lexand LPB-52W, Lexand LPB-78W

Install OpenWrt (generic explanation)

Currently only installing via Serial + TFTP has been tested by pressing 2 during U-Boot phase.

Usually stock firmware for Poray devices (as can be obtained from their webpage) is obfuscated with a simple XOR obfuscation.

Furthermore the upgrade mechanism incorporated into the stock firmware expects firmware files to be checksummed.

Deobfuscating

To deobfuscate stock firmware images you can use a special tool that has been developed for the OpenWrt project. The tool is called mkporayfw and can be found in the tools/firmware-utils directory of the OpenWrt tree.

Unpacking

The rootfs of the stock images can be unpacked with binwalk after having been deobfuscated.

To do this please use this command:

binwalk -e --matryoshka input.bin

Checksumming

#TODO#

Basic configuration After flashing, proceed with this.
Set up your Internet connection, configure wireless, configure USB port, etc.

The default network configuration is:

Interface Name Description Default configuration
br-lan LAN (& eventually WiFi) 192.168.1.1/24
eth0 LAN port None

hardware.button on howto use and configure the hardware button(s).

The Linksys WRT54GL has two buttons. They are Reset and Secure Easy Setup. Here, we merely name the buttons, so we can use them in the above Howto:

BUTTON Event
Power KEY_POWER
Reset KEY_RESTART
DHCP/3G Switch KEY_BTN0
Instruction set MIPS
Vendor Ralink
bootloader U-Boot
System-On-Chip RT5350F (MIPS 24Kc V7.4)
CPU/Speed 24Kc V7.4 360 MHz
Flash-Chip Gigadevice GD25Q64B
Flash size 8192 KiB
RAM-Chip EtronTech EM63A165TS-6G
RAM 32 MiB
Wireless Ralink RT5350 2.4GHz 802.11bgn
Ethernet Ralink RT5350 Fast Ethernet
USB Yes, 2 (1 is power only)
Serial Yes
JTAG ?

Model Number

Front:
Insert picture of case front

Back:
Insert picture of case rear

Note: This will void your warranty!

  • Cover is held by 4 screws and some plastic notches

Main PCB

port.serial general information about the serial port, serial port cable, etc.

How to connect to the Serial Port of this specific device:

port.jtag general information about the JTAG port, JTAG cable, etc.

All button and port labels mentioned in this article refer to the original device manufactured by Poray. The labelling may very on clones/rebranded versions.

The X5 has three power states:

  1. Off (labelled OFF on the power switch)
  2. Charge only (labelled C)
  3. On (labelled ON)

In off mode the system is turned completely off and does not consume any power.

Charge mode is meant to be used when charging devices from the designated external USB Port. The operating system is not bootet. Note that this mode will eventually drain the battery, even if nothing is connected to the external USB port.

On mode turns on the SoC and thus enables USB and WiFi operation.

The RT5350 SoC only has one USB port. However, the X5/X6 has two external USB Ports and the card reader that is attached internally via USB.

One of the USB Ports (labelled USB-OUT) can only be used for power output, it is not connected to the USB controller in any way. This leaves us with the second USB port as well as the internal card reader.

As the X5/X6 does not have an onboard USB hub you can only either run the external USB port (labelled 3G-USB) or the card reader. Switching between the card reader and the external USB port is done by setting the GPIO 18 (exported as usb-mode in sysfs) to 0 for the card reader and 1 for the external USB port. The OEM firmware uses an external switch (labelled 3G and DHCP) to trigger the switching of USB ports.

Note: Some USB devices do not work after switching the USB port while the system is running. The original firmware works around this issue by rebooting every time you switch the USB port.

There currently is no driver for reading the ADC that monitors the device's battery level. This is still WIP.

U-Boot 1.1.3 (May 5 2011 - 18:57:44) Board: Ralink APSoC DRAM: 32 MB relocate_code Pointer at: 81fb4000 spi_wait_nsec: 42 spi device id: c8 40 17 c8 40 (4017c840) Warning: un-recognized chip ID, please update bootloader! raspi_read: from:30000 len:1000 .raspi_read: from:30000 len:1000 .GPIODIR=003fbfff GPIOSET=00000000 GPIODAT=00000000 ============================================ Ralink UBoot Version: 3.5.2.0 -------------------------------------------- ASIC 5350_MP (Port5<->None) DRAM_CONF_FROM: Boot-Strapping DRAM_TYPE: SDRAM DRAM_SIZE: 256 Mbits DRAM_WIDTH: 16 bits DRAM_TOTAL_WIDTH: 16 bits TOTAL_MEMORY_SIZE: 32 MBytes Flash component: SPI Flash Date:May 5 2011 Time:18:57:44 ============================================ icache: sets:256, ways:4, linesz:32 ,total:32768 dcache: sets:128, ways:4, linesz:32 ,total:16384 ##### The CPU freq = 360 MHZ #### estimate memory size =32 Mbytes GPIODIR=003fbfff GPIOMOD=000002dc GPIODAT=00000000 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. 7: Load Boot Loader code then write to Flash via Serial. 9: Load Boot Loader code then write to Flash via TFTP.  4  3  2  1  0 3: System Boot system code via Flash. ## Booting image at bc050000 ... raspi_read: from:50000 len:40 . Image Name: Linux Kernel Image Created: 2012-06-28 13:08:32 UTC Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 4234475 Bytes = 4 MB Load Address: 80000000 Entry Point: 80400000 raspi_read: from:50040 len:409ceb ................................................................. Verifying Checksum ... OK Uncompressing Kernel Image ... OK No initrd ## Transferring control to Linux (at address 80400000) ... ## Giving linux memsize in MB, 32 Starting kernel ... LINUX started... THIS IS ASIC Linux version 2.6.21 (root@MaxWong) (gcc version 3.4.2) #383 Thu Jun 28 21:07:54 CST 2012 The CPU feqenuce set to 360 MHz CPU revision is: 0001964c Determined physical RAM map: memory: 02000000 @ 00000000 (usable) Initrd not found or empty - disabling initrd Built 1 zonelists. Total pages: 8128 Kernel command line: console=ttyS1,57600n8 root=/dev/ram0 Primary instruction cache 32kB, physically tagged, 4-way, linesize 32 bytes. Primary data cache 16kB, 4-way, linesize 32 bytes. Synthesized TLB refill handler (20 instructions). Synthesized TLB load handler fastpath (32 instructions). Synthesized TLB store handler fastpath (32 instructions). Synthesized TLB modify handler fastpath (31 instructions). Cache parity protection disabled cause = c0808060, status = 11000000 PID hash table entries: 128 (order: 7, 512 bytes) calculating r4koff... 0015f900(1440000) CPU frequency 360.00 MHz Using 0.050 MHz high precision timer. Console: colour dummy device 80x25 Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) Memory: 25252k/32768k available (3227k kernel code, 7516k reserved, 864k data, 2904k init, 0k highmem) Mount-cache hash table entries: 512 NET: Registered protocol family 16 usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb NET: Registered protocol family 2 Time: MIPS clocksource has been installed. IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 1024 (order: 1, 8192 bytes) TCP bind hash table entries: 1024 (order: 0, 4096 bytes) TCP: Hash tables configured (established 1024 bind 1024) TCP reno registered detected lzma initramfs detected lzma initramfs initramfs: LZMA lc=3,lp=0,pb=2,dictSize=1048576,origSize=10991104 LZMA initramfs by Ming-Ching Tiew <mctiew@yahoo.com>........................................................................................................................................................................aaaaaaaaaaaaaaaaaaaaaaaaaaaa deice id : c8 40 17 c8 40 (4017c840) unknown(c8 4017c840) (8192 Kbytes) mtd .name = raspi, .size = 0x00800000 (8M) .erasesize = 0x00010000 (64K) .numeraseregions = 0 Creating 4 MTD partitions on "raspi": 0x00000000-0x00030000 : "Bootloader" 0x00030000-0x00040000 : "Config" 0x00040000-0x00050000 : "Factory" 0x00050000-0x00800000 : "Kernel" Load Ralink DFS Timer Module RT3xxx EHCI/OHCI init. squashfs: version 3.2-r2 (2007/01/15) Phillip Lougher squashfs: LZMA suppport for slax.org by jro NTFS driver 2.1.28 [Flags: R/W]. fuse init (API version 7.8) io scheduler noop registered (default) IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIi HDLC line discipline: version $Revision: 1.1.1.1 $, maxframe=4096 N_HDLC line discipline registered. Serial: 8250/16550 driver $Revision: 1.7 $ 2 ports, IRQ sharing disabled serial8250: ttyS0 at I/O 0xb0000500 (irq = 37) is a 16550A serial8250: ttyS1 at I/O 0xb0000c00 (irq = 12) is a 16550A RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize loop: loaded (max 8 devices) rdm_major = 254 MAC_ADRH -- : 0x00000000 MAC_ADRL -- : 0x00000000 Ralink APSoC Ethernet Driver Initilization. v2.0 256 rx/tx descriptors allocated, mtu = 1500! MAC_ADRH -- : 0x0000000c MAC_ADRL -- : 0x43305077 PROC INIT OK! PPP generic driver version 2.4.2 PPP Deflate Compression module registered PPP BSD Compression module registered PPP MPPE Compression module registered NET: Registered protocol family 24 PPPoL2TP kernel driver, V0.17 PPTP driver version 0.8.1 === pAd = c0019000, size = 629832 === <-- RTMPAllocAdapterBlock, Status=0 block2mtd: version $Revision: 1.1.1.1 $ rt3xxx-ehci rt3xxx-ehci: Ralink EHCI Host Controller rt3xxx-ehci rt3xxx-ehci: new USB bus registered, assigned bus number 1 rt3xxx-ehci rt3xxx-ehci: irq 18, io mem 0x101c0000 rt3xxx-ehci rt3xxx-ehci: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004 usb usb1: Product: Ralink EHCI Host Controller usb usb1: Manufacturer: Linux 2.6.21 ehci_hcd usb usb1: SerialNumber: rt3xxx usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected rt3xxx-ohci rt3xxx-ohci: RT3xxx OHCI Controller rt3xxx-ohci rt3xxx-ohci: new USB bus registered, assigned bus number 2 rt3xxx-ohci rt3xxx-ohci: irq 18, io mem 0x101c1000 usb usb2: Product: RT3xxx OHCI Controller usb usb2: Manufacturer: Linux 2.6.21 ohci_hcd usb usb2: SerialNumber: rt3xxx-ohci usb usb2: configuration #1 chosen from 1 choice hub 2-0:1.0: USB hub found hub 2-0:1.0: 1 port detected usb 1-1: new high speed USB device using rt3xxx-ehci and address 2 usb 1-1: Product: USB Storage usb 1-1: Manufacturer: Generic usb 1-1: SerialNumber: 000000000250 usb 1-1: configuration #1 chosen from 1 choice usbcore: registered new interface driver cdc_acm drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters Netfilter messages via NETLINK v0.30. nf_conntrack version 0.5.0 (256 buckets, 2048 max) ip_tables: (C) 2000-2006 Netfilter Core Team, Type=Linux ipt_time loading TCP cubic registered NET: Registered protocol family 1 NET: Registered protocol family 17 Ebtables v2.0 registered 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com> All bugs added by David S. Miller <davem@redhat.com> _nvram_read checksum = f2b4 save checksum = f2b4 Freeing unused kernel memory: 2904k freed usb 1-1: USB disconnect, address 2 Hit enter to continue...************************************************* phy_tx_ring = 0x0065c000, tx_ring = 0xa065c000 phy_rx_ring0 = 0x0065d000, rx_ring0 = 0xa065d000 RT305x_ESW: Link Status Changed RX DESC a067b000 size = 2048 <-- RTMPAllocTxRxRingMemory, Status=0 RTMP_TimerListAdd: add timer obj c0083e50! RTMP_TimerListAdd: add timer obj c0021014! RTMP_TimerListAdd: add timer obj c0020be4! RTMP_TimerListAdd: add timer obj c0020fc0! RTMP_TimerListAdd: add timer obj c0020fe8! RTMP_TimerListAdd: add timer obj c00210cc! RTMP_TimerListAdd: add timer obj c00210f8! RTMP_TimerListAdd: add timer obj c00212a4! RTMP_TimerListAdd: add timer obj c0024158! RTMP_TimerListAdd: add timer obj c0023d28! RTMP_TimerListAdd: add timer obj c0024104! RTMP_TimerListAdd: add timer obj c002412c! RTMP_TimerListAdd: add timer obj c0024210! RTMP_TimerListAdd: add timer obj c002423c! RTMP_TimerListAdd: add timer obj c00243e8! RTMP_TimerListAdd: add timer obj c002729c! RTMP_TimerListAdd: add timer obj c0026e6c! RTMP_TimerListAdd: add timer obj c0027248! RTMP_TimerListAdd: add timer obj c0027270! RTMP_TimerListAdd: add timer obj c0027354! RTMP_TimerListAdd: add timer obj c0027380! RTMP_TimerListAdd: add timer obj c002752c! RTMP_TimerListAdd: add timer obj c002a3e0! RTMP_TimerListAdd: add timer obj c0029fb0! RTMP_TimerListAdd: add timer obj c002a38c! RTMP_TimerListAdd: add timer obj c002a3b4! RTMP_TimerListAdd: add timer obj c002a498! RTMP_TimerListAdd: add timer obj c002a4c4! RTMP_TimerListAdd: add timer obj c002a670! RTMP_TimerListAdd: add timer obj c002d524! RTMP_TimerListAdd: add timer obj c002d0f4! RTMP_TimerListAdd: add timer obj c002d4d0! RTMP_TimerListAdd: add timer obj c002d4f8! RTMP_TimerListAdd: add timer obj c002d5dc! RTMP_TimerListAdd: add timer obj c002d608! RTMP_TimerListAdd: add timer obj c002d7b4! RTMP_TimerListAdd: add timer obj c0030668! RTMP_TimerListAdd: add timer obj c0030238! RTMP_TimerListAdd: add timer obj c0030614! RTMP_TimerListAdd: add timer obj c003063c! RTMP_TimerListAdd: add timer obj c0030720! RTMP_TimerListAdd: add timer obj c003074c! RTMP_TimerListAdd: add timer obj c00308f8! RTMP_TimerListAdd: add timer obj c00337ac! RTMP_TimerListAdd: add timer obj c003337c! RTMP_TimerListAdd: add timer obj c0033758! RTMP_TimerListAdd: add timer obj c0033780! RTMP_TimerListAdd: add timer obj c0033864! RTMP_TimerListAdd: add timer obj c0033890! RTMP_TimerListAdd: add timer obj c0033a3c! RTMP_TimerListAdd: add timer obj c00368f0! RTMP_TimerListAdd: add timer obj c00364c0! RTMP_TimerListAdd: add timer obj c003689c! RTMP_TimerListAdd: add timer obj c00368c4! RTMP_TimerListAdd: add timer obj c00369a8! RTMP_TimerListAdd: add timer obj c00369d4! RTMP_TimerListAdd: add timer obj c0036b80! RTMP_TimerListAdd: add timer obj c00519bc! RTMP_TimerListAdd: add timer obj c005158c! RTMP_TimerListAdd: add timer obj c0051968! RTMP_TimerListAdd: add timer obj c0051990! RTMP_TimerListAdd: add timer obj c0051a74! RTMP_TimerListAdd: add timer obj c0051aa0! RTMP_TimerListAdd: add timer obj c00519e8! RTMP_TimerListAdd: add timer obj c0051a14! RTMP_TimerListAdd: add timer obj c0051a40! RTMP_TimerListAdd: add timer obj c0084370! RTMP_TimerListAdd: add timer obj c0084348! RTMP_TimerListAdd: add timer obj c0084320! RTMP_TimerListAdd: add timer obj c005ac0c! RTMP_TimerListAdd: add timer obj c005ad10! RTMP_TimerListAdd: add timer obj c005ac34! RTMP_TimerListAdd: add timer obj c0051f84! RTMP_TimerListAdd: add timer obj c001e4d8! RTMP_TimerListAdd: add timer obj c002161c! RTMP_TimerListAdd: add timer obj c0024760! RTMP_TimerListAdd: add timer obj c00278a4! RTMP_TimerListAdd: add timer obj c002a9e8! RTMP_TimerListAdd: add timer obj c002db2c! RTMP_TimerListAdd: add timer obj c0030c70! RTMP_TimerListAdd: add timer obj c0033db4! RTMP_TimerListAdd: add timer obj c0051ca4! Key1Str is Invalid key length(0) or Type(0) Key2Str is Invalid key length(0) or Type(0) Key3Str is Invalid key length(0) or Type(0) Key4Str is Invalid key length(0) or Type(0) 1. Phy Mode = 9 2. Phy Mode = 9 TXALC> bInternalTxALC = 1 3. Phy Mode = 9 RTMP_TimerListAdd: add timer obj c001e0e0! NICInitAsicFromEEPROM: pAd->TxPowerCtrl.bInternalTxALC = 1 RT305x_ESW: Link Status Changed Channel 1 TSSI delta=-1 Channel 2 TSSI delta=-1 Channel 3 TSSI delta=-1 Channel 4 TSSI delta=-1 Channel 5 TSSI delta=-1 Channel 6 TSSI delta=-1 Channel 7 TSSI delta=-1 Channel 8 TSSI delta=-1 Channel 9 TSSI delta=-1 Channel 10 TSSI delta=-1 Channel 11 TSSI delta=-1 Channel 12 TSSI delta=-1 Channel 13 TSSI delta=-1 Channel 14 TSSI delta=-1 TSSIBase(0x6E) = 3F, TxPowerOFDM54 = 6 EEPROM_CCK_MCS0_MCS1(0xDE) = 0x6 EEPROM_CCK_MCS2_MCS3(0xDF) = 0x6 RT5350_desiredTSSIOverCCK[0] = 931833 RT5350_desiredTSSIOverCCK[1] = 931833 RT5350_desiredTSSIOverCCK[2] = 931833 RT5350_desiredTSSIOverCCK[3] = 931833 EEPROM_OFDM_MCS0_MCS1(0xE0) = 0xC EEPROM_OFDM_MCS2_MCS3(0xE1) = 0xA EEPROM_OFDM_MCS4_MCS5(0xE2) = 0x8 EEPROM_OFDM_MCS6_MCS7(0xE3) = 0x6 RT5350_desiredTSSIOverOFDM[0] = 1240000 RT5350_desiredTSSIOverOFDM[1] = 1240000 RT5350_desiredTSSIOverOFDM[2] = 1133307 RT5350_desiredTSSIOverOFDM[3] = 1133307 RT5350_desiredTSSIOverOFDM[4] = 766206 RT5350_desiredTSSIOverOFDM[5] = 766206 RT5350_desiredTSSIOverOFDM[6] = 630000 RT5350_desiredTSSIOverOFDM[7] = 630000 EEPROM_HT_MCS0_MCS1(0xE4) = 0xC EEPROM_HT_MCS2_MCS3(0xE5) = 0xA EEPROM_HT_MCS4_MCS5(0xE6) = 0x8 EEPROM_HT_MCS6_MCS7(0xE7) = 0x6 MCS Set = ff 00 00 00 01 SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l RT305x_ESW: Link Status Changed SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l RTMP_TimerListAdd: add timer obj c0052554! Main bssid = 8c:00:1c:0e:1a:2c <==== rt28xx_init, Status=0 0x1300 = 00064380 Algorithmics/MIPS FPU Emulator v1.5 eth2.1: Setting MAC address to 8c 00 1c 0e 1a 2a. device eth2 entered promiscuous mode VLAN (eth2.1): Setting underlying device (eth2) to promiscious mode. device ra0 entered promiscuous mode eth2.1: dev_set_promiscuity(master, 1) device eth2.1 entered promiscuous mode br0: port 2(eth2.1) entering learning state br0: port 1(ra0) entering learning state br0: topology change detected, propagating br0: port 2(eth2.1) entering forwarding state br0: topology change detected, propagating br0: port 1(ra0) entering forwarding state br0: port 1(ra0) entering disabled state RX DESC a1772000 size = 2048 <-- RTMPAllocTxRxRingMemory, Status=0 RTMP_TimerListAdd: add timer obj c0083e50! RTMP_TimerListAdd: add timer obj c0021014! RTMP_TimerListAdd: add timer obj c0020be4! RTMP_TimerListAdd: add timer obj c0020fc0! RTMP_TimerListAdd: add timer obj c0020fe8! RTMP_TimerListAdd: add timer obj c00210cc! RTMP_TimerListAdd: add timer obj c00210f8! RTMP_TimerListAdd: add timer obj c00212a4! RTMP_TimerListAdd: add timer obj c0024158! RTMP_TimerListAdd: add timer obj c0023d28! RTMP_TimerListAdd: add timer obj c0024104! RTMP_TimerListAdd: add timer obj c002412c! RTMP_TimerListAdd: add timer obj c0024210! RTMP_TimerListAdd: add timer obj c002423c! RTMP_TimerListAdd: add timer obj c00243e8! RTMP_TimerListAdd: add timer obj c002729c! RTMP_TimerListAdd: add timer obj c0026e6c! RTMP_TimerListAdd: add timer obj c0027248! RTMP_TimerListAdd: add timer obj c0027270! RTMP_TimerListAdd: add timer obj c0027354! RTMP_TimerListAdd: add timer obj c0027380! RTMP_TimerListAdd: add timer obj c002752c! RTMP_TimerListAdd: add timer obj c002a3e0! RTMP_TimerListAdd: add timer obj c0029fb0! RTMP_TimerListAdd: add timer obj c002a38c! RTMP_TimerListAdd: add timer obj c002a3b4! RTMP_TimerListAdd: add timer obj c002a498! RTMP_TimerListAdd: add timer obj c002a4c4! RTMP_TimerListAdd: add timer obj c002a670! RTMP_TimerListAdd: add timer obj c002d524! RTMP_TimerListAdd: add timer obj c002d0f4! RTMP_TimerListAdd: add timer obj c002d4d0! RTMP_TimerListAdd: add timer obj c002d4f8! RTMP_TimerListAdd: add timer obj c002d5dc! RTMP_TimerListAdd: add timer obj c002d608! RTMP_TimerListAdd: add timer obj c002d7b4! RTMP_TimerListAdd: add timer obj c0030668! RTMP_TimerListAdd: add timer obj c0030238! RTMP_TimerListAdd: add timer obj c0030614! RTMP_TimerListAdd: add timer obj c003063c! RTMP_TimerListAdd: add timer obj c0030720! RTMP_TimerListAdd: add timer obj c003074c! RTMP_TimerListAdd: add timer obj c00308f8! RTMP_TimerListAdd: add timer obj c00337ac! RTMP_TimerListAdd: add timer obj c003337c! RTMP_TimerListAdd: add timer obj c0033758! RTMP_TimerListAdd: add timer obj c0033780! RTMP_TimerListAdd: add timer obj c0033864! RTMP_TimerListAdd: add timer obj c0033890! RTMP_TimerListAdd: add timer obj c0033a3c! RTMP_TimerListAdd: add timer obj c00368f0! RTMP_TimerListAdd: add timer obj c00364c0! RTMP_TimerListAdd: add timer obj c003689c! RTMP_TimerListAdd: add timer obj c00368c4! RTMP_TimerListAdd: add timer obj c00369a8! RTMP_TimerListAdd: add timer obj c00369d4! RTMP_TimerListAdd: add timer obj c0036b80! RTMP_TimerListAdd: add timer obj c00519bc! RTMP_TimerListAdd: add timer obj c005158c! RTMP_TimerListAdd: add timer obj c0051968! RTMP_TimerListAdd: add timer obj c0051990! RTMP_TimerListAdd: add timer obj c0051a74! RTMP_TimerListAdd: add timer obj c0051aa0! RTMP_TimerListAdd: add timer obj c00519e8! RTMP_TimerListAdd: add timer obj c0051a14! RTMP_TimerListAdd: add timer obj c0051a40! RTMP_TimerListAdd: add timer obj c0084370! RTMP_TimerListAdd: add timer obj c0084348! RTMP_TimerListAdd: add timer obj c0084320! RTMP_TimerListAdd: add timer obj c005ac0c! RTMP_TimerListAdd: add timer obj c005ad10! RTMP_TimerListAdd: add timer obj c005ac34! RTMP_TimerListAdd: add timer obj c0051f84! RTMP_TimerListAdd: add timer obj c001e4d8! RTMP_TimerListAdd: add timer obj c002161c! RTMP_TimerListAdd: add timer obj c0024760! RTMP_TimerListAdd: add timer obj c00278a4! RTMP_TimerListAdd: add timer obj c002a9e8! RTMP_TimerListAdd: add timer obj c002db2c! RTMP_TimerListAdd: add timer obj c0030c70! RTMP_TimerListAdd: add timer obj c0033db4! RTMP_TimerListAdd: add timer obj c0051ca4! Key1Str is Invalid key length(0) or Type(0) Key2Str is Invalid key length(0) or Type(0) Key3Str is Invalid key length(0) or Type(0) Key4Str is Invalid key length(0) or Type(0) 1. Phy Mode = 9 2. Phy Mode = 9 TXALC> bInternalTxALC = 1 3. Phy Mode = 9 RTMP_TimerListAdd: add timer obj c001e0e0! NICInitAsicFromEEPROM: pAd->TxPowerCtrl.bInternalTxALC = 1 Channel 1 TSSI delta=-1 Channel 2 TSSI delta=-1 Channel 3 TSSI delta=-1 Channel 4 TSSI delta=-1 Channel 5 TSSI delta=-1 Channel 6 TSSI delta=-1 Channel 7 TSSI delta=-1 Channel 8 TSSI delta=-1 Channel 9 TSSI delta=-1 Channel 10 TSSI delta=-1 Channel 11 TSSI delta=-1 Channel 12 TSSI delta=-1 Channel 13 TSSI delta=-1 Channel 14 TSSI delta=-1 TSSIBase(0x6E) = 3F, TxPowerOFDM54 = 6 EEPROM_CCK_MCS0_MCS1(0xDE) = 0x6 EEPROM_CCK_MCS2_MCS3(0xDF) = 0x6 RT5350_desiredTSSIOverCCK[0] = 931833 RT5350_desiredTSSIOverCCK[1] = 931833 RT5350_desiredTSSIOverCCK[2] = 931833 RT5350_desiredTSSIOverCCK[3] = 931833 EEPROM_OFDM_MCS0_MCS1(0xE0) = 0xC EEPROM_OFDM_MCS2_MCS3(0xE1) = 0xA EEPROM_OFDM_MCS4_MCS5(0xE2) = 0x8 EEPROM_OFDM_MCS6_MCS7(0xE3) = 0x6 RT5350_desiredTSSIOverOFDM[0] = 1240000 RT5350_desiredTSSIOverOFDM[1] = 1240000 RT5350_desiredTSSIOverOFDM[2] = 1133307 RT5350_desiredTSSIOverOFDM[3] = 1133307 RT5350_desiredTSSIOverOFDM[4] = 766206 RT5350_desiredTSSIOverOFDM[5] = 766206 RT5350_desiredTSSIOverOFDM[6] = 630000 RT5350_desiredTSSIOverOFDM[7] = 630000 EEPROM_HT_MCS0_MCS1(0xE4) = 0xC EEPROM_HT_MCS2_MCS3(0xE5) = 0xA EEPROM_HT_MCS4_MCS5(0xE6) = 0x8 EEPROM_HT_MCS6_MCS7(0xE7) = 0x6 MCS Set = ff 00 00 00 01 SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l SYNC - BBP R4 to 20MHz.l RTMP_TimerListAdd: add timer obj c0052554! Main bssid = 8c:00:1c:0e:1a:2c <==== rt28xx_init, Status=0 0x1300 = 00064380 br0: port 1(ra0) entering learning state br0: topology change detected, propagating br0: port 1(ra0) entering forwarding state killall: rt2860apd: no process killed rt2860apd: No such file or directory info, udhcp server (v0.9.8) started Warning The same mac for two or more ipaddr time.windows.com: Unknown host br0: port 2(eth2.1) entering disabled state eth2.1: Setting MAC address to 8c 00 1c 0e 1a 2b. br0: port 2(eth2.1) entering learning state br0: topology change detected, propagating br0: port 2(eth2.1) entering forwarding state /var/tmp/.umount.sh: No such file or directory usb 1-1: new high speed USB device using rt3xxx-ehci and address 3 usb 1-1: Product: USB Storage usb 1-1: Manufacturer: Generic usb 1-1: SerialNumber: 000000000250 usb 1-1: configuration #1 chosen from 1 choice samba.sh PorayNet WORKGROUP smbpasswd -a admin admin startsmbfilepwent_internal: file /etc/smbpasswd did not exist. File successfully created. Added user admin. SCSI subsystem initialized Initializing USB Mass Storage driver... scsi0 : SCSI emulation for USB Mass Storage devices usbcore: registered new interface driver usb-storage USB Mass Storage support registered. usb 1-1: USB disconnect, address 3 insmod: cannot insert `/lib/modules/2.6.21/kernel/drivers/scsi/scsi_mod.ko': Success (17): Success insmod: cannot insert `/lib/modules/2.6.21/kernel/drivers/usb/storage/usb-storage.ko': Success (17): Success /eject: unable to open `/dev/sr0' /eject: unable to open `/dev/sr0' usbcore: deregistering interface driver usb-storage WAN_PROTO = 0 Uniform CD-ROM driver unloaded insmod: cannot insert `/lib/modules/2.6.21/kernel/drivers/scsi/scsi_mod.ko': Success (17): Success insmod: cannot insert `/lib/modules/2.6.21/kernel/drivers/scsi/sd_mod.ko': Success (17): Success Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. usbcore: registered new interface driver usbserial drivers/usb/serial/usb-serial.c: USB Serial support registered for generic usbcore: registered new interface driver usbserial_generic drivers/usb/serial/usb-serial.c: USB Serial Driver core open /dev/ttyUSB0 error open /dev/ttyUSB1 error open /dev/ttyUSB2 error open /dev/ttyUSB3 error open /dev/ttyUSB4 error open /dev/ttyUSB5 error open /dev/ttyUSB6 error open /dev/ttyACM0 error open /dev/ttyACM1 error open /dev/ttyACM2 error open /dev/ttyACM3 error open /dev/ttyACM4 error open /dev/ttyACM5 error open /dev/ttyACM6 error IDLE Hit enter to continue... Enter 'help' or '?' for a list of built-in commands. # #


U-Boot 1.1.3 (May 5 2011 - 18:57:44) Board: Ralink APSoC DRAM: 32 MB relocate_code Pointer at: 81fb4000 ****************************** Software System Reset Occurred ****************************** spi_wait_nsec: 42 spi device id: c8 40 17 c8 40 (4017c840) Warning: un-recognized chip ID, please update bootloader! raspi_read: from:30000 len:1000 .*** Warning - bad CRC, using default environment GPIODIR=003fbfff GPIOSET=00000000 GPIODAT=00000000 ============================================ Ralink UBoot Version: 3.5.2.0 -------------------------------------------- ASIC 5350_MP (Port5<->None) DRAM_CONF_FROM: Boot-Strapping DRAM_TYPE: SDRAM DRAM_SIZE: 256 Mbits DRAM_WIDTH: 16 bits DRAM_TOTAL_WIDTH: 16 bits TOTAL_MEMORY_SIZE: 32 MBytes Flash component: SPI Flash Date:May 5 2011 Time:18:57:44 ============================================ icache: sets:256, ways:4, linesz:32 ,total:32768 dcache: sets:128, ways:4, linesz:32 ,total:16384 ##### The CPU freq = 360 MHZ #### estimate memory size =32 Mbytes GPIODIR=003fbfff GPIOMOD=000002dc GPIODAT=00000000 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. 7: Load Boot Loader code then write to Flash via Serial. 9: Load Boot Loader code then write to Flash via TFTP. 0 3: System Boot system code via Flash. ## Booting image at bc050000 ... raspi_read: from:50000 len:40 . Image Name: MIPS OpenWrt Linux-3.8.13 Created: 2013-06-30 14:25:59 UTC Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 873741 Bytes = 853.3 kB Load Address: 80000000 Entry Point: 80000000 raspi_read: from:50040 len:d550d .............. 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.8.13 (lsoltero@ubuntu810vm) (gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2012.12 r36770) ) #30 Sun Jun 30 10:25:46 EDT 2013 [ 0.000000] SoC Type: Ralink RT5350 id:1 rev:3 [ 0.000000] bootconsole [early0] enabled [ 0.000000] CPU revision is: 0001964c (MIPS 24KEc) [ 0.000000] MIPS: machine is Poray X5 [ 0.000000] Determined physical RAM map: [ 0.000000] memory: 02000000 @ 00000000 (usable) [ 0.000000] Initrd not found or empty - disabling initrd [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x00000000-0x01ffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x00000000-0x01ffffff] [ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. [ 0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128 [ 0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2 [ 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] __ex_table already sorted, skipping sort [ 0.000000] Writing ErrCtl register=0005b930 [ 0.000000] Readback ErrCtl register=0005b930 [ 0.000000] Memory: 29616k/32768k available (2059k kernel code, 3152k reserved, 357k data, 204k init, 0k highmem) [ 0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] NR_IRQS:128 [ 0.000000] CPU Clock: 360MHz [ 0.000000] Calibrating delay loop... 239.61 BogoMIPS (lpj=1198080) [ 0.070000] pid_max: default: 32768 minimum: 301 [ 0.070000] Mount-cache hash table entries: 512 [ 0.080000] NET: Registered protocol family 16 [ 0.120000] bio: create slab <bio-0> at 0 [ 0.130000] rt2880_gpio 10000600.gpio: registering 24 gpios [ 0.140000] Switching to clocksource MIPS [ 0.150000] NET: Registered protocol family 2 [ 0.160000] TCP established hash table entries: 512 (order: 0, 4096 bytes) [ 0.180000] TCP bind hash table entries: 512 (order: -1, 2048 bytes) [ 0.190000] TCP: Hash tables configured (established 512 bind 512) [ 0.200000] TCP: reno registered [ 0.210000] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.220000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.230000] NET: Registered protocol family 1 [ 0.240000] rt-timer 10000100.timer: maximum frequncy is 7324Hz [ 0.290000] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.300000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 0.320000] msgmni has been set to 57 [ 0.330000] io scheduler noop registered [ 0.340000] io scheduler deadline registered (default) [ 0.350000] gpio-export gpio_export.3: 2 gpio(s) exported [ 0.360000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled [ 0.380000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20) is a 16550A [ 0.400000] console [ttyS0] enabled, bootconsole disabled [ 0.400000] console [ttyS0] enabled, bootconsole disabled [ 0.430000] m25p80 spi0.0: gd25q64 (8192 Kbytes) [ 0.440000] 4 ofpart partitions found on MTD device spi0.0 [ 0.450000] Creating 4 MTD partitions on "spi0.0": [ 0.460000] 0x000000000000-0x000000030000 : "u-boot" [ 0.470000] 0x000000030000-0x000000040000 : "u-boot-env" [ 0.480000] 0x000000040000-0x000000050000 : "factory" [ 0.500000] 0x000000050000-0x000000800000 : "firmware" [ 0.510000] found squashfs behind kernel [ 0.520000] Creating 2 MTD partitions on "spi0.0": [ 0.530000] 0x000000050000-0x00000012554d : "kernel" [ 0.540000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only [ 0.570000] 0x00000012554d-0x000000800000 : "rootfs" [ 0.580000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only [ 0.610000] mtd: partition "rootfs" set to be root filesystem [ 0.620000] mtd: partition "rootfs_data" created automatically, ofs=5E0000, len=220000 [ 0.630000] 0x0000005e0000-0x000000800000 : "rootfs_data" [ 0.650000] rt305x-esw 10110000.esw: link changed 0x01 [ 0.670000] eth0: done loading [ 0.680000] TCP: cubic registered [ 0.680000] NET: Registered protocol family 17 [ 0.690000] 8021q: 802.1Q VLAN Support v1.8 [ 0.730000] VFS: Mounted root (squashfs filesystem) readonly on device 31:5. [ 0.740000] Freeing unused kernel memory: 204k freed [ 5.160000] input: gpio-keys-polled.2 as /devices/gpio-keys-polled.2/input/input0 [ 5.380000] Button Hotplug driver version 0.4.1 - preinit - Wait for reset button on x5 to settle Press the [f] key and hit [enter] to enter failsafe mode - regular preinit - [ 12.100000] jffs2: notice: (434) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 12 of xref (0 dead, 2 orphan) found. [ 13.580000] SCSI subsystem initialized [ 14.270000] usbcore: registered new interface driver usbfs [ 14.280000] usbcore: registered new interface driver hub [ 14.300000] usbcore: registered new device driver usb [ 15.360000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 15.380000] ehci-platform: EHCI generic platform driver [ 16.390000] ehci-platform 101c0000.ehci: EHCI Host Controller [ 16.410000] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1 [ 16.420000] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000 [ 16.450000] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00 [ 16.460000] hub 1-0:1.0: USB hub found [ 16.470000] hub 1-0:1.0: 1 port detected [ 16.490000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 16.510000] ohci-platform 101c1000.ohci: Generic Platform OHCI Controller [ 16.520000] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2 [ 16.540000] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000 [ 16.610000] hub 2-0:1.0: USB hub found [ 16.620000] hub 2-0:1.0: 1 port detected [ 16.750000] Initializing USB Mass Storage driver... [ 16.760000] usbcore: registered new interface driver usb-storage [ 16.780000] USB Mass Storage support registered. [ 16.860000] usb 1-1: new high-speed USB device number 2 using ehci-platform [ 17.020000] scsi0 : usb-storage 1-1:1.0 [ 18.030000] scsi 0:0:0:0: Direct-Access Generic STORAGE DEVICE 0250 PQ: 0 ANSI: 0 [ 18.200000] sd 0:0:0:0: [sda] 15278080 512-byte logical blocks: (7.82 GB/7.28 GiB) [ 18.220000] sd 0:0:0:0: [sda] Write Protect is off [ 18.230000] sd 0:0:0:0: [sda] No Caching mode page present [ 18.240000] sd 0:0:0:0: [sda] Assuming drive cache: write through [ 18.260000] sd 0:0:0:0: [sda] No Caching mode page present [ 18.270000] sd 0:0:0:0: [sda] Assuming drive cache: write through [ 18.290000] sda: sda1 [ 18.300000] sd 0:0:0:0: [sda] No Caching mode page present [ 18.310000] sd 0:0:0:0: [sda] Assuming drive cache: write through [ 18.330000] sd 0:0:0:0: [sda] Attached SCSI removable disk switching to jffs2 - init - Please press Enter to activate this console. [ 39.690000] compat-drivers backport release: compat-drivers-2013-03-28-5 [ 39.710000] Backport based on wireless-testing.git master-2013-04-16 [ 39.720000] compat.git: wireless-testing.git [ 39.770000] cfg80211: Calling CRDA to update world regulatory domain [ 39.780000] cfg80211: World regulatory domain updated: [ 39.790000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) [ 39.810000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 39.820000] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) [ 39.840000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) [ 39.850000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 39.870000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 41.360000] phy0 -> rt2x00_set_rt: Info - RT chipset 5350, rev 0500 detected [ 41.370000] phy0 -> rt2x00_set_rf: Info - RF chipset 5350 detected [ 41.550000] CS1168 ADC Linux Driver V1.0 [ 41.560000] Bococom Co.,LTD. Hex 2011.5 [ 42.190000] PPP generic driver version 2.4.2 [ 43.470000] ip_tables: (C) 2000-2006 Netfilter Core Team [ 43.680000] xt_time: kernel timezone is -0000 [ 43.830000] NET: Registered protocol family 24 [ 44.050000] nf_conntrack version 0.5.0 (465 buckets, 1860 max) [ 44.780000] usbcore: registered new interface driver cdc_acm [ 44.790000] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters [ 45.090000] usbcore: registered new interface driver snd-usb-audio [ 45.260000] usbcore: registered new interface driver usbserial [ 45.270000] usbcore: registered new interface driver usbserial_generic [ 45.280000] usbserial: USB Serial support registered for generic [ 45.340000] usbcore: registered new interface driver ums-alauda [ 45.380000] usbcore: registered new interface driver ums-cypress [ 45.410000] usbcore: registered new interface driver ums-datafab [ 45.450000] usbcore: registered new interface driver ums-freecom [ 45.480000] usbcore: registered new interface driver ums-isd200 [ 45.520000] usbcore: registered new interface driver ums-jumpshot [ 45.550000] usbcore: registered new interface driver ums-karma [ 45.590000] usbcore: registered new interface driver ums-sddr09 [ 45.620000] usbcore: registered new interface driver ums-sddr55 [ 45.660000] usbcore: registered new interface driver ums-usbat [ 45.830000] usbcore: registered new interface driver ftdi_sio [ 45.840000] usbserial: USB Serial support registered for FTDI USB Serial Device [ 46.000000] usbcore: registered new interface driver pl2303 [ 46.010000] usbserial: USB Serial support registered for pl2303 [ 50.500000] EXT4-fs (sda1): warning: maximal mount count reached, running e2fsck is recommended [ 50.530000] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) [ 54.130000] ralink-wdt: timeout value 60 must be 0 < timeout <= 35, using 30 Optimizer login:


// // Device tree definition for Poray X5 and X6 routers. // // This is free software, licensed under the GNU General Public License v2. // See /LICENSE for more information. // // -- Luis Soltero <lsoltero@globalmarinenet.com> // -- Michel Stempin <michel.stempin@wanadoo.fr> // -- Felix Kaechele <felix@fetzig.org> // // // this files add support for the programmable switch on the side of the router labled 3G-DHCP // // // Notes on interfacing with the X5/X6 3G-DHCP switch // // there are two methods for interfacing with the 3G-DHCP/Switch. These are // A. Button // B. Polled // // To enable/disable the appropriate method search for COMMENT and comment/uncomppent the // appropriate definitions. Note that both can not be enabled at the same time. The switch // can be defined as either a button or a exported GPIO but not both. // // A. Button Method // // the switch is defined as a button so events can be bound to it using hotplug. The switch is bound to button BTN_0. // // GPIO /sys/class/gpio/usb-mode/value is used to map the X5 SD or USB port to the router. When the ascii value '0' is // writen to the gpio the router maps the internal TF/SD drive to the USB interface on the SoC. When ascii value '1' is // writen to the gpio the router maps the external USB port labled 3G-USB to the USB interfave on the SoC. // // To use the switch you need to bind it to the BTN_0 button event in hotplug. Here is a /etc/config/system entry that will // do that. // // config button // option button 'BTN_0' // option action 'released' // option handler 'echo 0 > /sys/class/gpio/usb-mode/value' // // config button // option button 'BTN_0' // option action 'pressed' // option handler 'echo 1 > /sys/class/gpio/usb-mode/value' // // this entry depends on hotplug and the 00-button script as defined here // http://wiki.openwrt.org/doc/howto/hardware.button // // FixMe: // On boot up the system needs to probe the state of the switch to initialize the USB mode correctly. This can be done by // parsing /sys/kernel/debug/gpio which returns // GPIOs 0-23, 10000600.gpio: // gpio-7 (x5:green:80 ) out hi // gpio-9 (bat ) in hi // gpio-10 (reset ) in hi // gpio-11 (x5:green:50 ) out hi // gpio-12 (x5:green:20 ) out hi // gpio-13 (x5:green:power ) out lo // gpio-14 (mode ) in lo // gpio-18 (usb-mode ) out lo // // gpio-14 has a value of lo (0) when the switch is set to DHCP and hi(1) when set to USB. // // B. Polled Method // // the switch state is exported as GPIO 14 with name "usb-switch". It can be accessed using the following path // /sys/class/gpio/usb-switch/value. A value of 1 means that the switch is in 3G mode. A value of 0 means // that DHCP is selected. A script or program must be written which polls the state of the GPIO and then // writes to GPIO 18 when the state changes. Something like the following should work // // #!/bin/sh // newstate=`cat /sys/class/gpio/usb-switch/value` // curstate="" // while [ 1 ] ; do // if [ "$currstate" -ne "$newstate" ]; then // $curstate=$newstate; // echo "$newstate" > /sys/class/gpio/usb-mode/value // fi; // sleep 2 // newstate=`cat /sys/class/gpio/usb-switch/value` // done // // the script can be executed from /etc/init.d/ /dts-v1/; /include/ "rt5350.dtsi" / { compatible = "X5", "ralink,rt5350-soc"; model = "Poray X5"; palmbus@10000000 { sysc@0 { ralink,pinmux = "i2c", "spi", "uartlite", "mdio", "sdram", "rgmii"; ralink,gpiomux = "jtag"; ralink,uartmux = "gpio"; ralink,wdtmux = <1>; }; gpio0: gpio@600 { status = "okay"; }; spi@b00 { status = "okay"; m25p80@0 { #address-cells = <1>; #size-cells = <1>; compatible = "gd25q64"; reg = <0 0>; linux,modalias = "m25p80", "gd25q64"; spi-max-frequency = <10000000>; partition@0 { label = "u-boot"; reg = <0x0 0x30000>; read-only; }; partition@30000 { label = "u-boot-env"; reg = <0x30000 0x10000>; read-only; }; factory: partition@40000 { label = "factory"; reg = <0x40000 0x10000>; read-only; }; partition@50000 { label = "firmware"; reg = <0x50000 0x7b0000>; }; }; }; }; ethernet@10100000 { status = "okay"; }; esw@10110000 { status = "okay"; ralink,portmap = <0x2f>; ralink,led-polarity = <1>; }; gpio-leds { compatible = "gpio-leds"; power { label = "x5:green:power"; gpios = <&gpio0 13 1>; }; 20 { label = "x5:green:20"; gpios = <&gpio0 12 1>; }; 50 { label = "x5:green:50"; gpios = <&gpio0 11 1>; }; 80 { label = "x5:green:80"; gpios = <&gpio0 7 1>; }; }; gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; #size-cells = <0>; poll-interval = <20>; bat { label = "bat"; gpios = <&gpio0 9 1>; linux,code = <0x211>; }; reset { label = "reset"; gpios = <&gpio0 10 1>; linux,code = <0x198>; }; // // 3G-DHCP Switch BUTTON method // // Comment this out (thrugh END COMMENT) when using BUTTON Method // mode { // label = "mode"; // gpios = <&gpio0 14 1>; // linux,code = <0x100>; // }; // END COMMENT // }; gpio_export { compatible = "gpio-export"; #size-cells = <0>; // // 3G-DHCP Switch POLL Method // // Uncomment this out (through END COMMENT) when using the POLLED Method usb-switch { gpio-export,name = "usb-switch"; gpio-export,input = <0>; gpios = <&gpio0 14 0>; }; // END COMMENT // usb-mode { gpio-export,name = "usb-mode"; gpio-export,output = <0>; gpios = <&gpio0 18 0>; }; }; wmac@10180000 { status = "okay"; ralink,mtd-eeprom = <&factory 0>; ralink,led-polarity = <1>; }; ehci@101c0000 { status = "okay"; }; ohci@101c1000 { status = "okay"; }; }; lsoltero@ubuntu810vm:~/openwrt.k3.8/target/linux/ramips/dts$


This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • Last modified: 2024/02/12 08:58
  • by 127.0.0.1