Showing posts with label wlan0. Show all posts
Showing posts with label wlan0. Show all posts

Sunday, June 4, 2017

Configuring my wifi dongle on the Raspberry Pi to connect to my network router.

Configuring my wifi dongle on the Raspberry Pi to connect to my network router.

Generic Wifi dongle used on my Raspberry Pi


I had to get my router details and had to configure the following configuration files.
I wanted to give my Raspberry Pi a spear static IP so I always know what it is on my network.

I edited the following files.

/etc/wpa_supplicant/wpa_supplicant.conf

I added the following at the end. I was using WEB encryption and shared key on my router.
Change the details in yellow for your router if you use web encryption with shared key.
use your favorite editor
sudo vi /etc/wpa_supplicant/wpa_supplicant.conf

#Configeration of the file /etc/wpa_supplicant/wpa_supplicant.conf
country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
        ssid="MyRouter"  # your router ID
        key_mgmt=NONE
        wep_key0="0123456789123"  # or 13 characters, or a hexkey starting with 0x your key
        wep_tx_keyidx=0
        auth_alg=OPEN
}

Save and exit
And the change the following file

Edit the file as follows in the section configuring wlan0
I gave my Raspberry pi a spear static Ip on my network so always now what the ip is and don't use DHCP so I will not know what the Ip will be 
use your favorite editor

sudo vi /etc/network/interfaces
auto wlan0
allow-hotplug wlan0
#iface wlan0 inet dhcp
iface wlan0 inet static
address 192.168.1.205  #Static Ip
netmask 255.255.255.0 # Ip mask of network
gateway 192.168.1.254 # IP gateway of router
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

Save

And reboot Raspberry Pi  sudo shutdown -r 0

ping your new Ip on Wifi network

ping 192.168.1.205

And it should now work.





Thursday, June 7, 2012

Wifi Mesh network South of Johannesburg

Wifi  Mesh Nodes in South of Johannesburg. (Self learning nodes and auto rout)(You are the network)
I will be setting up my Mikrotik router for Mesh network and if anyone is interested in connecting in Bassonia Glenvista aria let me know. (2.4Ghz and 5Ghz).
I change my mind and is using Ubuntu mobile mesh as a network node.

More details at http://en.wikipedia.org/wiki/Wireless_mesh_network
here is a link to install mobile mash
1) Getting your Ubuntu to use mobile mesh
1.1) Install mobilemash (wget http://launchpadlibrarian.net/5005432/mobilemesh_1.0%2Bdfsg0-0.1_i386.deb)
2.1)  install deb (sudo dpkg -i mobilemesh_1.0+dfsg0-0.1_i386.deb)

3.1) config your wifi (make shore you have wifi)
3.2) sudo iwconfig wlan0 mode ad-hoc
3.3) cd /var/run/mobilemesh/
3.4) sudo ifconfig wlan0 up
3.5) sudo iwconfig wlan0 essid mobilemesh
3.6) sudo iwconfig wlan0 key 12345678910
3.7) sudo ifconfig wlan0 196.254.1.1
3.8) sudo vi /etc/mobilemesh/mmrp.conf

3.9) Changee the config file interface wlan0 # <- Change/add interface here
3.10) sudo mmdiscover -i wlan0
3.11)  sudo mmrp
3.12)  ip route
3.13)  sudo mmdiscover  -i wlan0
4.1) look in the log file /var/log/syslog
5.1) find the udp port that mmrp is listing on (sudo lsof | grep mmrp)
5.2) you should see somting in the listing like this ( UDP *:20471)
6.1) sudo mmtodot -p 20471
6.2) if all the codependency lib For GraphViz is installed you should see something like this