OpenWrt Forum Archive

Topic: Is this router based on the infineon danube?

The content of this topic has been archived between 1 Oct 2014 and 1 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Sorry, posts 676 to 676 are missing from our archive.

I prefer to use brntool.py

it downs the same things of brndump and not have to be compiled. brnboot (I don't what language has been used to write it), bus seems has the same code on fhe brntool python script.

brntool had problem doing dumping. I don't know if it's a general problem but I solved like in the old post below

hasta luego

ginetto wrote:
gnumengor wrote:

then, you can start dumping the firmware

./brntool.py --read=AR4518PW_whole.dump --addr=0xB0000000 --verbose --size=0x400000

then run the tool, and wait like... 30minutes-1hour for it to end.
Is a good idea to run the tool twice and compare the two dumps to be sure its 100% accurate:

I did a little modification to the python script

modified line:

ser.write(hex(addr)[2:]) 

that produce b0000000L and block execution (is the input value --addr=0xB0000000)

and modified in

ser.write(hex(addr)[2:-1])

that produce correct b0000000

now is dumping...

becouse

aiayua wrote:

smile Happy to help, thanks for reading!

A wonderful job for OpenWRT and Seguridadwireless users.

A lot of thanks.

@ginetto Yes you need to do the math every time you modify something. As a quick reference:

We have a 4 Mb flash -> 0x400000 (4194304 bytes)
We cannot use with trunk openwrt first 128k + 64k -> 0x20000 + 0x10000 = 0x30000 (196608 bytes)
We cannot use because board restrictions last 64kb -> 0x10000 (65536 bytes)

Now, doing maths -> 0x400000 - 0x30000 - 0x10000 = 0x3C0000 (3932160 bytes)

What this mean?

We can start to flash openwrt only from 0xb0030000 and to a max of 0xb03F0000, therefore our max openwrt image size is 0x3C0000. Greater? Don't try, will mess the config data. Smaller or equal? Perfect

Reading my previous post, look this part:

ARV4518 => run update_openwrt
Using lq_cpe_eth device
TFTP from server 192.168.144.100; our IP address is 192.168.144.99
Filename 'ARV4518PW-squashfs.image'.
Load address: 0x80500000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ######
done
Bytes transferred = 2359300 (240004 hex)

..................................... done
Erased 37 sectors
Copy to Flash... 9....8....7....6....5....4....3....2....1....done

0x240004 transferred, and we can spend 0x3C0000 ... it fits perfect

Tip: Use windows calc in scientific mode if you want to work with hexadecimal values ... maybe it will help to you here



Replying to second question ... sorry, each router have its own data, because is Wireless Calibration data and MAC address

(Last edited by aiayua on 17 May 2012, 22:57)

@ginetto brndumper is in a windows executable flavour, no need to compiling, just run and go! big_smile

aiayua,

I followed your instructions and I have a ARV4518PW running openwrt now. Thanks a lot!!!!!!
Could you please tell us what your image exactly contain. Does it have ath5k and usb drivers compiled into or they have to be downloaded via opkg? If that's the case (download via opkg), how do I manage to install packages via opkg if I can't connect to the internet via dsl, only via wireless (which doesn't work)? I was thinking to place the *.opg file onto a usb pendrive, but it doesn't seem to recognize my drive - I guess due to lack of drivers. I was  thinking using wget via a http or ftp server running on my PC, dhcp doesn't work by default and even if I set a fix IP on my PC it won't reply to pings so I couldn't download packages from my PC via wget either... Any suggestions?

Saludos,
     dp79

dp79,

It's official trunk image (15 may 2012 I think). I only put it on my server for future use (I ensure this tutorial is working with this image ... but maybe in a new revision it fails). I wrote this tutorial as standard as I could, just fixing the u-boot kernel addr to work everything properly.

I'm not using trunk, so I can't tell you what it contains but if I remember well, it's usb enabled.

The way I'm using this router is connected to another router via LAN and works perfect. If you need internet and don't have another router working as gateway, you can always configure your PC as a gateway (if it have internet). Just search google for some gateway server for your OS

You don't need to change you PC IP, but it's possible your PC run behind firewall? (windows default and/or antivirus one) If so, disable it to avoid headaches

And to fix an IP to router, edit /etc/config/network. I put here my configuration as example:

root@OpenWRT:/# cat /etc/config/network

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

config interface 'lan'
        option ifname 'eth0'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.144.91'
        option gateway '192.168.144.1'
        option netmask '255.255.255.0'
        option dns '192.168.144.1'

config adsl-device 'adsl'
        option annex '2p'

config atm-bridge 'atm'
        option unit '0'
        option vpi '1'
        option vci '32'
        option encaps 'llc'
        option payload 'bridged'

config interface 'wan'
        option ifname 'nas0'
        option proto 'pppoe'
        option username 'foo'
        option password 'bar'

I have a compiled openwrt without wifi or adsl support so I don't use wan, adsl or atm, I just left the sections untouched and I don't know if will works.
In 'lan' section, just change ipaddr, gateway and dns fields to fit your network. In my case, 192.168.144.1 is my router, acting as gateway and dns server. If you want to ensure working dns, look your windows ones, and write it to 'dns' field. (ipconfig /all if you run windows and you will get that data)

Later, restart network (running /etc/init.d/network restart) and it should have the new configuration working. If your gateway responds, you'll download with opkg without problem (remember to opkg update first)

Try and say me wink

(Last edited by aiayua on 19 May 2012, 03:55)

aiayua,

Thanks for the detailed explanation. commenting the line - option type 'bridge' - solved my problem and I could ping my pc. I could successfully setup my pc as an internet gateway also.
My next problem is tat I'm able to installsome packages, like fdisk with opkg, but if I try kmod-ath5k or kmod-madwifi or kmod-usb2, I'm getting an error saying:

root@OpenWrt:/# opkg install kmod-usb2
Installing kmod-usb2 (3.3.6-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/lantiq/packages/kmod-usb2_3.3.6-1_lantiq.ipk.
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usb2:
*      kernel (= 3.3.6-1-29741bd671abfda23af499e2b71d6a06) *   kernel (= 3.3.6-1-29741bd671abfda23af499e2b71d6a06) *   kernel (= 3.3.6-1-29741bd671abfda23af499e2b71d6a06) *
* opkg_install_cmd: Cannot install package kmod-usb2.

Any suggestions?

Saludos,
       dp79

aiayua,

By now I figured, that the latest trunk has kernel rev 3.3.6 and your snapshot has 3.3.5. So it looks like only you can build the necesarry kmod-*.ipkg packages for this build. So I guess I have to build my own from the latest trunk, so that myself can compile the packages I need.
If I do the uboot env address patch you mention in an earlyer post and I compile my own image, can I just simply boot my router to uboot and flash mine over the current image or should I revert it back to factory default state and/or delete the whole image prior to flash my built via tftpd?

dp79

First of all, greetings to the community.

I have an ARV4518PW2 (branded as Intracom netfasted iad), which I succesfully had its entire rom erased (I do have full and last 64kb backups, did not pay attention to minicom "modem init" strings).

I soldered the correct points, and I can enter UART mode (CFG 04) through switches.

Can anybody provide any help on how we upload a working u-boot with "copy-paste-asc mode"?


aiayua wrote:

You need to enable UART mode -> upload a working u-boot with copy-paste-asc mode -> it will run from memory just after paste finished -> upload a good bootloader via tftp/loady to flash memory -> switch off -> disable UART -> go go go! If you have soldering skills, this is really easy.

But ... did you backup the last 65kb of flash data? It's really necessary! If you didn't and you didn't erased that last flash area, don't worry. If you did, your wifi is fucked.

To make this backup: When you boot from ASC, upload the original bootloader, flash it, reboot and stops it. Enter in advanced mode and use brndumper to save the last 65kb, then flash again a working u-boot. (Backup with brndumper from 0xb03F0000 to 0xb0400000)

Thank you

dp79 wrote:

aiayua,

By now I figured, that the latest trunk has kernel rev 3.3.6 and your snapshot has 3.3.5. So it looks like only you can build the necesarry kmod-*.ipkg packages for this build. So I guess I have to build my own from the latest trunk, so that myself can compile the packages I need.
If I do the uboot env address patch you mention in an earlyer post and I compile my own image, can I just simply boot my router to uboot and flash mine over the current image or should I revert it back to factory default state and/or delete the whole image prior to flash my built via tftpd?

dp79

Hi there! As i said in my previous post, my openwrt image version was trunk (untouched, just copy-pasted), in the post time hehe Now it maybe not working, or something can fail. By the way, you have two options:

- Download official trunk, leave u-boot as my post, and simply put openwrt image into tftp server folder, rename to ARV4518PW-squashfs.image, enter u-boot and run update_openwrt. This will leave u-boot+uboot_env as is, will delete openwrt zone and flash it again, automagically. You can ensure to delete whole area by calculating the free area from uboot_env ending and router boot params start -> 0xb03f0000 - 0xb0030000 = 0x3C0000, then erase that zone with the command erase 0xb0030000 0x3c0000 and then run update_openwrt.

- Use my copy of package repository which is for my previous post openwrt version http://www.aiayua.com/openwrt/lantiq/packages/. Comment the first line at /etc/opkg.conf and copy it with this url. Run opkg update and then, install the packages you want.

aiayua

christoforos wrote:

First of all, greetings to the community.

I have an ARV4518PW2 (branded as Intracom netfasted iad), which I succesfully had its entire rom erased (I do have full and last 64kb backups, did not pay attention to minicom "modem init" strings).

I soldered the correct points, and I can enter UART mode (CFG 04) through switches.

Can anybody provide any help on how we upload a working u-boot with "copy-paste-asc mode"?


aiayua wrote:

You need to enable UART mode -> upload a working u-boot with copy-paste-asc mode -> it will run from memory just after paste finished -> upload a good bootloader via tftp/loady to flash memory -> switch off -> disable UART -> go go go! If you have soldering skills, this is really easy.

But ... did you backup the last 65kb of flash data? It's really necessary! If you didn't and you didn't erased that last flash area, don't worry. If you did, your wifi is fucked.

To make this backup: When you boot from ASC, upload the original bootloader, flash it, reboot and stops it. Enter in advanced mode and use brndumper to save the last 65kb, then flash again a working u-boot. (Backup with brndumper from 0xb03F0000 to 0xb0400000)

Thank you

Read here: UART explanation and files

And in your case, your file is here:

Links:
1. First 0x30000 data (original bootloader) [ http://www.cienti.com/arv4518pw/first-0 … 000000.zip ]
2. Compiled U-Boot with working TFTP and LOADY/LOADB (serial transfer) in ASC format [ http://www.cienti.com/arv4518pw/u-boot-asc-20120429.zip ]
3. Compiled U-Boot with working TFTP and LOADY/LOADB ready to write to flash [ http://www.cienti.com/arv4518pw/u-boot- … 120511.zip ]
4. brndumper by pippolippi from this forum (thanks for sharing!) [ http://code.google.com/p/brndumper/ ]

Copy the ASC content and just paste in console, thats it

But anyway ... try all you want, it's almost impossible to brick this router

Regards!

aiayua wrote:
dp79 wrote:

aiayua,

By now I figured, that the latest trunk has kernel rev 3.3.6 and your snapshot has 3.3.5. So it looks like only you can build the necesarry kmod-*.ipkg packages for this build. So I guess I have to build my own from the latest trunk, so that myself can compile the packages I need.
If I do the uboot env address patch you mention in an earlyer post and I compile my own image, can I just simply boot my router to uboot and flash mine over the current image or should I revert it back to factory default state and/or delete the whole image prior to flash my built via tftpd?

dp79

Hi there! As i said in my previous post, my openwrt image version was trunk (untouched, just copy-pasted), in the post time hehe Now it maybe not working, or something can fail. By the way, you have two options:

- Download official trunk, leave u-boot as my post, and simply put openwrt image into tftp server folder, rename to ARV4518PW-squashfs.image, enter u-boot and run update_openwrt. This will leave u-boot+uboot_env as is, will delete openwrt zone and flash it again, automagically. You can ensure to delete whole area by calculating the free area from uboot_env ending and router boot params start -> 0xb03f0000 - 0xb0030000 = 0x3C0000, then erase that zone with the command erase 0xb0030000 0x3c0000 and then run update_openwrt.

- Use my copy of package repository which is for my previous post openwrt version http://www.aiayua.com/openwrt/lantiq/packages/. Comment the first line at /etc/opkg.conf and copy it with this url. Run opkg update and then, install the packages you want.

aiayua

Thanks for sharing your packages! They work flawlessly... As soon as I have time, I will attempt to build my own image from trunk. Another question though:
Space on flash seems to be an enemy so far. Will I be able to free up some space by compiling packages into the image? How do I know whether they will be part of squashfs or part of JFFS2? I would like to squeeze as many of these as I can into squashfs> kmod-usb2,kmod-fs-ext4,fdisk,e2fsprogs,kmod-ath5k,luci,s2-liplianin (dvb-s2 tuner driver),mumudvb

Thanks again!
           dp79

Hi dp79,

Don't wait to "have time" to build your own OpenWRT. I have an old computer to build (1GHz + 512Mb RAM) with debian, and the fresh build (only board select @ make menuconfig, no more changes) last me 4 hours .... so, if you wait to "have time" you will see that time is just to wait the end hahahaha

If you have chance, take a debian computer, follow the wikis about setting the system to build openwrt and do some tries with make menuconfig.

The space is an enemy, yes, my first compiles was about 6Mb (wait 4hours and see you cannot flash it ... is not nice) but later, you can fit a lot.

My advice: Build your OpenWRT only with usb2+ext4, fdisk a usb stick with at least one ext4 partition on the debian machine (you won't need to fdisk at router) and use it to pivot overlay, you will get a lot of free space. Then install all packages you want. In this way, you always can uninstall it later. If precompiled is uninstallable hehehe

I run over a 32Gb stick -> 128Mb (pivot overlay), 768Mb (home), 128Mb (swap) and 31Gb as network share.

http://www.cienti.com/arv4518pw/ARV4518PW-32Gb_.jpg

About JFFS2 and squashfs: I think (but ensure it) JFFS2 is initial image with pre-built packages (/rom folder, cannot modify it) and squashfs the free space.

Regards,

aiayua

Almost forget:

As you will compile your own kernel, don't forget this:

aiayua wrote:

2. compile your own OpenWRT modifying 'target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-arv.c' and 'target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-arv.c' (I think you only need the last one but ... modify both and no doubts) with this code:

/*
 * this is generic configuration for all arv based boards, note that it can be
 * rewriten in arv_load_nor()
 */
static struct mtd_partition arv_partitions[] =
{
        {
                .name   = "uboot",
                .offset = 0x0,
                .size   = 0x10000,
        },
        {
                .name   = "uboot_env",
                .offset = 0x10000,
                .size   = 0x10000,
        },
        {
                .name   = "linux",
                .offset = 0x20000,
                .size   = 0x3d0000,
        },
        {
                .name   = "board_config",
                .offset = 0x3f0000,
                .size   = 0x10000,
        },
};

Flash OpenWRT to 0xb0020000 and all will be so fine. You will get 65kb extra and u-boot and openwrt will be 'synced'. You can modify u-boot env from openwrt without problems

From Here

This is the most fitted openwrt configuration. U-boot at 0xb0000000, u-boot environment variables at 0xb0010000 and openwrt at 0xb0020000

aiayua

Router is not based on infeneon Danube, just erase your previous data it will be good if you don't then you will have some problem.
And i must appreciate a brilliant job by OPENWRT a lot of thanks to you. smile

hi there am stil at step Zero i wanted to build my RS232 to ttl converter but no luck finally i found some usb to ttl on ebay for 3usd can you provide a link to a compatible  one, or they are all compatible ?

I'm not using an usb adapter, i'm working with motherboard hardware serial port. But it's not difficult to build one (but as I said, get a C25/C35/C45 siemens data cable, because it's already built! And if I'm not wrong, nokia mbus or fbus cable works too)

Some schematics:

http://www.javirodriguez.com.es/wp-content/uploads/2009/11/Datacable-schematic.png
http://ipl.derpapst.eu/w/images/e/e7/Max3232e_rs232_to_ttl.jpg

As reply, I think they must be all compatible ... but I don't have one

aiayua

From here

aiayua wrote:

1. Level converter
Computer serial port works at higher voltage than board serial port (+12v/-12v against 0/+3.3v). Therefore you need a level converter (MAX3232 based). I use an old C25/C35 GSM cable and works perfect.

If you realize, MAX232 is a UART-5v converter, you're in need of UART-3.3v. That's because MAX232 is not working for you. Go to a GSM store and ask for a GSM serial cable (C25/C35/C45) or buy that converter via dealextreme/ebay or something similar, because if you buy that usb-ttl, there is big chance you'll need the converter too. So if you buy the usb-ttl, ensure is usb-3.3v

Regards, aiayua

I'm using a max232cpe with my arv7518 and it's working (even if it shouldn't).
Previously I used a siemens data cable, but when it broke I scavenged the max232 I used in a project many years ago.

@TheLastOne, instead of taking the supply from a voltage regulator like the circuit you linked to, I use the connector on the router, which has already a 3.3V supply pin.
But since you mentioned that you directly connected the rs232 signals to the router it's possible that you fried it.

pippolippi wrote:

instead of taking the supply from a voltage regulator like the circuit you linked to, I use the connector on the router, which has already a 3.3V supply pin

i am new to this please can you provide a schema or modify the one above

pippolippi wrote:

since you directly connected the rs232 signals to the router it's possible that you fried it.

are you sure?  because it still working normal and i still get on the console the same non sense data i got the first time

TheLastOne wrote:
pippolippi wrote:

instead of taking the supply from a voltage regulator like the circuit you linked to, I use the connector on the router, which has already a 3.3V supply pin

i am new to this please can you provide a schema or modify the one above

The first one posted by aiayua is good (of course you have to adapt the connector on the left to the pin out of the router).
The second one is also good, but it's more confusing (which side are the ttl levels and which side the rs232 ones?)

TheLastOne wrote:
pippolippi wrote:

since you directly connected the rs232 signals to the router it's possible that you fried it.

are you sure?  because it still working normal and i still get on the console the same non sense data i got the first time

Well, no, I'm not sure, but it's a possibility if you get garbage.

@pippolippi,  aiayua  posted a MAX3232CPE not The MAX232CPE

It has the same pin-out. I used 1µF capacitors (the 3232 should work with just 0.1).