0

Raspberry Pi, wireless dongle, hostapd
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Raspberry Pi, wireless dongle, hostapd

by adafruit_support_mike on Fri Sep 05, 2014 3:32 pm

Getting it working is the important part.

What made things click?

adafruit_support_mike
 
Posts: 59205
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

by static on Fri Sep 12, 2014 11:57 am

I had to update my driver as well. I manually downloaded the driver using a USB stick and my Windows laptop (Easier to navigate the menus). Then I had to mount the USB drive (using this tutorial):
http://www.raspberrypi.org/forums/viewtopic.php?f=26&t=48958

I copied the file over using:

Code: Select all | TOGGLE FULL SIZE
cp (filename) ~


Then I followed sk00ter's instructions to a 'T'... Well, almost. I substituted the correct filename. (Folks, remember to use the 'TAB' autocomplete function in this iteration of linux. It'll save you from having to repeatedly type out long file names).

I've gotten intermittent connectivity at this point.
My question is: Do I need to change the name of the driver in hostapd.conf? Do I even need to include the driver in hostapd.conf? (I tried commenting it out before, and had less errors, but I'm not sure if I had intermittent connectivity then).

The device that I'm using is an rtl8192cu chip (I thought I got it from Adafruit, but at this point I have so many dongles lying around the house, I don't know).

Thanks for the fantastic work!

static
 
Posts: 182
Joined: Thu Dec 23, 2010 6:21 pm

Re: Raspberry Pi, wireless dongle, hostapd

by adafruit_support_mike on Fri Sep 12, 2014 3:50 pm

Hmm.. what's the name of the new driver, and what do you have in hostapd.conf?

adafruit_support_mike
 
Posts: 59205
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

by powershift on Sat Sep 13, 2014 9:56 am

Hi,

it seems I am experiencing the same error as bumbleb33z when doing the manual test:

sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0x64638
ioctl[SIOCSIWMODE]: Invalid argument
Could not set interface to mode(3)!
Could not set interface to master mode!
rtl871xdrv driver initialization failed.

before I do the sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf everything was fine (even with the download of RTL driver from Realtek site, compile it, etc.)

I am using the https://www.adafruit.com/products/1030 WiFi USB stick.

Any idea how to debug this issue?

Thanks,

powershift
 
Posts: 21
Joined: Sat Sep 13, 2014 9:50 am

Re: Raspberry Pi, wireless dongle, hostapd

by static on Sat Sep 13, 2014 2:22 pm

Powershift, I haven't seen that error. I tried changing a couple of things within hostapd.conf, but couldn't get it to trigger like that. The mods here may have a better idea.

Currently I'm using a the stock hostapd.conf.
I didn't know if we needed to point to a new driver since we downloaded new drivers from Realtek.

My intermittent connectivity issue seems to have disappeared. I'm not sure why it was happening.

static
 
Posts: 182
Joined: Thu Dec 23, 2010 6:21 pm

Re: Raspberry Pi, wireless dongle, hostapd

by adafruit_support_mike on Sun Sep 14, 2014 1:53 am

@Static: If the connection is working now, the problem was probably something transient: a variable hanging around somewhere in the OS or in your wifi router probably.

It's amazing where gremlins can hide.. I once tried to do an OS update on a PC that became more and more unresponsive until it wouldn't even boot when you flipped the power switch. Unplugging and replugging the monitor cable (which should have done absolutely nothing since the machine was unplugged at the time) solved everything.

@powershift: What do you get from `dmesg` when the system is doing hardware recognition on the wifi dongle? It will be toward the end of the list, probably starting on lines that begin with "usb 1-1.2"

adafruit_support_mike
 
Posts: 59205
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

by powershift on Mon Sep 15, 2014 2:15 am

Hi, Mike,

I am traveling this week for business so not in front of the box to get a dmseg output; will post it after return home this weekend.

I am wondering if it is due to that I add the TFT (1601) and enable the support with shell script? Or maybe I should re-start from a clean image (NOOBS)?

BTW, wlan0 works - I can ssh to it wirelessly from my MBA. Just the hostapd won't start.

