SimplePalm
Posts: 11
Joined: Fri Aug 29, 2014 12:09 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Fri Sep 05, 2014 2:55 pm

Anyone please ?

does no one have any idea of what the cause might be ?

i just reformated everything, and just copy pasted everything from the guide, i did not type anything outmyself, and it still is not working....

i noticed that im using RT 5370 chipset if that makes any difference...

hunternet93
Posts: 336
Joined: Mon Dec 12, 2011 4:34 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Sun Sep 07, 2014 12:07 pm

SimplePalm wrote:Anyone please ?

does no one have any idea of what the cause might be ?

i just reformated everything, and just copy pasted everything from the guide, i did not type anything outmyself, and it still is not working....

i noticed that im using RT 5370 chipset if that makes any difference...
Sorry for the delay in getting back to you, please run the following commands and copy/paste the output:

Code: Select all

sudo ip addr
sudo grep -e 'hostapd' -e 'dhcp' /var/log/syslog
cat /etc/udhcpd.conf
ps -ef | grep dhcp
Hopefully, it should tell us what's going wrong.

SimplePalm
Posts: 11
Joined: Fri Aug 29, 2014 12:09 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Mon Sep 22, 2014 7:09 am

Hey sorry for the delay,

i thought you guys gave up so i stoped with the pi, but seeing as you just replied i tried starting up the pi again.

however now it wont even broadcast the wifi,

i tried this command :

Code: Select all

route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.12.164.1     0.0.0.0         UG    0      0        0 eth0
10.12.164.0     0.0.0.0         255.255.254.0   U     0      0        0 eth0
this line is missing :

Code: Select all

192.168.42.0    0.0.0.0         255.255.255.0   U     0      0        0 wlan0
so i had to acctually add it in manually as you had written up before with the following command

Code: Select all

sudo ifconfig wlan0 192.168.42.1
when i checked the /etc/network/interfaces file

Code: Select all

auto lo

iface lo inet loopback
iface eth0 inet dhcp

#allow-hotplug wlan0
iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp

iface wlan0 inet static
  address 192.168.42.1
  netmask 255.255.255.0

up iptables-restore < /etc/iptables.ipv4.nat
so it should add that line of code automatically but it does not seem to happen.

any idea ?

hunternet93
Posts: 336
Joined: Mon Dec 12, 2011 4:34 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Mon Sep 22, 2014 10:30 pm

SimplePalm wrote:Hey sorry for the delay,

i thought you guys gave up so i stoped with the pi, but seeing as you just replied i tried starting up the pi again.

however now it wont even broadcast the wifi,

i tried this command :
(snip)
Based on the log you posted previously and this info, it looks like udhcpd isn't configured correctly. Try setting it up exactly like in the tutorial, make sure you use the correct IP address range (in the 192.168.42 subnet). According to the log file, you Pi was handing out addresses for the 192.168.0.x subnet, while your Pi's IP address was in the 192.168.42.x subnet, so connected devices couldn't route traffic to the Pi.

Rpizer
Posts: 28
Joined: Thu Sep 18, 2014 6:09 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Tue Sep 23, 2014 9:28 pm

i have configure access point eth0 + wlan0 and it's worked fine with internet
but i was want wlan0 + wlan1 so i changed some configs eth0 to wlan0 and wlan0 to wlan1 but its not worked.
which config must be changed ?

hunternet93
Posts: 336
Joined: Mon Dec 12, 2011 4:34 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Wed Oct 01, 2014 1:24 am

Rpizer wrote:i have configure access point eth0 + wlan0 and it's worked fine with internet
but i was want wlan0 + wlan1 so i changed some configs eth0 to wlan0 and wlan0 to wlan1 but its not worked.
which config must be changed ?
You'll need to make sure wlan1 connects to it's access point on boot. Edit /etc/network/interfaces and change the lines:

Code: Select all

iface eth0 inet dhcp
to

Code: Select all

iface wlan1 inet dhcp
    wireless-essid YourWiFiNetworkHere
