Difference between revisions of "Mesh/OpenWRT"

Jump to navigation Jump to search
2,639 bytes added ,  12:54, 15 August 2013
 
(9 intermediate revisions by 3 users not shown)
Line 43: Line 43:


  telnet 192.168.1.1
  telnet 192.168.1.1
(I've found that if you get an error here--like no path to host or connection refused--immediately after flashing, unplugging the router and plugging it back in is useful)


If it asks for a password use 'passwd' (without the quotes).
If it asks for a password use 'passwd' (without the quotes).
Line 152: Line 154:


Restart networking and you should be set.
Restart networking and you should be set.
/etc/init.d/network restart
There are a few other issues that might come up if you're trying to connect to the internet through the device. One is that 192.168.1.1 is a common ip (subnet?) for home routers. If you're connecting from your computer to your open-wrt router over 192.168.1.1 and the wifi router you're attempting to connect to is also on 192.168.1.1, there will be a (routing?) problem connecting to the internet.
One easy fix is to edit your networking config file so that the open-wrt router is on a different subnet.
vi /etc/config/network
<pre>
config interface lan
option ifname  eth0
option type    bridge
option proto  static
option ipaddr  192.168.2.1
option netmask 255.255.255.0
</pre>
If you restart networking on the device after changing your lan ip address, you will be disconnected from your terminal session. Log back in using the new ip address. (You may have to manually update your ip address on your computer).
You may need to assign yourself a new manual IP
<pre>
  sudo ifconfig eth0 192.168.2.2 netmask 255.255.255.0 up
</pre>
There may also be a need to update your nameserver.
vi /etc/resolv.conf
<pre>
search lan
nameserver 192.168.1.1
</pre>
Where 192.168.1.1 is the ip address of the wireless router you are attempting to connect to the internet over.
After making the changes, restart networking.
/etc/init.d/network restart
/etc/init.d/network restart


Line 255: Line 295:
The Bullet will now be running a TFTP server 192.168.1.20
The Bullet will now be running a TFTP server 192.168.1.20


Ensure that you have an IP address different from 192.168.1.20 and in the 192.168.1.x range and do the following:
Ensure that you have an IP address different from 192.168.1.20 and in the 192.168.1.x range.
 
You may want to stop network-manager (I believe Ubuntu mostly)
 
sudo /etc/init.d/network-manager stop
 
On most linux machines (assuming your ethernet interface is eth0) setting your ip address looks like this:
 
sudo ifconfig eth0 192.168.1.12 netmask 255.255.255.0 up
Afterwards do the following:


  tftp 192.168.1.20
  tftp 192.168.1.20
Line 285: Line 335:
=== Ubiquiti in Windows ===
=== Ubiquiti in Windows ===
from the directory where you stored the .bin file:
from the directory where you stored the .bin file:
  >tftp -i 192.168.1.20 PUT openwrt-atheros-ubnt2-squashfs.bin
  >tftp -i 192.168.1.20 PUT openwrt-atheros-ubnt2-squashfs.bin


Line 435: Line 486:


   sudo /etc/init.d/network-manager start
   sudo /etc/init.d/network-manager start
= OpenWRT on a VM =
For some development, it might be easier to run OpenWRT on a virtual machine. This keeps you from having to worry about a bunch of wires and carrying around a router everywhere and mostly keeps you from having to deal with flashing and some other more unpleasant stuffs.
OpenWRT has a page on how to setup a VM on virtualbox:
[http://wiki.openwrt.org/doc/howto/virtualbox OpenWRT Virtualbox HowTo]
This page has some helpful hints, especially on setting up network configurations:
[http://ediy.com.my/index.php/blog/item/31-openwrt-in-virtualbox OpenWRT in VirtualBox]
I've uploaded an already setup VM with a basic dev environment here:
[https://github.com/max-b/sudomesh-dev-vm Pre-configured VM]
The readme page should have some details on how to set it up and work around some issues.

Navigation menu