Regards,

PowerShift

powershift
 
Posts: 21
Joined: Sat Sep 13, 2014 9:50 am

Re: Raspberry Pi, wireless dongle, hostapd

by adafruit_support_mike on Mon Sep 15, 2014 10:45 pm

That can happen. `hostapd` needs to communicate with the wifi dongle, and in the WAP tutorial there's mention of compiling a version for the RTL8192cu chipset if necessary.

Having a wifi dongle that `hostapd` doesn't know would be one possible source of failure.

Do you find anything in /var/log/messages tagged as being from `hostapd`?

adafruit_support_mike
 
Posts: 59205
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

by powershift on Sat Sep 20, 2014 4:06 am

I got back and then tried:

sudo make clean

and then redo:

sudo make
...

and then now it is working... Not sure why the first time when I tried and it does not work...

PS

powershift
 
Posts: 21
Joined: Sat Sep 13, 2014 9:50 am

Re: Raspberry Pi, wireless dongle, hostapd

by adafruit_support_mike on Mon Sep 22, 2014 1:07 am

It's been said that doing the same thing and expecting different results is the definition of insanity. In software, it's standard operating procedure.

There's a message in there somewhere.. ;-)

adafruit_support_mike
 
Posts: 59205
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

by PiHog on Tue Oct 07, 2014 12:09 pm

Hey.

I am still having that same problem Bumbleb33z and powershift were having. I did all those steps mentioned, but I still get

"pi@raspberrypi ~ $ sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0xe53638
ioctl[SIOCSIWMODE]: Invalid argument
Could not set interface to mode(3)!
Could not set interface to master mode!
rtl871xdrv driver initialization failed. "

if driver=rtl871xdrv. If I try other drivers like nl80211 mentioned in the tutorial I get:

"pi@raspberrypi ~ $ sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Line 2: invalid/unknown driver 'nl80211'
1 errors found in configuration file '/etc/hostapd/hostapd.conf'"

I have a Buffalo wifi dongle and I think it is a N150 model. dmesg says my registered interface driver is rt2800usb. I still haven't figured this out. Does anybody have any good ideas?

PiHog
 
Posts: 1
Joined: Tue Oct 07, 2014 12:02 pm

Re: Raspberry Pi, wireless dongle, hostapd

by adafruit_support_mike on Tue Oct 07, 2014 5:59 pm

You have a dongle with a different chipset, so information about rtl1892cu dongles won't help you much.

I don't know that dongle or driver, but a bit of Googling says that you can install some drivers with the command:

Code: Select all | TOGGLE FULL SIZE
sudo apt-get install firmware-ralink

adafruit_support_mike
 
Posts: 59205
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

by gadjetnut on Wed Oct 08, 2014 12:15 pm

I have the Adafruit wifi dongle and have followed the tutorial, including re-compiling hostapd but I can't get a connection to the access point. The access point does appear (in Windows and other wifi devices), and it does ask for a password to be entered, but the connection then fails. I do not get any errors in the syslog of the Rpi, so I'm not sure if it is a problem with hostapd or dhcp.

Does anyone know how I can debug this further?

gadjetnut
 
Posts: 9
Joined: Thu Jul 25, 2013 10:20 pm

Re: Raspberry Pi, wireless dongle, hostapd

by adafruit_support_mike on Wed Oct 08, 2014 9:21 pm

You may be seeing the low-power dropout issue mentioned at the bottom of this tutorial page:

https://learn.adafruit.com/adafruits-ra ... -configure

Give that a try and see if it helps.

adafruit_support_mike
 
Posts: 59205
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

by gadjetnut on Sat Oct 11, 2014 11:53 am

The low power drop out issue thread didn't solve the problem, but it did give me a clue. I plugged the WIFI dongle into a powered USB hub and now it does work. I am using the Raspberry Pi B+, maybe that doesn't push out enough power to the USB ports?

gadjetnut
 
Posts: 9
Joined: Thu Jul 25, 2013 10:20 pm

Please be positive and constructive with your questions and comments.