Or, if the hotspot uses WPA or WPA2:

Code: Select all

iface wlan1 inet dhcp
    wpa-ssid YourWiFiNetworkHere
    wpa-psk YourWiFiPasswordHere
After that, changing all references of eth0 to wlan1 should work, although I don't have a Pi handy to test at the moment.

Rpizer
Posts: 28
Joined: Thu Sep 18, 2014 6:09 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Mon Oct 06, 2014 10:16 pm

hunternet93 wrote:
Rpizer wrote:i have configure access point eth0 + wlan0 and it's worked fine with internet
but i was want wlan0 + wlan1 so i changed some configs eth0 to wlan0 and wlan0 to wlan1 but its not worked.
which config must be changed ?
You'll need to make sure wlan1 connects to it's access point on boot. Edit /etc/network/interfaces and change the lines:

Code: Select all

iface eth0 inet dhcp
to

Code: Select all

iface wlan1 inet dhcp
    wireless-essid YourWiFiNetworkHere
Or, if the hotspot uses WPA or WPA2:

Code: Select all

iface wlan1 inet dhcp
    wpa-ssid YourWiFiNetworkHere
    wpa-psk YourWiFiPasswordHere
After that, changing all references of eth0 to wlan1 should work, although I don't have a Pi handy to test at the moment.
i'm using wlan0 to connect to the wifi n wlan1 to repeater
This is my config
so what is the wrong in it

Code: Select all


#auto lo


auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

auto wlan1
iface wlan1 inet dhcp

auto br0
iface br0 inet dhcp
bridge_ports eth0 wlan0 wlan1

gioPit
Posts: 15
Joined: Sun Nov 23, 2014 10:41 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Sat Dec 06, 2014 5:05 pm

I'm trying to configure my pi as wireless hotspot using an RT5370 adapter. I'm running with raspbian in headless mode via ssh.

The problem I'm facing is that when I launch hostapd the ssh consoles (yes, all of them) get stuck and I can't do anything. If I unplug the dongle sometimes the consoles unfreeze and I get all the output messages I should have received in the meantime. Some other time the only way to get back is unplug the power supply, because even unplugging the lan cable I'm not able anymore to login through ssh.

Please help.
I thought the problem is caused by the wireless adapter drivers, since I was able to reproduce the same issue on my laptop and then fix it compiling the driver supplied in the adapter's cdrom. I tried to compile them on rasperry and got iw list "nl80211 not found" and hostapd "Set mode ifindex 3 iftype 2 (STATION) nl80211 driver initialization failed" errors. So I went back to the stock rt2800usb firmware.

This is my /etc/hostapd.conf:

Code: Select all

interface=wlan0
driver=nl80211
ssid=WiPi
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=mypassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
This is the output of sudo hostapd -dd /etc/hostapd.conf
(the blank lines is where the console freezes and I press enter. Then I unplug my RT5370 module and the rest of out appears)

Code: Select all

random: Trying to read entropy from /dev/random
Configuration file: /etc/wipi_hostapd.conf
nl80211: interface wlan0 in phy phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: Using driver-based off-channel TX
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 04 0a
nl80211: Failed to register Action frame processing - ignore for now
nl80211: Add own interface ifindex 3
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Create interface iftype 6 (MONITOR)
nl80211: New interface mon.wlan0 created: ifindex=4
nl80211: Add own interface ifindex 4
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz
nl80211: 2457-2482 @ 40 MHz
nl80211: 2474-2494 @ 20 MHz
nl80211: 5170-5250 @ 160 MHz
nl80211: 5250-5330 @ 160 MHz
nl80211: 5490-5730 @ 160 MHz
nl80211: 5735-5835 @ 80 MHz
nl80211: 57240-63720 @ 2160 MHz
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
Completing interface initialization
Mode: IEEE 802.11g  Channel: 6  Frequency: 2437 MHz
nl80211: Set freq 2437 (ht_enabled=0 sec_channel_offset=0)
Failed to update rate sets in kernel module
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
Deauthenticate all stations
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr 00:87:34:7f:02:5b and ssid 'WiPi'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=4):
     57 69 50 69                                       WiPi            
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
random: Got 20/20 bytes from /dev/random
Get randomness: len=32 entropy=0
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
Key Counter - hexdump(len=32): [REMOVED]
WPA: Delay group state machine start until Beacon frames have been configured
VLAN: vlan_set_name_type(name_type=2)
nl80211: Set beacon (beacon_set=0)




