Raspberry Pi, wireless dongle, hostapd

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

Post by adafruit_support_mike »

Getting it working is the important part.

What made things click?

User avatar
static
 
Posts: 188
Joined: Thu Dec 23, 2010 6:21 pm

Re: Raspberry Pi, wireless dongle, hostapd

Post by static »

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/viewt ... 26&t=48958

I copied the file over using:

Code: Select all

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!

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

Post by adafruit_support_mike »

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

User avatar
powershift
 
Posts: 36
Joined: Sat Sep 13, 2014 9:50 am

Re: Raspberry Pi, wireless dongle, hostapd

Post by powershift »

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,

User avatar
static
 
Posts: 188
Joined: Thu Dec 23, 2010 6:21 pm

Re: Raspberry Pi, wireless dongle, hostapd

Post by static »

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.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

Post by adafruit_support_mike »

@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"

User avatar
powershift
 
Posts: 36
Joined: Sat Sep 13, 2014 9:50 am

Re: Raspberry Pi, wireless dongle, hostapd

Post by powershift »

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

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

Post by adafruit_support_mike »

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`?

User avatar
powershift
 
Posts: 36
Joined: Sat Sep 13, 2014 9:50 am

Re: Raspberry Pi, wireless dongle, hostapd

Post by powershift »

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

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

Post by adafruit_support_mike »

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.. ;-)

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

Re: Raspberry Pi, wireless dongle, hostapd

Post by PiHog »

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?

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

Post by adafruit_support_mike »

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

sudo apt-get install firmware-ralink

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

Re: Raspberry Pi, wireless dongle, hostapd

Post by gadjetnut »

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?

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi, wireless dongle, hostapd

Post by adafruit_support_mike »

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.

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

Re: Raspberry Pi, wireless dongle, hostapd

Post by gadjetnut »

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?

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”