Pirelli Alice Gate VoIP 2 Plus Wi-Fi Business

This page is about the above mentioned device also know as agpf.

Supported, but without ADSL.

There are several models of Alice Gate out there, that are not supported at the moment.



Architecture: MIPS
Vendor: Broadcom
Bootloader: CFE
Board ID: AGPF-S0
System-On-Chip: BCM6358KFBG
CPU/Speed BMIPS4350 V1.0 / 300 Mhz BMIPS Dual Core
Flash-Chip: Spansion S29GL128P
Flash size: 16 MiB
RAM size: 32 MiB
Wireless: BCM4318 (miniPCI)
Ethernet: Broadcom BCM5325 w/ vlan support swconfig
Internet: ADSL2+
USB: 1x2.0H
Serial: Yes




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

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 from where a new firmware can be uploaded. OpenWrt binaries are refused, though, because of invalid CRC.


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

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

12 SRST_N GND 11
10 TCK GND 9

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


CFE 128KB 0x00000 - 0x1FFFF
FIRST IMAGE ~8MB 0x020000 - 0x7FFFFF

More detailed information came from the discuss prompt:

Section 00 Type BOOT       Range 0x00000000-0x00020000 MaxSize 0x00020000
        No more information.

Section 01 Type IMAGE      Range 0x00020000-0x007C0000 MaxSize 0x0079FF6C
        Size 0x0070BC38 Name 'IMAGE'
        Checksum 0x37FE2BDA Counter 0x00000002 Start Offset 0x00000000

Section 02 Type IMAGE      Range 0x00800000-0x00FA0000 MaxSize 0x0079FF6C

Section 03 Type CONF       Range 0x00FA0000-0x00FC0000 MaxSize 0x0001FF6C
        Size 0x0000756B Name 'rg_conf'
        Checksum 0x003A4562 Counter 0x0000002D Start Offset 0x00000000

Section 04 Type CONF       Range 0x00FC0000-0x00FE0000 MaxSize 0x0001FF6C
        Size 0x0000756B Name 'rg_conf'
        Checksum 0x003A307D Counter 0x0000002E Start Offset 0x00000000

Section 05 Type FACTORY    Range 0x00FE0000-0x00FF0000 MaxSize 0x0000FF6C
        Size 0x00000506 Name 'rg_factory'
        Checksum 0x00011485 Counter 0x0000001A Start Offset 0x00000000

Section 06 Type UNKNOWN    Range 0x00FF0000-0x01000000 MaxSize 0x00010000

I don't understand the MaxSize value of some sections as they leave some space before the next section.

Note, when you flash from jtag the BASE ADDRESS is 0x1E000000

OpenWrt on the machine :-)

You will need a serial adpater!!

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

Backup of the original firmware

Connect the serial adapter and let the device complete the boot procedure. At the login prompt use admin as username and password to get to the openrg Discus prompt.

From the Discus prompt you can do a lot of useful things, but i've not explored it due to some lack of interest. To obtain the shell just digit system shell.

Password: *****

Discus> system shell

BusyBox v1.01 (2005.09.07-07:38+0000) Built-in shell (lash)
Enter 'help' for a list of built-in commands.

/ #

Insert an USB flash key into the usb port of the router and mount the new device somewhere, for example in /mnt/backup

/ # cd mnt/
/mnt # mkdir backup
/mnt # mount /dev/sda
/mnt # mount /dev/sda1 backup/
[   90.535] VFS: Can't find ext3 filesystem on dev sda1.
[   90.590] VFS: Can't find an ext2 filesystem on dev sda1.
[   90.655] cramfs: wrong magic
/mnt #

Now just copy the content of the flash in some files on the usb key.

/mnt # ls /dev/mtd*
/dev/mtd0         /dev/mtd_rgconf0  /dev/mtdblock2    /dev/mtdr2
/dev/mtd1         /dev/mtd_rgconf1  /dev/mtdblock3    /dev/mtdr3
/dev/mtd2         /dev/mtdblock0    /dev/mtdr0
/dev/mtd3         /dev/mtdblock1    /dev/mtdr1
/mnt # dd if=/dev/mtdblock0 of=/mnt/backup/mtdblock
32768+0 records in
32768+0 records out

This will create a 16M file named MTDBLOCK (due to fat limitation). If you prefer you can use an ext2 or ext3 formatted filesystem.

From this file you can extract all you need to do a full restore of your device, both via jtag or via CFE.

Now unmount your flash key, put the file in a safe place and reboot the Alice stopping the boot process at the bootloader prompt pressing some keys.