WPA: Start group state machine to set initial keys
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
Get randomness: len=16 entropy=0
GTK - hexdump(len=16): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=3 alg=3 addr=0x88f0c key_idx=1 set_tx=1 seq_len=0 key_len=16
   broadcast key
nl80211: set_key failed; err=-19 No such device)
wpa_driver_nl80211_set_operstate: operstate 0->1 (UP)
netlink: Operstate: linkmode=-1, operstate=6
Failed to set TX queue parameters for queue 0.
Failed to set TX queue parameters for queue 1.
Failed to set TX queue parameters for queue 2.
Failed to set TX queue parameters for queue 3.
wlan0: Setup of interface done.
RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
nl80211: Interface down
Unknown event 30
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
nl80211: Interface wlan0 does not exist - ignore RTM_NEWLINK
RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
nl80211: Ignore interface up event since interface wlan0 does not exist
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=1 ifi_flags=0x1003 ([UP])
nl80211: Ignore interface up event since interface wlan0 does not exist
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
nl80211: Interface wlan0 does not exist - ignore RTM_NEWLINK
RTM_NEWLINK: operstate=1 ifi_flags=0x11003 ([UP][LOWER_UP])
nl80211: Ignore interface up event since interface wlan0 does not exist
netlink: Operstate: linkmode=-1, operstate=6
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
nl80211: Interface wlan0 does not exist - ignore RTM_NEWLINK
RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
nl80211: Interface wlan0 does not exist - ignore RTM_NEWLINK
RTM_NEWLINK: operstate=1 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_DELLINK, IFLA_IFNAME: Interface 'wlan0' removed
Unknown event 5
RTM_DELLINK, IFLA_IFNAME: Interface 'mon.wlan0' removed
Unknown event 5
nl80211: Event message available
nl80211: Scan trigger
rfkill: event: idx=0 type=1 op=1 soft=0 hard=0
recv: Network is down
l2_packet_receive - recvfrom: Network is down
VLAN: vlan_newlink(wlan0)
nl80211: Event message available
nl80211: Scan aborted
mgmt::deauth cb
VLAN: vlan_newlink(wlan0)
Add randomness: count=1 entropy=0
VLAN: vlan_newlink(mon.wlan0)
Add randomness: count=2 entropy=1
VLAN: vlan_dellink(wlan0)
Add randomness: count=3 entropy=2
VLAN: vlan_dellink(mon.wlan0)
Add randomness: count=4 entropy=3
Add randomness: count=5 entropy=4
Add randomness: count=6 entropy=5
Add randomness: count=7 entropy=6
nl80211: sendmsg: No such device or address
handle_probe_req: send: No such device or address
Add randomness: count=8 entropy=7
nl80211: sendmsg: No such device or address
handle_probe_req: send: No such device or address
Add randomness: count=9 entropy=8
Add randomness: count=10 entropy=9
Add randomness: count=11 entropy=10
Add randomness: count=12 entropy=11
Add randomness: count=13 entropy=12
Add randomness: count=14 entropy=13
Add randomness: count=15 entropy=14
Add randomness: count=16 entropy=15
Add randomness: count=17 entropy=16
Add randomness: count=18 entropy=17
nl80211: sendmsg: No such device or address
handle_probe_req: send: No such device or address
Add randomness: count=19 entropy=18
Add randomness: count=20 entropy=19

hunternet93
Posts: 336
Joined: Mon Dec 12, 2011 4:34 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Sat Dec 06, 2014 5:40 pm

