OpenWrt Forum Archive

Topic: Hacking the DIR-615

The content of this topic has been archived on 30 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have started testing the DIR-615 or DIR615.
(And thought it best to post this under Hardware Hacking)

I have found it very easy to explore and modify the router system.

It has a clearly labeled UART 4pin port 'CON5' [1VCC,TX,RX,GND] (needs MAX232),
a second 20pin port 'CON4' -probably JTAG,
and a full unpopulated PCI-bus port.

I tested the UART port.
It connects at 115200:8N1
It provides the bootup output, -and a full Serial Term using the Linux ASH Shell Script ! smile
I have used commands, including: ls, ps, free, echo, cat, gpio, ...etc.
The script commands seem to work fine.

... I think this means that I can develop on the box itself. if I can find or build a compiler !
- A lot easier than compiling the full Filesystem on the PC , then downloading to the router (and praying no bugs).

I posted the Output on this page :
  http://jlc.iwarp.com/DIR615.html

(Last edited by jlsilicon on 22 May 2008, 03:20)

Any update on this?

yes please update! i'm willing to brick my router for you & return it to best buy

hello, anybody continued on this work?

Hello !
Sorry, to be off for a while.

I had successfully created a few programs on the DIR615 -without any Downloading.
All I did was type the Code on the UART Port via Term.

I have updates on coding (and Hacking) on the DIR615.
(I had to digup my notes to place on my website)
- I didn't do this before because I didn't know anybody was interested !

* I have OpCodes ,
* I have directions on Coding ,
* I need to find my notes on the Linux Arm EXE files though (to embed the Codes into) .

Check my site for updates :
  http://jlc.iwarp.com/DIR615.html

Send any questions to jlsilicon@yahoo.com

jlsilicon.

ps:

I had programs testing like :
- The Arm926-500 speed (100M copy took 5sec for example).
- Making the GPIO LEDs blinking.

: Writing Programs/Code :

You can write ASM Command Programs by using the 'echo' command as shown at the end of the Box above. 

   echo "test" > /tmp/test

But, you need to use \Escape codes to enter the code as Hex.

   echo "\0101 prints an A"

You also need to embed your code into an EXE Code Block.
I had dissassembled a number of Programs from /bin to find a standard format.
(I believe the first 512 bytes were Header Data and not Code.)

Seems complicated, but I was successful. 
I just needed to dig up my notes and find it.

To Disassemble some EXE files, use the hexdump command :

  /usr/bin/hexdump  /bin/rm
-or-
  /usr/bin/hexdump  /bin/ps

Can somebody dump a bunch of these files onto the UART
-and post them or email them to me (I lost my boxes in moving) ?
Then I can explain more.

: Common OpCodes :

EA FF FF FE   B (-2)
0A .. .. ..      BEQ _
1A .. .. ..      BNE _
8A .. .. ..      BHI _ 
EB .. .. ..      BL _
E2 80 30 nn  ADD R3,R0,#nn
E2 03 30 nn  AND R3,R3,#nn
E2 4B B0 01  SUB R11,R11,#1
E3 50 00 nn  CMP R0,#nn
E3 53 00 nn  CMP R3,#nn
E3 A0 B0 DB LDR R11,#DB
E5 95 30 00  LDR R3,[R5]
E5 D4 00 nn  LDRB R0,[R4,#nn]
E5 87 00 00  STR R0,[R7]
E1 50 00 01  MOV R0,R0,#1
E2 80 00 04  ADD R0,R0,#4
E3 83 30 0C  ORR R3,R3,#0C 
E1 A0 00 00  NOP
E1 A0 F0 0E  RET

Enjoy !

Also, check my site for updates :

  http://jlc.iwarp.com/DIR615.html

Send any questions or comments to :

    jlsilicon@yahoo.com

The discussion might have continued from here.