HM v4.0 WiFi setup


 

D Peart

TVWBB Pro
I don't really have a way to hook up my rPi to setup the wireless via the network so I'm trying to edit the /etc/config/network and /etc/config/wireless like I did for the previous versions.

I set

/etc/config/network:
config 'interface' 'wan'
option 'ifname' 'eth0'
option 'proto' 'dhcp'
option 'hostname' 'lm54'


/etc/config/wireless:
config 'wifi-device' 'radio0'
option 'type' 'mac80211'
option 'macaddr' '00:25:9c:52:44:5e'
option 'hwmode' '11ng'
option 'channel' 'auto'

config 'wifi-iface'
option 'device' 'radio0'
option 'ssid' 'yourwirelessap'
option 'mode' 'sta'
option 'network' 'wan'
option 'encryption' 'psk2'
option 'key' 'yourwpakey'

I can see the device on my router, but it does not assign an ip. Can someone who has this working share what their files look like? Please replace your ssid and key with something safe for the public to see.

thanks,
dave
 
I haven't figured out how to get the ethernet and the radio to bridge, which is what you've got set up there. Create a second interface in the /etc/config/network and then assign that in /etc/config/wireless
Code:
/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 proto 'dhcp'

config interface 'wwan'
        option proto 'dhcp'

/etc/config/wireless
config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option macaddr  80:1f:02:68:77:ac
        option hwmode '11ng'
        option htmode 'HT20'
        list ht_capab 'SHORT-GI-20'
        list ht_capab 'SHORT-GI-40'
        list ht_capab 'DSSS_CCK-40'
        option disabled '0'
        option txpower '20'
        option country '00'

config wifi-iface
        option ssid 'capnbry24'
        option encryption 'psk2'
        option device 'radio0'
        option mode 'sta'
        option network 'wwan'
        option key 'mykey'
Note the only thing you should have to change is the option network wwan in the wireless.
 
Dave,
I edited the files provided by Bryan in the post above. To do this I plugged my rPi into the wired network and used putty to ssh into it. There are two files to change:
/etc/config/network
/etc/config/wireless

dave
 
I've plug it into my router but the web page 192.168.1.1 no comes up. my router setup will open but there is no reference to the rpi.
 
I've plug it into my router but the web page 192.168.1.1 no comes up. my router setup will open but there is no reference to the rpi.

You have to plug it into the computer and the computer can't be plugged into anything else. That way, you can use the browser and log in
 
If I plug into my computer with a cat5 cable then it's not hooked up to internet and won't bring up anything like router or web pages to do what is needed. I can't even see the rpi.
 
Dave,

I just re-imaged my RPi and started all over so here is how I got it up and running:

1. make sure you have page 1 of this thread up in a browser tab so that you can refer to it while working because your computer won't be able to get on the internet during this process.
2. unplug your computers cat5 ethernet connection
3. connect your RPi and computer together with a cat5 cable
4. power up the RPi
5. Change your computers IP address to 192.168.1.2
a. control panel->network and internet->network and sharing center
b. top left, change adapter settings
c. right click your Local Area Connection-> properties
d. internet protocol version 4 (if there is a choice between version 6 and version 4)-> properties
e. click use the following IP address -> enter 192.168.1.2
f. if you ahve something already in there, remember it, write it down because after the RPi wireless is up and running you need to set it back to whatever is there. Most people have it set to obtain automatically
g. ok (don't hit close because you'll be back here later
6. telnet 192.168.1.1
7. edit the two files with vi that are on the first page. Entering your wireless name (ssid), key, etc.
8. type '/etc/init.d/network restart
9. watch for blue LED on wireless adapter to flash
10. go back to local area connection properties-> IP Verson 4-> reset to whatever settings you had previously
11. unplug cat5 from RPi and computer
12. plug computer back into network

check your router for the RPi IP and try out the webbrowser.

dave
 
Dave,

I just re-imaged my RPi and started all over so here is how I got it up and running:

1. make sure you have page 1 of this thread up in a browser tab so that you can refer to it while working because your computer won't be able to get on the internet during this process.
2. unplug your computers cat5 ethernet connection
3. connect your RPi and computer together with a cat5 cable
4. power up the RPi
5. Change your computers IP address to 192.168.1.2
a. control panel->network and internet->network and sharing center
b. top left, change adapter settings
c. right click your Local Area Connection-> properties
d. internet protocol version 4 (if there is a choice between version 6 and version 4)-> properties
e. click use the following IP address -> enter 192.168.1.2
f. if you ahve something already in there, remember it, write it down because after the RPi wireless is up and running you need to set it back to whatever is there. Most people have it set to obtain automatically
g. ok (don't hit close because you'll be back here later
6. telnet 192.168.1.1
7. edit the two files with vi that are on the first page. Entering your wireless name (ssid), key, etc.
8. type '/etc/init.d/network restart
9. watch for blue LED on wireless adapter to flash
10. go back to local area connection properties-> IP Verson 4-> reset to whatever settings you had previously
11. unplug cat5 from RPi and computer
12. plug computer back into network

check your router for the RPi IP and try out the webbrowser.

dave
any other way to do it after #6? never used putty?and what is vi?
 
Putty is a terminal emulator that lets you connect to the RPi. Its free and can be downloaded here: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

vi is the editor on RPi that will allow you to edit the files. You can learn how to make simple edits here: http://www.unix-manuals.com/tutorials/vi/vi-in-10-1.html

This is the easiest way. You can enable ssh and install a ssh client, but for me that is more difficult than the above.

dave

any other way to do it after #6? never used putty?and what is vi?
 
If you want to enable ssh you can use WinSCP to edit and update the files. But to enable ssh you still have to telnet in, so you will need to download Putty and issue command 6 above. Then follow this: http://wiki.openwrt.org/doc/howto/firstlogin to set your password. After doing this telnet will no longer work. You will have to use ssh.

Install WinSCP and ssh (select SCP from the dialog pulldown), 192.168.1.1 as your IP address, root and password. It may prompt you for your password again. It did me.

Then you can just use the browser that comes up to edit the files and save them. Reboot the RPi and it should be working for you.

Maybe Bryan has an easier way . . .

dave

any other way to do it after #6? never used putty?and what is vi?
 
Last edited:
any other way to do it after #6? never used putty?and what is vi?

Yes, all you need to do is after #5

Type "192.168.1.1" into IE's address box.

if you have the RPI and the HT connected together you should get a webpage for the router function. Also, you have to have the same WIFI dongle thats in the parts list so that wifi networking tab is available.

click on the wifi tab and it should have a button that lets you look for available wifi connection, click on that button. It should find your main wifi router that you use for internet. you should be able to click on it and it will also set up the wifi connection automantically. You don't need to use WinSCP. WinSCP would not work anyways if you dont have the correct wifi usb adapter plugged into the rPI, as I had found out when I tried the faster WIFI adapter.
 
Right now I just have the rPi, can I make an SD card and boot up the rPi and get the wireless all setup ? or do I need to wait until I have the heatermeter built and do all of this with the rPi heatermeter combo ?
 
Yeah if you've got a pi, an sd card, and your wireless adapter you can fire it up and play with the web interface all you want without any detrimental effect. Note that when you start it up with the heatermeter board for the first time, you'll need to manually flash the AVR from the "avr firmware" page or just by running the 'avrupdate' command from a telnet/ssh session.
 
Yeah if you've got a pi, an sd card, and your wireless adapter you can fire it up and play with the web interface all you want without any detrimental effect. Note that when you start it up with the heatermeter board for the first time, you'll need to manually flash the AVR from the "avr firmware" page or just by running the 'avrupdate' command from a telnet/ssh session.

Thanks so much for the reply, is the "switch" that is uses to know it is the first boot something complex ?? Or is it just a value in a file somewhere ?
 

 

Back
Top