ADB P.DG. A4001N Installing Troubles

Greetings to all.
I tried to install by myself OpenWRT 19.07.3 on my ADB P.DG. A4001N A-000-1A1-AX using the image for the A4001N1 version (https://openwrt.org/toh/adb/p.dg_a4001n1).

Using the instruction of this website is very simple. I tried the GUI OEM installation method and the CFE web recovery, but i did not succeed due to the signature check.

So i started to search here and there and i found this:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=d6f66dd88e5d833f88fa4b6e056499ec7644ff7c

Someone has the same modem that is just a bit different from the A4001N1 officially supported.

I do not understand well what's written in the github page.

For example:

Installation via CFE:

  • Stock CFE has to be overwriten with one for 96328avng boards that can upload
    .bin images with no signature check (cfe-A4001N-V0000_96328avng.bin)
  • connect a serial port to the board

there is a guide that explain this? I think i have to solder a cable on the mainboard, but i'm not sure.

And Again:
in the bottom of the page there are listed some files

target/linux/bcm63xx/base-files/etc/board.d/01_leds
target/linux/bcm63xx/base-files/etc/board.d/02_network
target/linux/bcm63xx/base-files/etc/uci-defaults/09_fix_crc
.....

i suppose that those files are some update to the original image to make my modem works (leds in particular); but i don't know how to use them. Is there (again) some guide or perhaps an already patched image for my modem?

Thanks again for the support and for all the effort with this wonderful software

Hi, I'm the guy who made the pull request you're looking at (https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=d6f66dd88e5d833f88fa4b6e056499ec7644ff7c).

The ADB P.DG. A4001N A-000-1A1-AX, as far as I know, was distributed only by Telecom Italia with its brand. If for some reason you posses an unbranded version of this router or one with a different brand than Telecom Italia, please provide me some pictures of the chassis and the PCB (circuit) and let me know if all the LEDs light up correctly and have the right name when using my shapshot (https://downloads.openwrt.org/snapshots/targets/bcm63xx/generic/openwrt-bcm63xx-generic-adb_pdg-a4001n-a-000-1a1-ax-squashfs-cfe.bin).

I'm writing what follows assuming that you posses the Telecom Italia's ADB P.DG. A4001N A-000-1A1-AX version that I'll call AGPWI for short. If you posses an unbranded or other brand version of this router you can only use the flashing procedure number 1.

The installation of OpenWrt in the AGPWI is not as simple as installing it on a TP-Link TL-WR941ND because it has to be hacked.

The Telecom Italia's firmware and CFE bootloader are protected:

  1. The stock firmware hasn't got any file-select field in its web-interface that would allow you to choose and upload the OpenWrt firmware from your PC's filesystem
  2. The CFE bootloader won't boot any firmware that has a different signature than the stock Telecom Italia's firmware

To flash OpenWrt into the AGPWI you have to overwrite/replace the stock CFE bootloader with an unlocked version that does not check for the signature and so can execute the OpenWrt firmware.

To do this and flash OpenWrt you can follow one of the following three procedures:

  1. Program the SPI Flash memory using a Flash memory programmer (this procedure is similar to this in Italian language https://www.ilpuntotecnico.com/forum/index.php/topic,73762.0.html and this that uses a different SPI Flash chip for another router https://oldwiki.archive.openwrt.org/toh/thomson/tg582n):
  • Buy a SPI Flash memory programmer like the 5€ CH341A (a bit hard to use) or the TL866II (easier to use) with a SOIC16 pakage adapter

  • Desolder the Macronix MX25L12845EMI-10G SPI Flash memory from the PCB (circuit) of the router. (Do not try to flash the memory without desoldering it first from the PCB)

  • Program into the memory this file http://tastiere.altervista.org/TG582n/Openwrt%20installation/cfe6328_configured.bin at the beginning of the flash

  • Re-solder the memory on the PCB (circuit)

  • Short circuit the R192 bottom pad and the R193 right pad, switch on the router and wait for one minute or:

    • Buy a 1€ 3.3v TTL voltage compatible serial port like one that has the Prolific PL2303TA IC inside
    • Solder the R192 pads together and the R193 pads together, solder a 6 PIN pin header on the J5 connector of the PCB (circuit) and plug the serial port on it. The PIN layout of the serial port connector is this:
      TX  NC  RX
      NC  GND NC
      
    • Download a serial terminal like ExtraPuTTY and configure it to use your serial port with baudrate set at 115200, no parity check and 8 data bits
    • Open the serial terminal, switch on the router and continuously press ENTER until you see the CFE> prompt
  • Plug an ethernet cable to the PC and to any of the ports of the router's switch

  • Set your PC's IP to the static address to 192.168.2.13/24 and navigate to http://192.168.2.50/

  • Download the latest OpenWrt stable version available for that router https://downloads.openwrt.org/releases/19.07.5/targets/brcm63xx/generic/openwrt-19.07.5-brcm63xx-generic-A4001N1-squashfs-cfe.bin or use my snapshot https://downloads.openwrt.org/snapshots/targets/bcm63xx/generic/openwrt-bcm63xx-generic-adb_pdg-a4001n-a-000-1a1-ax-squashfs-cfe.bin and upload it through the CFE's web-interface

  1. Overwrite the stock firmware's CFE using a Telecom Italia's firmware exploit and a serial port:
  • Buy a 1€ 3.3v TTL voltage compatible serial port like one that has the Prolific PL2303TA IC inside
  • Solder the R192 pads together and the R193 pads together, solder a 6 PIN pin header on the J5 connector of the PCB (circuit) and plug the serial port to it. The PIN layout of the serial port connector is this:
    TX  NC  RX
    NC  GND NC
    
  • Download a serial terminal like ExtraPuTTY and configure it to use your serial port with baudrate set at 115200, no parity check and 8 data bits
  • Plug an ethernet cable to the PC and to any of the ports of the router's switch
  • Switch on the router, let it boot, navigate to http://192.168.1.1/ and through it's stock firmware's web-interface ensure that you have a firmware version lower or equal than AGPWI_1.1.0_013. If you have an higher version number you have to:
    • Download the AGPWI_1.1.0_013 in the right image format (https://repository.ilpuntotecnico.com/files/jackthevendicator/official/agpwi/AGPWI_1.1.0_013.rmt.sig)
    • Open the serial terminal, switch on the router and continuously press ENTER until you see the CFE> prompt
    • Set your PC's IP to the static address 192.168.1.3/24 and navigate to webpage http://192.168.1.1/
    • Select the AGPWI_1.1.0_013 image upload it and wait until the router reboots.
    • Switch on the router holding the RESET button for 20 seconds till it resets itself and reboots.
  • Download this file and put it into a foleder called unlock:
    http://beghiero.myftp.org/mendocino89/P.DG-A4001N/Firmware/cfe-A4001N-V0000_96328avng.bin
  • Set your PC's IP to the static address 192.168.1.2/24
  • Download a TFTPD server like tftpd64, open it and select the unlock folder.
  • Switch on the router with the serial terminal opened and let it boot to the Telecom firmware
  • When the firmware finishes booting and asks for the username put "admin" and when it asks for the password put "riattizzati". If everything worked correctly you should see a prompt like > or #
  • Type these commands into the serial terminal:
    system shell
    flash load -u tftp://192.168.1.2/cfe-A4001N-V0000_96328avng.bin -s00
    system reboot
    
    If everything worked the router should reboot.
  • Download this image https://repository.ilpuntotecnico.com/files/Miguel89/AGPWI/Fw%20OpenWrt/ImmCFE%2BOpenWRT_CC.bin
  • Open the serial terminal, switch on the router and continuously press ENTER until you see the CFE> prompt
  • Set your PC's IP to the static address 192.168.1.3/24 and navigate to webpage http://192.168.1.1/
  • Select the ImmCFE+OpenWRT_CC.bin image and upload it. After reboot you'll have OpenWrt 15.05
  • Upgrade OpenWrt to the latest stable version available for that router https://downloads.openwrt.org/releases/19.07.5/targets/brcm63xx/generic/openwrt-19.07.5-brcm63xx-generic-A4001N1-squashfs-sysupgrade.bin or use my snapshot https://downloads.openwrt.org/snapshots/targets/bcm63xx/generic/openwrt-bcm63xx-generic-adb_pdg-a4001n-a-000-1a1-ax-squashfs-sysupgrade.bin
  1. Overwrite the stock firmware's CFE using a Telecom Italia's firmware exploit and Telnet:

Note:

You don't need to use/create/upload/download any of the files listed in my pull request (https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=d6f66dd88e5d833f88fa4b6e056499ec7644ff7c). They were needed to me only to add support for the AGPWI.

A credit goes to all of the persons who wrote the following guides that helped me to define the procedures 1 and 2:

https://www.ilpuntotecnico.com/forum/index.php/topic,73760.0.html

https://www.ilpuntotecnico.com/forum/index.php/topic,74367.0.html

https://www.ilpuntotecnico.com/forum/index.php/topic,73548.0.html

1 Like

I made this wiki to describe the procedure the best way I could:

Thank you for the wiki.

I m just playing around with this.
I installed your snapshot image but i cannot get LuCi but I can ssh to the router and openwrt is installed.

Is it installed? cause installing the OpenWRT 19.07 generic it is present.

Snapshot images do not have LuCI pre-installed for any router. If you want LuCI you can compile the image and select the LuCI pakage to be compiled with the OpenWrt image or you can install it using opkg.

If you want to use opkg, connect the router to the internet and install LuCI.

To connect the router to the internet you can use an ethernet cable with internet access and connect it to the AGPWI switch after configuring a WAN port like I explained in the wiki

then have a look at the page

to install LuCI.

The following commands should do the whoole job:

cp /etc/config/network /etc/config/network.old #backup your current network file
echo "" > /etc/config/network #empty the network file
vi /etc/config/network #press 'a', paste here the network file content on my wiki then press the esc key + ':wq'
#connect an ethernet cable to port ETH1
service network restart #restart the network deamon
ping www.google.com #ensure you're connected to the web
opkg update #update the pakages list
opkg install luci #install the luci pakage

if something goes wrong to revert everythong:

rm /etc/config/network #remove the non working network file
mv /etc/config/network.old /etc/config/network #restore the old network file
service network restart #restart the network deamon

PAY ATTENCTION: unless you have a serial connection to the router, modifying the /etc/config/network file might make your router unreachable and recovering it might only be possible through a serial connection or the reset procedure here:

Thank you
I have been able to use the image for the 1N1 with Luci already installed and Now I am using to connect the router wirelessly to my home wifi.
I managed to change some LEDs to match with my functions.
I will try the snapshot in the future.
Thank you anyway for your good guide
Regards
Matteo