/mnt # sync
/mnt # umount backup/
/mnt # exit                                          

Returned 0
Discus> system reboot<Jan  1 01:22:52> 
Going to reboot!

Restore original firmware


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 AGV2+W from http://downloads.openwrt.org/snapshots/trunk/brcm63xx, 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.

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

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

Using dnsmasq:

sudo ifconfig eth0 # by default the router use the ip
sudo dnsmasq -d --enable-tftp --tftp-root=`pwd`

For example this will result in:

CFE> flashimage openwrt-AGV2+W-cfe-jffs2-128k-cfe.bin
Loading ...
Finished loading 3670020 bytes
SGP  tagVersion : 8
Flashing MAIN image at address: BE020000
signiture_2: IMAGE
remaining to flash .......  03276804 

Specific OpenWrt configuration

Network/Led configuration as Access Point

I can suggest you to use Alice gate with the following network configuration using serial console:

For more info read switch config.

config interface loopback                                                       
        option ifname   lo                                                      
        option proto    static                                                  
        option ipaddr                                               
        option netmask                                               
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                                             
        option netmask                                           
        option nat      1                                                       
config 'interface' wan 
    option 'ifname'  'eth1.1'                                                   
    option 'proto'   'dhcp'

Leds config

Inside /etc/config/system add:

config 'led'
	option 'sysfs'		'AGPF-S0:red:power'
	option 'trigger'	'heartbeat'

config 'led'
	option name		lan
	option 'sysfs'		'AGPF-S0:red:wifi'
	option trigger netdev
	option 'dev'	'eth1.0'
	option mode 'rx tx'

config 'led'
	option name		wan
	option 'sysfs'		'AGPF-S0:green:wifi'
	option trigger netdev
	option 'dev'	'eth1.1'
	option mode 'rx tx'

Network/Led configuration as Client Device

#NOTE: run wifi detect to create this file

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'pci0000:00/0000:00:01.0'
	option txpower '13'
	option country 'US'

config wifi-iface
	option device 'radio0'
	option ssid 'YOUR NETWORK'
	option mode 'sta'
	option encryption 'psk2'
	option key 'ASCI PASSWD'
	option network 'wclient'

Follow the network config with dhcp enabled on eth interfaces

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr ''
	option netmask ''

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 ''
	option netmask ''
	option nat '1'

config interface 'wan'
	option ifname 'eth1.1'
	option proto 'dhcp'
	option type 'bridge'

config interface 'wclient'
	option _orig_ifname 'wlan0'
	option _orig_bridge 'false'
	option proto 'dhcp'


OEM bootlog

CFE version 1.0.37-8.7 for AGPF 0007 BCM96358 (32bit,SP,BE) Build Date: lun giu 16 10:47:46 CEST 2008 ( gpaolo@buildserver ) Copyright (C) 2000-2005 Broadcom Corporation. Boot Address 0xbe000000 Initializing Arena. Initializing Devices. Flash info: device_id : ............227E meminfo.nsect:..........128 totalSize:..............1000000 num_erase_blocks:...... 1 device_size:............1000000 Parallel flash device: name MX29L128DT, id 0x227e, size 16384KB CPU type 0x2A010: 300MHz, Bus: 133MHz, Ref: 64MHz CPU running TP0 Total memory: 33554432 bytes (32MB) Total memory used by CFE: 0x80401000 - 0x80528CB0 (1211568) Initialized Data: 0x8041E8A0 - 0x804204C0 (7200) BSS Area: 0x804204C0 - 0x80426CB0 (26608) Local Heap: 0x80426CB0 - 0x80526CB0 (1048576) Stack Area: 0x80526CB0 - 0x80528CB0 (8192) Text (code) segment: 0x80401000 - 0x8041E894 (120980) Boot area (physical): 0x00529000 - 0x00569000 Relocation Factor: I:00000000 - D:00000000 Board IP address : Host IP address : Gateway IP address : Run from flash/host (f/h) : f Default host run file name : vmlinux Default host flash file name : openrg.img Boot delay (0-9 seconds) : 1 Board Id (0-3) : AGPF-S0 Number of MAC Addresses (1-32) : 13 Base MAC Address : 02:10:18:01:00:01 PSI Size (1-64) KBytes : 24 Main Thread Number [0|1] : 0

Note that while the tag on the image say this is an AGPF-S0 board, the web interface tell you this is an AGPF-S1.

OpenWrt bootlog




Back to top

toh/pirelli/agpf.txt · Last modified: 2013/05/13 16:54 by danitool