gioPit wrote:I'm trying to configure my pi as wireless hotspot using an RT5370 adapter. I'm running with raspbian in headless mode via ssh.

The problem I'm facing is that when I launch hostapd the ssh consoles (yes, all of them) get stuck and I can't do anything. If I unplug the dongle sometimes the consoles unfreeze and I get all the output messages I should have received in the meantime. Some other time the only way to get back is unplug the power supply, because even unplugging the lan cable I'm not able anymore to login through ssh.

Please help.
I thought the problem is caused by the wireless adapter drivers, since I was able to reproduce the same issue on my laptop and then fix it compiling the driver supplied in the adapter's cdrom. I tried to compile them on rasperry and got iw list "nl80211 not found" and hostapd "Set mode ifindex 3 iftype 2 (STATION) nl80211 driver initialization failed" errors. So I went back to the stock rt2800usb firmware.
My best guess is there's a bug in the driver somewhere, but since my programming experience doesn't go far past Python I'm afraid I can't be much help. Maybe keep trying to compile the driver? You might have to modprobe the compiled driver manually, the hotplug system might be trying to load the old driver.

gioPit
Posts: 15
Joined: Sun Nov 23, 2014 10:41 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Sun Dec 07, 2014 8:54 am

I did it, I compiled both drivers available on the web or on the CD coming with the dongle. And I did blacklist the driver coming with the kernel and used modbrobe to load the one I compiled. No solution.
One was Printing some strange messages on dmesg, the other one seems to be not compatible with hostapd which uses nl80211 (as I wrote before)

frnknglrt
Posts: 1
Joined: Mon Jan 05, 2015 6:33 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Mon Jan 05, 2015 6:41 pm

Hello,

i also faced the issue:
is interface wlan0 up and configured?: Cannot assign requested address
As nothing helped, i created a ifplugd script to solve this problem by starting udhcpd after wlan0 is brought up. To use my solution, simply place the startup scrip in the folder /etc/ifplugd/action.d/.

xxx_start_udhpcd

Code: Select all

#!/bin/sh
set -e

/usr/bin/logger Checking udhcpd

if [ $1 != "wlan0" ] 
    then
	exit
fi

case "$2" in
up)
	/usr/sbin/service udhcpd start
	;;
down)
	/usr/sbin/service udhcpd stop

	/sbin/ifdown $1
	;;
esac
Please mind:
ifplugd runs to bring up your devices in case of plug actions. It should be considered as "last option" when init.d fails.

Best,

frnk

SellyOak
Posts: 12
Joined: Sat Apr 12, 2014 10:53 am

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Mon Jan 12, 2015 12:51 pm

Hi.

Hope someone can help, I've hit a bit of a brick wall and I think I know where I'm going wrong, but need some guidance.

I've successfully created a WiFi hotspot using the instructions here. It works great on my home network.

However, the problem comes when I take it to connect to the libraries network. Now to get the Pi to normally connect, I have to use a proxy server information, which I specify using "export http_proxy=http://xxx.yyy:80/".

Now I'm guessing I need to adapt my IPTABLES information to take this into account, but I can't seem to work my head around the commands.

Any help would really be appreciated.

hunternet93
Posts: 336
Joined: Mon Dec 12, 2011 4:34 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Tue Jan 13, 2015 1:28 am

SellyOak wrote:Hi.

Hope someone can help, I've hit a bit of a brick wall and I think I know where I'm going wrong, but need some guidance.

I've successfully created a WiFi hotspot using the instructions here. It works great on my home network.

However, the problem comes when I take it to connect to the libraries network. Now to get the Pi to normally connect, I have to use a proxy server information, which I specify using "export http_proxy=http://xxx.yyy:80/".

Now I'm guessing I need to adapt my IPTABLES information to take this into account, but I can't seem to work my head around the commands.

Any help would really be appreciated.
You should be able to forward all web traffic to the proxy with something like:

Code: Select all

