ramana
April 14, 2020, 9:30pm
1
Hello,
Appreciate if some one can help me with wifi on raspberry pi. Its not working.
Here are my settings:
/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 globals 'globals'
option ula_prefix 'fd1e:04b0:3594::/48'
config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.2.1'
option ip6assign '60'
config interface 'wan'
option ifname 'wlan0'
option proto 'dhcp'
/etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option legacy_rates '0'
option country 'US'
option hwmode '11g'
option path 'platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
option htmode 'HT20'
option disabled '0'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'xxx'
option key 'xxx'
option encryption 'none'
trendy
April 14, 2020, 10:36pm
2
Is the wifi bridged to the lan or the only member of wan? (hint: it's both)
What are you trying to achieve there?
1 Like
ramana
April 14, 2020, 11:08pm
3
Thanks for the reply, what I am trying is to have wifi enabled and ip should be dynamic.
what change would you suggest?
Regards.
trendy
April 14, 2020, 11:15pm
4
I mean is the wifi supposed to be a client to some other access point? Or an access point itself? Or both?
ramana
April 14, 2020, 11:23pm
5
Let me be clear, i have wifi in the house, three devices already using this wifi. Now this raspberry pi also need to connect to this wifi, so that I can connect to internet and install software. This is all my first focus.
Hope i explained.
Regards.
trendy
April 14, 2020, 11:30pm
6
So it is the first option?
ramana
April 14, 2020, 11:31pm
7
Thanks, yes is the first option.
Regards
trendy
April 14, 2020, 11:35pm
8
Then remove the ifname wlan0
from wan interface, create a new ssid in station mode, add the details of the access point and assign it to wan interface.
1 Like
ramana
April 14, 2020, 11:45pm
9
I made this change in /etc/config/network
config interface 'wan'
option proto 'dhcp'
option mode 'sta'
option ssid 'myid'
option key 'mykey'
I did execute: wifi down; sleep 4; wifi up
But when I do : ping www.google.com
does not work ?
Regards.
ramana
April 14, 2020, 11:49pm
10
Apologies, is that's what I am supposed to make the change?
Regards
trendy
April 14, 2020, 11:52pm
11
No, this is not how it is done.
The wireless settings go to the wireless config file. In network config file you should only remove the ifname wlan0 from wan.
Better do the changes in the Luci webgui to avoid locking yourself outside.
ramana
April 14, 2020, 11:54pm
12
I dont have luci installed, it is a raspberry pi image that does not have GUI interface.
Regards.
ramana
April 15, 2020, 12:01am
13
Now, the looks like this. But still wifi connection does not seem to work ? appreciate help so for.
/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 globals 'globals'
option ula_prefix 'fd1e:04b0:3594::/48'
config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.2.1'
option ip6assign '60'
config interface 'wan'
option proto 'dhcp'
/etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option channel '6'
option country 'US'
option hwmode '11g'
option path 'platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
option htmode 'VHT20'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'sta'
option ssid 'XX5G'
option key 'XXX'
option encryption 'psk2'
1 Like
ramana
April 15, 2020, 12:06am
14
Wow, it works now!! I made a small change in wireless, to use wan instead of lan.
Lot of thanks to you, for your help!
Regards
1 Like
tmomas
April 15, 2020, 5:51am
15
If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
ramana
April 15, 2020, 1:46pm
16
Thanks, just marked it as Solved.
Regards.
tmomas
Closed
April 25, 2020, 1:46pm
17
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.