Flashing Devices

Version 2 (Francisco Jiménez , 06/22/2014 03:19 pm)

1 1 Francisco Jiménez
h1. Flashing Devices <WORK IN PROGRESS>
2 2 Francisco Jiménez
3 1 Francisco Jiménez
It may be useful as reference https://wiki.eigenlab.org/index.php/Flashing
4 1 Francisco Jiménez
5 1 Francisco Jiménez
As example, we are going to flash a Tp-Link tl-wdr3600
6 1 Francisco Jiménez
7 1 Francisco Jiménez
h2. *DISABLE Network-Manager*
8 1 Francisco Jiménez
9 1 Francisco Jiménez
If you are using Network-Manager and want avoid problems that may brick our device disable it, so:
10 1 Francisco Jiménez
11 1 Francisco Jiménez
1.- Look for the Ethernet interface (usually eth0) mac address
12 1 Francisco Jiménez
<pre>
13 1 Francisco Jiménez
ip link show
14 1 Francisco Jiménez
</pre>
15 1 Francisco Jiménez
16 1 Francisco Jiménez
Let's hypothesize it is 00:16:aa:cd:bc:dd
17 1 Francisco Jiménez
18 1 Francisco Jiménez
2.- We are going to edit Network-Manager configuration using vim or your preferred text editor
19 1 Francisco Jiménez
20 1 Francisco Jiménez
<pre>
21 1 Francisco Jiménez
vim /etc/NetworkManager/NetworkManager.conf
22 1 Francisco Jiménez
</pre>
23 1 Francisco Jiménez
24 1 Francisco Jiménez
3.- Go to the main section of the file and add introduce
25 1 Francisco Jiménez
26 1 Francisco Jiménez
<pre>
27 1 Francisco Jiménez
no-auto-default=00:16:aa:cd:bc:dd
28 1 Francisco Jiménez
</pre>
29 1 Francisco Jiménez
30 1 Francisco Jiménez
4.- Then save and exit from the editor
31 1 Francisco Jiménez
32 1 Francisco Jiménez
5.- To finish, we restart Network-Manager
33 1 Francisco Jiménez
<pre>
34 1 Francisco Jiménez
service network-manager restart
35 1 Francisco Jiménez
</pre>
36 1 Francisco Jiménez
37 1 Francisco Jiménez
done! but now we have to configure the Ethernet interface manually.
38 1 Francisco Jiménez
39 1 Francisco Jiménez
h2. *SWITCH ON THE ETHERNET INTERFACE*
40 1 Francisco Jiménez
41 1 Francisco Jiménez
<pre>
42 1 Francisco Jiménez
ip link set up dev eth0
43 1 Francisco Jiménez
</pre>
44 1 Francisco Jiménez
45 1 Francisco Jiménez
Note: if you desire to switch it off for any reason:
46 1 Francisco Jiménez
<pre>
47 1 Francisco Jiménez
ip link set down dev eth0
48 1 Francisco Jiménez
</pre>
49 1 Francisco Jiménez
50 1 Francisco Jiménez
h2. *FIND YOUR ROUTER IP*
51 1 Francisco Jiménez
52 1 Francisco Jiménez
It is usually reported on the box, in our case it is 192.168.0.1, if you mis this information you can try to figure it out sniffing on the interface with the help of *wireshark* .
53 1 Francisco Jiménez
54 1 Francisco Jiménez
h2. *CONFIGURE YOUR ETHERNET INTERFACE*
55 1 Francisco Jiménez
56 1 Francisco Jiménez
To calculate a proper IP address for your interface you can use ipcalc, in our case 
57 1 Francisco Jiménez
<pre>
58 1 Francisco Jiménez
ipcalc 192.168.0.1/24
59 1 Francisco Jiménez
</pre>
60 1 Francisco Jiménez
61 1 Francisco Jiménez
Note: 192.168.0.1/24 is the IP of our router
62 1 Francisco Jiménez
63 1 Francisco Jiménez
Choose an IP between HostMin and HostMax, we choosen 192.168.0.2/24
64 1 Francisco Jiménez
65 1 Francisco Jiménez
<pre>
66 1 Francisco Jiménez
sudo ip address add 192.168.0.2/24 dev eth0
67 1 Francisco Jiménez
</pre>
68 1 Francisco Jiménez
69 1 Francisco Jiménez
h2. *ENTER ADMINISTRATIVE INTERFACE OF YOUR ROUTER*
70 1 Francisco Jiménez
71 1 Francisco Jiménez
Open the page http://your_touter_ip with your browser in our case the url is http://192.168.0.1