iptables -t nat -A PREROUTING -s <your Pi's WiFi IP> -p tcp -m multiport --dports 80,443 -j DNAT --to-destination <proxy addr>:<proxy port>
That should transparently forward all traffic coming in over WiFi to the proxy.

SellyOak
Posts: 12
Joined: Sat Apr 12, 2014 10:53 am

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Tue Jan 13, 2015 11:59 am

hunternet93 wrote: You should be able to forward all web traffic to the proxy with something like:

Code: Select all

iptables -t nat -A PREROUTING -s <your Pi's WiFi IP> -p tcp -m multiport --dports 80,443 -j DNAT --to-destination <proxy addr>:<proxy port>
That should transparently forward all traffic coming in over WiFi to the proxy.
Thank you very much. I won't get a chance to test it until Friday, but this looks closer to what I had expected. I just couldn't quite get the syntax right, one of my attempts broke all the internet access!

I'll let you know how it goes.

radhika0102
Posts: 14
Joined: Fri Aug 15, 2014 4:20 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Thu Jan 15, 2015 9:35 am

# FY4Sne hey ! is your problem sorted out ? even i am facing the same problem even i tried deleting the drivr field in hostapd.conf file but still i am getting an error.please help .

gioPit
Posts: 15
Joined: Sun Nov 23, 2014 10:41 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Fri Jan 16, 2015 12:22 am

I followed this tutorial: http://www.pi-point.co.uk/documentation/
but I'm not able to connect with my android (stuck at "getting IP addr...")
I get this error before login:

Code: Select all

Configuration file: /etc/hostapd/hostapd.conf
Failed to update rate sets in kernel module

hunternet93
Posts: 336
Joined: Mon Dec 12, 2011 4:34 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Sun Jan 18, 2015 8:20 pm

gioPit wrote:I followed this tutorial: http://www.pi-point.co.uk/documentation/
but I'm not able to connect with my android (stuck at "getting IP addr...")
I get this error before login:

Code: Select all

Configuration file: /etc/hostapd/hostapd.conf
Failed to update rate sets in kernel module
This forum thread is for the tutorial on the eLinux wiki, not for all Pi-as-access-point questions. Since you used a different tutorial, please contact that tutorial's author or create a new forum post.

gioPit
Posts: 15
Joined: Sun Nov 23, 2014 10:41 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Mon Jan 26, 2015 12:01 pm

Yes, you're right. I apologize for this. Anyway I solved the problem. I just needed to re-assign the IP address to the interface

luketc1
Posts: 1
Joined: Thu Mar 26, 2015 9:07 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Thu Mar 26, 2015 9:11 pm

Hi, I'm trying to set up an AP using the tutorial on my new rPi 2 and a NOOBS raspbian install. I've made it through, but when I try to start hostapd, I receive the following error, saying the channel cannot be set because my device is busy. Here's my debug flagged output

Code: Select all

sudo hostapd -d /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
nl80211: interface wlan0 in phy phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: Using driver-based off-channel TX
nl80211: Add own interface ifindex 3
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Failed to set interface 3 to mode 3: -95 (Operation not supported)
nl80211: Interface already in requested mode - ignore error
nl80211: Create interface iftype 6 (MONITOR)
nl80211: New interface mon.wlan0 created: ifindex=8
nl80211: Add own interface ifindex 8
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz
nl80211: 2457-2482 @ 40 MHz
nl80211: 2474-2494 @ 20 MHz
nl80211: 5170-5250 @ 160 MHz
nl80211: 5250-5330 @ 160 MHz
nl80211: 5490-5730 @ 160 MHz
nl80211: Added 802.11b mode based on 802.11g information
Completing interface initialization
Mode: IEEE 802.11g  Channel: 1  Frequency: 2412 MHz
nl80211: Set freq 2412 (ht_enabled=0 sec_channel_offset=0)
nl80211: Failed to set channel (freq=2412): -16 (Device or resource busy)
Could not set channel for kernel driver
wlan0: Unable to setup interface.
Flushing old station entries
Could not connect to kernel driver.
Deauthenticate all stations
nl80211: Remove interface ifindex=8
netlink: Operstate: linkmode=0, operstate=6
nl80211: Set mode ifindex 3 iftype 2 (STATION)
And my /etc/hostapd/hostapd.conf:

Code: Select all

interface=wlan0
driver=nl80211
ssid=RASPBERRYPI
hw_mode=g
channel=1
auth_algs=1
wmm_enabled=0
I'm trying to do this on a Netgear WG111v3 USB dongle

Thanks in advance for any help

hunternet93
Posts: 336
Joined: Mon Dec 12, 2011 4:34 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Sat Mar 28, 2015 2:50 pm

luketc1 wrote:Hi, I'm trying to set up an AP using the tutorial on my new rPi 2 and a NOOBS raspbian install. I've made it through, but when I try to start hostapd, I receive the following error, saying the channel cannot be set because my device is busy. Here's my debug flagged output

Code: Select all

(snip)
nl80211: Failed to set channel (freq=2412): -16 (Device or resource busy)
Unfortunately, according to https://wireless.wiki.kernel.org/en/use ... rs/rtl8187 the driver for the Realtek RTL8187B chipset your Netgear dongle uses doesn't support access point mode. You'll need a different adapter to run an access point, such as the common Edimax EW-7811Un adapter or another adapter using a chipset that supports access point mode.

GRamesh
Posts: 2
Joined: Tue Apr 14, 2015 5:08 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Wed Apr 29, 2015 12:35 pm

I am getting the following error:
starting advanced IEEE 802.11 management: hostapd failed.

dlawson
Posts: 2
Joined: Fri May 08, 2015 9:42 am

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Fri May 08, 2015 9:43 am

Works for me - RPi in full wifi hotspot mode! Question: How do I disable (not remove) these changes - revert the RPi to be served an IP Address from my home network? I only every wireless connect to my RPi is a bit of pain to switch SSID (home wifi to RPi wifi) on my Mac during development session. Hence nice to switch off the feature for now.

I have updated update-rc.d to disable both hosted and udhcpd and reverted the /etc/network/interface back to dhcp mode (rather than static IP address mode). On reboot the RPi fails to be get an IP address from my home wifi network.

Thanks in advance.

hunternet93
Posts: 336
Joined: Mon Dec 12, 2011 4:34 pm

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Thu May 14, 2015 10:30 pm

dlawson wrote:Works for me - RPi in full wifi hotspot mode! Question: How do I disable (not remove) these changes - revert the RPi to be served an IP Address from my home network? I only every wireless connect to my RPi is a bit of pain to switch SSID (home wifi to RPi wifi) on my Mac during development session. Hence nice to switch off the feature for now.

I have updated update-rc.d to disable both hosted and udhcpd and reverted the /etc/network/interface back to dhcp mode (rather than static IP address mode). On reboot the RPi fails to be get an IP address from my home wifi network.

Thanks in advance.
Sorry for the delay in responding. Sounds like you've changed everything back to how it should be, maybe double-check your wifi network settings? If that doesn't help, please post the (redacted) contents of your /etc/network/interfaces, and the output of the following commands:

Code: Select all

sudo iwconfig
sudo ip addr

dlawson
Posts: 2
Joined: Fri May 08, 2015 9:42 am

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Sat May 16, 2015 11:57 am

Thanks for you feedback. Turned out that my wpa-supplicant configuration file was looking for my old SSID! replaced ssid and psk to current naming and it worked!

pokrivnik
Posts: 1
Joined: Wed May 20, 2015 9:34 am

Re: [Tutorial] Using the RasPi as a WiFi hostspot (8 Nov 12)

Wed May 20, 2015 9:48 am

Hope someone can help, my wifi hotspot does not want to work after restart
OS raspbian, Release date:2015-05-05.

If you enter "sudo service udhcpd start" It works OK

If you enter "sudo update-rc.d udhcpd enable" does not start after reboot.

Return to “Networking and servers”