User Tools

Site Tools


toh:davolink:dv-2020

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

toh:davolink:dv-2020 [2013/07/13 08:26] (current)
Line 1: Line 1:
 +====== Davolink DV-2020 ======
 +The Davolink DV-2020 is an ADSL modem with 4 Fast Ethernet ports, Wireless Access Point and VoIP (2x FXS).\\
 +This board also is prepared but not supplied with components for host USB.\\
 +The modem was distributed by Versatel/​Tele2 in the Netherlands starting in beginning 2007.\\
  
 +===== Supported Versions =====
 +^ Version/​Model ^ Launch Date ^ S/N ^ OpenWrt Version Supported ^ Model Specific Notes ^
 +|   ​| ​ -  | - | **no**, compile your own  | no ADSL driver available, see → [[doc/​hardware/​soc/​soc.broadcom.bcm63xx]] |
 +
 +**NOTE:** Trunk version need to have the mtd changes to fix crc error for the brcm63xx platform created by [[https://​forum.openwrt.org/​profile.php?​id=18299|Cshore]] (trunk >= 24835, tested with 25565).
 +
 +===== Hardware Highlights =====
 +^ CPU ^ Ram ^ Flash ^ Network ^ USB ^ Serial ^ JTag ^
 +| Broadcom bcm6348@256MHz | 16MiB | 8MiB | 4 x 1| Yes | Yes | Yes |
 +**Note:** The DV-2020 has a slave USB port (e.g. to provide Internet access via USB) and optionally you can add a host USB (1.1) to connect other devices.
 +
 +
 +===== Installation =====
 +**Note:** Before installing a new image it might be a good idea to make a backup first. See [[toh/​davolink/​dv-2020#​JTAG]] below.
 +
 +  - [[doc:​howto:​build]] You //should// download the current trunk version, and compile.
 +  - [[doc:​howto:​generic.flashing]] Now write this firmware-file onto the flash-chip of your device. You can use the CFE web-interface.
 +
 +  * Quickest way is to download a precompiled image, but the board-id isn't known yet so this is not an option.
 +  * At the moment you need to [[doc:​howto:​obtain.firmware.generate|build]] your own image. Because the board-id is unknown you need to perform some additional steps to add an [[doc/​devel/​add.new.device|device]]. You can copy the details from the DV-201AMR for the DV-2020. During menuconfig you choose Broadcom BCM63xx as target system and use Target Profile (Broadcom BCM43xx WiFi (wl, proprietary)). After following the steps to add the DV2020 [[doc/​devel/​add.new.device|device]] use the openwrt-6338GW-generic-squashfs-cfe.bin file in ./​bin/​brcm63xx
 +
 +==== Flash Layout ====
 +
 +^   ​Davolink DV-2020 ​ Flash Layout OpenWrt ​          ​^^^^^^^
 +^ Layer0 ​      ​| ​                      ​MX29LV640MB 4Mx16 BotB       ​8192KiB ​                                                                        ​||||||
 +^ CFE Backup Layer |  lower half flash 4096KiB |  upper half flash 4096KiB ​ ||||| 
 +^ Layer1 ​      | |  mtd0            |  mtd5 **//​linux//​** 3968KiB ​                                                                      ​||| ​   mtd4  |
 +^ Layer2 ​      | |  mtd0            |  mtd1             ​| ​             mtd2 **//​rootfs//​** 3072KiB ​                                         ||    mtd4  |
 +^ Layer3 ​      | |  mtd0            |  mtd1             ​| ​                     |  mtd3 = /                                                   ​| ​   mtd4  |
 +^ Size in KiB  | |  64KiB           ​| ​ 895.75KiB ​       |  1536KiB ​            ​| ​ 1600KiB ​                                                   |   ​64KiB ​ |
 +^ Name         | |  **//​CFE//​** ​    ​| ​ **//​kernel//​** ​  ​| ​                     |  **//​rootfs_data//​** ​                                 |   ​**//​nvram//​** ​ |
 +^ mountpoints ​ | |  none            |         ​none ​     |  /rom            |  /​overlay ​                                                  ​| ​   none  |
 +^ file system ​ | |  none            |         ​none ​     |  SquashFS ​           |  JFFS2                                                      |    none  |
 +
 +
 +==== OEM easy installation ====
 +
 +This section deals with how you install OpenWrt from a device freshly opened.
 +
 +  *Connect a router LAN port directly to your PC.
 +  *Configure your PC with a static IP address between 192.168.1.2 and 192.168.1.254. E. g. 192.168.1.2 (gateway and DNS is not required).
 +  *Reset router to factory defaults (and stop at CFE) by holding the reset button until red LED on front is lit (takes about 10 to 20 sec.)).
 +  *Browse to http://​192.168.1.1/​
 +  *Browse to the image to upload to the router
 +  *Wait for it to reboot
 +  *Due to the inclusion of the 0xdeadc0de value (read [[doc:​techref:​flash.layout]]) the bootloader detects a CRC failure at the next reboot and will revert to the backup image. Cshore created a fix that will correct the CRC value. use the following command to initiate the fix:
 +<​code> ​  mtd fixtrx linux </​code>​
 +  *Telnet to 192.168.1.1 and set a root password, or browse to http://​192.168.1.1 if LuCI is installed.
 +
 +==== OEM installation using the TFTP method ====
 +
 +If you want to upgrade using TFTP you follow these steps (as an alternative to the above install process).
 +
 +  *Connect via serial, power-on and hit any key within a second after seeing the message:
 +<​code> ​ *** Press any key to stop auto run (1 seconds) ***
 +  Auto run second count down:</​code>​
 +
 +  *From the prompt run the following command.
 +  *This will stop the router at CFE but doesn'​t reset router to factory defaults.
 +  *CFE> f <​ip-address>:<​image-name>​
 +
 +   ​*Where the <​ip-address>​ is the IP address of the TFTP server, and the <​image-name>​ the filename of the image you want to install.
 +  *Wait for it to reboot
 +  *Due to the inclusion of the 0xdeadc0de value (read [[doc:​techref:​flash.layout]]) the bootloader detects a CRC failure at the next reboot and will revert to the backup image. Cshore created a fix that will correct the CRC value. use the following command to initiate the fix:
 +<​code> ​  mtd fixtrx linux </​code>​
 +  *Telnet to 192.168.1.1 and set a root password, or browse to http://​192.168.1.1 if LuCI is installed.
 +
 +
 +
 +===== Basic configuration =====
 +After flashing, proceed with [[doc:​howto:​basic.config|Basic configuration]].\\
 +Set up your Internet connection, configure wireless, etc.
 +
 +=== Internet connection via LAN interface ===
 +
 +To install packages like needed for installing LuCI (the Web interface) you need to connect the router to the Internet.
 +Because we don't have a working ADSL driver (WAN interface), we need to connect to the Internet via the LAN interface.
 +I used ICS on a Win PC. Connect the router using an Ethernet cable to the PC and configure the PC for Internet Connection Sharing.
 +I left the router IP address on the default of 192.168.1.1/​24. ​
 +On the PC you can force to use the same range by configuring an fixed IP addres on the LAN interface connected to the router (e.g. 192.168.1.90/​24).
 +Be sure that the router with Internet access doesn'​t use the same range.
 +
 +Changes needed on the router:
 +<​code>​vi /​etc/​config/​network ​
 +    option dns    <​ip-adres van Internet access router> ​
 +reboot
 +route add default gw <​ip-adres van LAN interface></​code>​
 +
 +The router should now be able to ping a www URL and receive an reply.
 +
 +===== Specific Configuration =====
 +==== Interfaces ====
 +
 +The default network configuration is:
 +^ Interface Name ^ Description ^ Default configuration ^
 +| br-lan | LAN & WiFi | 192.168.1.1/​24 | 
 +| eth1 | LAN ports (1 to 4) | None | 
 +| wl0 | WiFi | Disabled | 
 +
 +==== Failsafe mode ====
 +->​[[doc:​howto:​generic.failsafe]]
 +
 +==== Buttons ====
 +->  [[doc:​howto:​hardware.button]] on howto use and configure the hardware button(s).
 +
 +^ BUTTON ^ Event ^
 +| Init   | reset |
 +
 +The Davolink DV-2020 has one button. The //Reset// button. It is located at the rear between LAN1 and TEL2 connectors.
 +
 +===== Hardware =====
 +==== Info ====
 +| **Architecture:​** MIPS | 
 +| **Vendor:** Davolink | 
 +| **Bootloader:​** CFE (version 1.0.37-4.3) | 
 +| **System-On-Chip:​** Broadcom BCM63xx | 
 +| **CPU/​Speed** Broadcom BCM6348 256 Mhz | 
 +| **Flash-Chip:​** AMD AM29LV640MB | 
 +| **Flash size:** 8192 KiB | 
 +| **RAM:** 16 MiB | 
 +| **Wireless:​** BCM4318 802.11 Wireless Controller 3.131.35.0.cpe0.0 | 
 +| **Ethernet:​** BCM5325 |
 +| **USB:** Yes 1 x slave 1.1 & optionally 1 x host 1.1 | 
 +| **Serial:** [[#​Serial|Yes]] | 
 +| **JTAG:** [[#​JTAG|Yes]] |
 +
 +
 +==== Photos ====
 +Model Number DV-2020
 +
 +//Front://
 +
 +**Photo of front of the casing**
 +
 +{{:​toh:​davolink:​dsc08255-1024.jpg?​500|DV-2020 front}}
 +
 +//Back://
 +
 +**Photo of back of the casing**
 +
 +{{:​toh:​davolink:​dsc08252-1024.jpg?​500|DV-2020 back}}
 +
 +==== Opening the case ====
 +**Note:** This will void your warranty!
 +
 +  *To remove the cover remove the rubber pads from the bottom and remove the 4 screws under the pads. 
 +  *You can than lift the top cover.
 +  *You than find the front panel, back panel, and PCB.
 +
 +//Main PCB//
 +
 +**Photo of PCB**
 +
 +{{:​toh:​davolink:​dv-2020.pcb.with.pin.numbers.1024.jpg?​700|DV-2020 PCB}}
 +
 +==== Serial ====
 +-> [[doc:​hardware:​port.serial]] general information about the serial port, serial port cable, etc.
 +
 +See photo of the PCB for the location Pinout:
 +<​code>​
 +1 VCC 3.3V
 +2 GND
 +3 TX
 +4 RX
 +5 GND
 +6 VCC 3.3V
 +</​code>​
 +Serial settings:
 +Baud rate: 115200, Data: 8 bit, Parity: none, Stop: 1 bit, Flow control: none
 +
 +==== JTAG ====
 +  * -> [[doc:​hardware:​port.jtag|JTAG]]
 +  * -> [[doc/​techref/​bootloader]] and [[doc/​techref/​bootloader/​CFE]]
 +  * -> [[doc:​techref:​flash.Layout]]
 +
 +
 +How to connect to JTAG interface, and how to backup and reflash the device with [[https://​docs.google.com/​leaf?​id=0B07LcVZMfvdkZTc1MDA5MjUtZTMzYy00OGQzLWE5MjAtODFiN2RkMTJmNDQ5&​sort=name&​layout=list&​num=50|debrick utility modified by Cshore ]]
 +
 +Before you can connect the router to your parallel port of the PC you need to solder a header to the PCB to be able to connect the JTAG cable.
 +See [[toh/​davolink/​dv-2020#​Hardware.mods|Hardware mods]] below for some tips.
 +
 +=== First download, unpack and compile the needed files: ===
 +<​code>​wget -O HairyDairyMaid_WRT54G_Debrick_Utility_v48~cshore2.zip --no-check-certificate https://​docs.google.com/​uc?​id=0B07LcVZMfvdkZTc1MDA5MjUtZTMzYy00OGQzLWE5MjAtODFiN2RkMTJmNDQ5&​export=download&​hl=en
 +unzip HairyDairyMaid_WRT54G_Debrick_Utility_v48~cshore2.zip
 +cd HairyDairyMaid_WRT54G_Debrick_Utility_v48~cshore
 +make</​code>​
 +
 +
 +results in the following executable:​\\ ​
 +"​debrick"​\\ ​
 +"​switchend"​
 +
 +Before using the debrick tool remove the printer module
 +<​code>​rmmod lp</​code>​
 +
 +\\ 
 +
 +=== Backup the current content of the router: ===
 +**First the CFE:​**\\ ​
 +Connect the power to the router, and after the LAN LED's go off use the following command:
 +<​code>​./​debrick -backup:​custom /​window:​1fc00000 /​start:​1fc00000 /​length:​10000 /fc:62 /​notimestamp /noreset /noemw /nocwd /​bigendian</​code>​
 +After 100% is reached rename the resulting file to something meaningfull.
 +<​code>​mv CUSTOM.BIN.SAVED cfe-<​route-mac>​.bin</​code>​
 +\\ 
 +
 +**Second the CFE config:**
 +<​code>​./​debrick -backup:​custom /​window:​1fc00000 /​start:​1fc00580 /​length:​0400 /fc:62 /​notimestamp /noreset /noemw /nocwd /​bigendian</​code>​
 +After 100% is reached rename the resulting file to something meaningfull.
 +<​code>​mv CUSTOM.BIN.SAVED cfe-config-<​route-mac>​.bin</​code>​
 +\\ 
 +\\ 
 +**NOTE:** The filesystem and nvram are probably only correct for the original (non OpenWRT) firmware.
 +
 +**Next the filesystem:​**
 +<​code>​./​debrick -backup:​custom /​window:​1fc00000 /​start:​1fc10000 /​length:​3e0000 /fc:61 /​notimestamp /noreset /noemw /nocwd /​bigendian</​code>​
 +After 100% is reached rename the resulting file to something meaningfull.
 +<​code>​mv CUSTOM.BIN.SAVED filesystem-<​route-mac>​.bin</​code>​
 +
 +\\ 
 +**As last the nvram:**
 +<​code>​./​debrick -backup:​custom /​window:​1fc00000 /​start:​1fffa000 /​length:​5000 /fc:61 /​notimestamp /noreset /noemw /nocwd /​bigendian</​code>​
 +After 100% is reached rename the resulting file to something meaningfull.
 +<​code>​mv CUSTOM.BIN.SAVED nvram-<​route-mac>​.bin</​code>​
 +
 +\\ 
 +
 +=== Flashing a CFE ===
 +**NOTE:** Normally you only flash the CFE and with a good working CFE you can install the image via the web-interface or tftp-server.
 +Command to use for flashing the CFE (named CUSTOM.BIN):​
 +<​code>​./​debrick -flash:​custom /​start:​1fc00000 /​window:​1fc00000 /​length:​10000 /nobreak /noreset /​bigendian</​code>​
 +
 +
 +Before flashing a CFE verify it is in the correct format (big-endian versus little-endian)
 +Verify the first 4 bytes with the following command: \\ <​code>​od -x <file name> | head -n 2</​code>​
 +The file should start with 0278 1000
 +
 +If this is not the case you can change the endianness with the switchend tool created by Cshore included in the download above.
 +Command to use: 
 +<​code>​cat bigendian_cfe_file.bin | ./switchend > CUSTOM.BIN</​code>​
 +
 +
 +otherwise make sure the filename of the CFE is CUSTOM.BIN (E.g. mv cfe.bin CUSTOM.BIN).
 +
 +===== Debricking =====
 +-> [[doc:​howto:​generic.debrick]]
 +
 +===== Bootloader Mods =====
 +  - you could read about [[doc:​techref:​bootloader]] in general or about [[doc:​techref:​bootloader:​CFE]] in particular.
 +
 +[[https://​forum.openwrt.org/​profile.php?​id=1445|LinuxInside]] created a CFE for the DV-201AMR that doesn'​t make a backup.
 +This CFE also partially workes on a DV-2020, <​del>​only the CFE Web-interface to upload an image doesn'​t work</​del>​. During my last try also the CFE Web-interface to upload images worked.
 +
 +Image for regular cfe the trx is copied to low half of flash. Map is as follows:
 +
 +<​code> ​ start          len
 +  0x00000000:<​firmware> ​                          ​backup
 +  <​firmware>:​-0x00400000 ​                         rootfs_data
 +  0x00400000:​0x00010000 ​                          ​CFE:​RO
 +  0x00410000:​0x003f0000 ​                          linux
 +  0x00410000+<​kernel>:<​rootfs_len> ​               rootfs
 +  0x00410000+<​firmware>:​-0x8000000 ​               free1</​code>​
 +
 +Patched CFE, proposed MAP is like:
 +<​code> ​ start          len
 +  0x00000000:​0x00010000 ​                          free2
 +  0x00010000:​0x003f0000 ​                          ​rootfs_data
 +  0x00400000:​0x00010000 ​                          ​CFE:​RO
 +  0x00410000:​0x003f0000 ​                          linux
 +  0x00410000+<​kernel_len>:<​rootfs_len> ​           rootfs
 +  0x00410000+<​kernel_len>​+<​rootfs_len>:​-0x8000000 free1</​code>​
 +
 +[[http://​wiki.openwrt.org/​_media/​oldwiki/​hardware/​davolink/​patched-cfe-for-davolink.bin|Patched-cfe-for-Davolink.bin]] \\ 
 +See also the following forum update: http://​forum.openwrt.org/​viewtopic.php?​pid=81093#​p81093
 +
 +
 +=== To install de CFE after OpenWRT is installed === 
 +
 +<​del><​code>​mtd write Patched-cfe-for-Davolink.bin /​dev/​mtd0</​code></​del>​
 +
 +Tried the above command a few times but it bricks the router. Asked why this is in [[https://​forum.openwrt.org/​viewtopic.php?​pid=133253#​p133253|this thread]].\\ ​
 +Instead use the following command:
 +<​code>​dd if=/​tmp/​Patched-cfe-for-Davolink.bin of=/​dev/​mtd0</​code>​
 +
 +
 +===== Hardware mods =====
 +  - as a beginner, you really should inform yourself about [[doc:​hardware:​soldering]] in general and then obtain some experience!
 +
 +Some additional tips:
 +  * Drill all hols i.s.o. using a desolder method (desoldering Pump or de-soldering Wire) for the following reasons:
 +  * The solder pads are very tiny and you burn them off easely.
 +  * The ground is so massive that it will take all the heat away from the grounded soldering pads.
 +  * If available use SMD components. Soldering is a bit more dificult, but there is less change to damage the solder pads.
 +  * If using normal resisters use flexible extension wires (of e.g. 2.5cm). ​
 +
 +List of components to enable USB on the DV2020:
 +<​code>​
 + R33 = 15k Ohm
 + R13, R14 = 22 Ohm
 + R15, R16 = 15k Ohm
 + C178, C179 = 47 pF (possible to skip)
 + BD07, BD08 = 0 Ohm (or short by wire)
 + USB Type '​A'​ Jack '​RECEPTACLE'</​code> ​
 + Note: for USB connector you can also use and extention cable like [[http://​www.dealextreme.com/​details.dx/​sku.28982|this 20cm one]]. The angled onces that fit directly on the board are difficult to get, and this one has long enough wires for soldering.
 +
 +//Image with solder points for connector://​
 +
 +**Photo of USB connector solder points**
 +
 +{{:​toh:​davolink:​dsc07331-1024.jpg?​500|DV-2020 USB connector}}
 +
 +[[http://​img822.imageshack.us/​i/​dsc08353gluednicely.jpg|alternative pickture with glued USB connector]].\\ \\
 +
 +  ​
 +
 +//Image with USB component locations://​
 +
 +{{:​toh:​davolink:​dsc07340-1024.jpg?​500|DV-2020 USB components}}
 +
 +
 +[[http://​img816.imageshack.us/​i/​dsc08225a.jpg|Alternative pickture]]\\ ​
 +[[http://​img546.imageshack.us/​i/​dsc08356horriblebutwork.jpg|Alternative pickture. Looks horrible, but is working.]]
 +
 +Steps:
 +  - First solder R33.
 +  - Load an image with USB enabled. With USB enabled (R33) the console will be flooded with messages like:\\ "hub 1-0:1.0: unable to enumerate USB device on port 1" or\\ "hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?"
 +  - If you want to use the capacitors solder them now.
 +  - Next solder R15 and R16. 
 +  - Load an image with USB enabled. The "​unable to enumerate"​ or "bad cable" messages show not be there any more. Execute "dmesg | grep -i '​usb\|hub\|sda'"​ to find all USB related messages.
 +  - Than solder R13 and R14.
 +
 +During [[doc:​howto:​obtain.firmware.generate|building]] of your image you can include USB support by adding the following options:​\\ ​
 +<​*>​ Kernel modules ​ ---> Filesystems ​ ---> kmod-fs-ntfs\\ ​
 +<​*>​ Kernel modules ​ ---> Filesystems ​ ---> kmod-fs-vfat\\ ​
 +<​*>​ Kernel modules ​ ---> Native Language Support ​ ---> kmod-nls-base\\ ​
 +<​*>​ Kernel modules ​ ---> Native Language Support ​ ---> kmod-nls-cp437\\ ​
 +<​*>​ Kernel modules ​ ---> Native Language Support ​ ---> kmod-nls-iso8859-1\\ ​
 +<​*>​ Kernel modules ​ ---> USB Support ​ ---> kmod-usb-core\\ ​
 +<​*>​ Kernel modules ​ ---> USB Support ​ ---> kmod-usb-ohci\\ ​
 +<​*>​ Kernel modules ​ ---> USB Support ​ ---> kmod-usb-printer\\ ​
 +<​*>​ Kernel modules ​ ---> USB Support ​ ---> kmod-usb-storage\\ ​
 +
 +
 +===== Other Info =====
 +  * Most information,​ (e.g. like **GPL source** with **ADSL** and **VoIP** support) can be found on the following forum:\\ **http://​www.davoforum.nl/​** \\ **Note**: For this forum you need to subscribe to see the posts.
 +  * More information about OpenWrt on the bcm63xx platform can be found in the following thread:\\ https://​forum.openwrt.org/​viewtopic.php?​id=17370
 +  * The following thread also contains nice information:​\\ http://​gathering.tweakers.net/​forum/​list_messages/​1065348/​last
 +
 +
 +===== Tags =====
 +{{tag>​bcm63xx bcm6348 fxs}}
toh/davolink/dv-2020.txt · Last modified: 2013/07/13 08:26 (external edit)