User Tools

Site Tools


toh:pirelli:drg_a226m

Pirelli FastWeb DRG A226M

Supported, but without ADSL.

Hardware

Info

Architecture: MIPS
Vendor: Broadcom
Bootloader: CFE
Board ID: DWV-S0
System-On-Chip: BCM6358KFBG
CPU/Speed BMIPS4350 V1.0 / 300 Mhz BMIPS Dual Core
Flash-Chip: :?:
Flash size: 8 MiB
RAM: 32 MiB
Wireless: miniPCI (no card connected)
Ethernet: Broadcom BCM5325 w/ vlan support swconfig
Internet: ADSL2+
USB: 1x2.0H + 1x1.1D
Serial: Yes
JTAG: Yes

Photos

pirelli_a226m_owrt.jpg

Serial

The serial port is J10, on the left of the switch chip, see photos

6 GND RX 5
4 GND Vcc (3.3V) 3
2 GND TX 1

Settings are 115200 8N1

NB: a short circuit between pins RX and TX at power up puts the device in a recovery mode with IP 192.168.1.1 from where a new firmware can be uploaded. OpenWrt binaries are refused, though, because of invalid CRC.

JTAG

Jtag port is J9 near the SoC and the minipci socket, see photos

It seems to be a mips e-jtag 14 pin connector with columns swapped (used from the other side?).

14 DINT VREF 13
12 SRST_N GND 11
10 TCK GND 9
8 TMS GND 7
6 TDO GND 5
4 TDI GND 3
2 TRST_N GND 1

CPU Chip ID: 00000110001101011000000101111111 (0635817F)

I used the JTAG port with urjtag, just use the svn version. Useful info on "Neuf Box 4 JTAG"

You should probably try the Open On-Chip Debugger

Install OpenWrt on this router :-)

Requirement to install OpenWRT

To install OpenWRT you have to stop the system loading through the serial console

To do that you need a serial adapter/converter (that convert TTL +3.3V of router serial console to RS232 (+/-12V) or USB). I suggest to use USB serial converter!!

Don't even try to go further without a serial adapter!!

You can buy USB serial converter adapter on Ebay (find CP2102 chispet)

USB serial adapter based on Silicon Labs CP2102 (Ebay)

Backup of the original firmware

The firmware is based on OpenRG, I don't know how to backup this firmware. Continue at your risk!!!

You can try bcm63xx#dump.the.flash It isn't a firmware backup but a whole flash backup — danitool 2013/01/23 15:23

Restore original firmware

We need a way to backup it first. =)

Installing OpenWrt

You need to setup a tftp server on some host (I can suggest to use dnsmasq for this) to serve the firmware image to the router.

Now just download the image for A226M from

OpenWRT firmware - Broadcom BRCM63xxx CPU

You have firmwares for two filesystems (squashfs and jffs2)

squashfs is a filesytem that have system files readonly. more stable and less problems. you cannot destroy importan file

jffs2 is a file system completly writable. more powerfull but you can destroy system files.

to start as novice I sugegst to use squasfs firmwares.

Skip the jffs2 with 64k erase block as the flash use 128k block, anyway using 64k should not give much problem, just some wasted space and some errors messages. Put the choose image in the right place (see your tftp server configuration), and go to the CFE prompt.

OpenWRT DRGA226M firmware - CFE squashfs

OpenWRT DRG A226M firmware - squashfs CFE

OpenWRT DRG A226M firmware - jffs2 128K CFE

OpenWRT DRGA226M firmware - CFE jffs2 128K

Poweron the router - Stop the boot process

Through the serial console and a terminal program (like Hyperterminal, Putty portable, Teraterm) setup as 115200, 8 bit data, no parity bit, 1 stop bit, poweron the router and press any key to stop the system loading.

Flash the new firmware via TFTP

I suggest to rename the firmware file downloaded as firmware.bin

Now you have to use the flashimage command to load the openwrt image, please don't use the f command. If you configure (with command c) the host ip address you can avoid it in the flashimage argument.

CFE> flashimage

     eg. flashimage [hostip:]compressed_image_file_name
or
     es: flashimage 192.168.1.100:firmware.bin
or
     es: flashimage firmware.bin   

That's all, the device will automatically reboot and openwrt will be there :-)

Using dnsmasq:

dnsmasq -d --enable-tftp --tftp-root=`pwd` #fron the directory where firmware is previously downloaded
where the 192.168.1.100 is your server tftp After the flashing of new firmware the router will reboot.

You can use also TFTP server like tftp32. Install tftpd32 and put the firmware file (I suggest to rename it as firmware.bin) in the same folder where you installed tftpd32.

OpenWRT - First boot

:!: :!: :!: ATM (24 jan 2013) the OPENWRT image is rejected due to wrong CRC in kernel :!: :!: :!: Boot detail with crc error:

*** Press any key to stop auto run (1 seconds) ***
Auto run second count down: 0
Trying to boot from previous MAIN image (0x65dba394) ...
Code Address: 0x65DBA394, Entry Address: 0x1970acf7
SGP - Flash Kernel Address: 0xBE020100
SGP - ulImgCrc : 0xD656A53B  
SGP - Tag->kernelLen: 0x0011FF00
SGP - Flash Kernel Address: 0xBE020100
Linux kernel CRC error.  Corrupted image?
SGP - Tag Kernel crc : 0xD656A53B - calculated: 0x9D91518A 
SGP - Decompression Kernel length: 0x91669AEE pucSrc: 0xBE02010C
Trying to boot from previous RECOVERY image (0x80010000) ...
Code Address: 0x80010000, Entry Address: 0x80010000
SGP - Flash Kernel Address: 0xBE560100
SGP - ulImgCrc : 0x80DF5773  
SGP - Tag->kernelLen: 0x001B008C
SGP - Flash Kernel Address: 0xBE560100
SGP - Tag Kernel crc : 0x80DF5773 - calculated: 0x80DF5773 
SGP - Decompression Kernel length: 0x0000001C pucSrc: 0xBE56010C
Decompression OK!
Entry at 0x80010000
If you receive this error with the test file: openwrt-A226G-cfe-squashfs-cfe.bin I had also prevents this problem and I solved it with this. (31/07/2013)

Specific OpenWrt configuration

Network configuration

To have a better match with DRG A226M functions, I suggest you to use it with the following network configuration. Using the interneal editor vi, check and edit /etc/config/system file.

For more info read switch config. FIXME To be reviewed

config interface loopback                                                       
        option ifname   lo                                                      
        option proto    static                                                  
        option ipaddr   127.0.0.1                                               
        option netmask  255.0.0.0                                               
                                                                                
config 'switch' 'eth1'                                                          
   option 'enable'      '1'                                                     
   option 'enable_vlan' '1'                                                     
   option 'reset'       '1'                                                     
                                                                                
config 'switch_vlan' 'vlan0'                                                    
   option 'vlan'       '0'                                                      
   option 'device'     'eth1'                                                   
   option 'ports'      '0 1 2 5*'                                               
                                                                                
config 'switch_vlan' 'vlan1'                                                    
   option 'vlan'       '1'                                                      
   option 'device'     'eth1'                                                   
   option 'ports'      '3 5t'                                                   
                                                                                
config interface lan                                                            
        option ifname   eth1.0 
        option type     bridge                                                 
        option proto    static                                                  
        option ipaddr   192.168.5.1                                             
        option netmask  255.255.255.0                                           
        option nat      1                                                       
                                                                                
config 'interface' wan 
    option 'ifname'  'eth1.1'                                                   
    option 'proto'   'dhcp'

Modify the leds config

To have the led matching DRG A226M features, using the internal editor vi edit the /etc/config/system file. Add:

config 'led'
	option 'sysfs'		'power:red'
	option 'trigger'	'heartbeat'

config 'led'
	option name		lan
	option 'sysfs'		'usr1:red'
	option trigger netdev
	option 'dev'	'eth1.0'
	option mode 'rx tx'

config 'led'
	option name		wan
	option 'sysfs'		'usr2:red'
	option trigger netdev
	option 'dev'	'eth1.1'
	option mode 'rx tx'

Web interface (Luci)

The OpenWRT firmware don't provide by default webui. just telnet interface. To configure the modem through the web interface you should install WebUI (like Luci). To do that you can follow the instructions

OpenWRT - Install WebUI (Luci)

opkg update

opkg install luci

opkg update

opkg install kmod-rt61-pci
 
Reboot system for activate WiFi

Bootlogs

OEM bootlog

<HTML> <p style="padding: 10px;border:1px solid grey;height:600px;font:10px/14px Georgia, Garamond, Serif;overflow:Auto;background-color:#FFFFFF">

CFE version 1.0.37-8.7 for BCM96358 (32bit,SP,BE)
Build Date: lun apr  2 10:48:55 CEST 2007 (gpaolo@buildserver)
Copyright (C) 2000-2005 Broadcom Corporation.

Boot Address 0xbe000000

Initializing Arena.
Initializing Devices.
Parallel flash device: name AM29LV320MT, id 0x2201, size 8192KB
CPU type 0x2A010: 300MHz, Bus: 133MHz, Ref: 64MHz
CPU running TP0
Total memory: 33554432 bytes (32MB)

Total memory used by CFE:  0x80401000 - 0x80527ED0 (1208016)
Initialized Data:          0x8041D940 - 0x8041F700 (7616)
BSS Area:                  0x8041F700 - 0x80425ED0 (26576)
Local Heap:                0x80425ED0 - 0x80525ED0 (1048576)
Stack Area:                0x80525ED0 - 0x80527ED0 (8192)
Text (code) segment:       0x80401000 - 0x8041D938 (117048)
Boot area (physical):      0x00528000 - 0x00568000
Relocation Factor:         I:00000000 - D:00000000

Resetting Secondary CPU... 

Board IP address                  : 192.168.1.1:ffffff00  
Host IP address                   : 192.168.1.100  
Gateway IP address                :   
Run from flash/host (f/h)         : f  
Default host run file name        : vmlinux  
Default host flash file name      : bcm963xx_fs_kernel  
Boot delay (0-9 seconds)          : 1  
Boot image (0=latest, 1=previous) : 0  
Board Id (0-6)                    : DWV-S0  
Number of MAC Addresses (1-32)    : 13  
Base MAC Address                  : 02:10:18:xxxxxxxxx  
PSI Size (1-64) KBytes            : 24  
Main Thread Number [0|1]          : 0  

*** Press any key to stop auto run (1 seconds) ***
Auto run second count down: 1
web info: Waiting for connection on socket 0.
CFE> 

Links

Tags

toh/pirelli/drg_a226m.txt · Last modified: 2013/07/31 02:02 (external edit)