G+_William Burlingame Posted May 28, 2016 Share Posted May 28, 2016 I would like to use my Raspberry Pi 2 as a WiFi access point. I went through the steps listed on the Adafruit site at: https://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point?view=all I implemented each step by doing a copy from the site and pasting the commands in a terminal window via Putty on my Win 10 PC. Everything seemed to be going well until I go the section titled: First test! I copied the command and got this result. pi@raspberrypi~ $ sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf Configuration file: /etc/hostapd/hostapd.conf Could not open configuration file '/etc/hostapd/hostapd.conf' for reading. It may by obvious that I'm not proficient in using Linux, so I can't understand what went wrong. Does anyone have a any ideas what the problem may be? The WiFi dongle was included when I purchased my Pi 2 as part of a CanaKit. I would eventually like to get an 801.11 AC high gain WiFi USB dongle for a Raspberry Pi based access point. https://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point?view=all Link to comment Share on other sites More sharing options...
G+_Eddie Foy Posted May 28, 2016 Share Posted May 28, 2016 does /etc/hostapd/hostapd.conf exist? try: ls /etc/host* and: ls /etc/hostapd is it actually in the /etc/hostapd/ dir or just in /etc/ linux also uses a '.d' extention often in the /etc directory; it means a sub directory Link to comment Share on other sites More sharing options...
G+_William Burlingame Posted May 28, 2016 Author Share Posted May 28, 2016 Eddie Foy, thanks. It did not exist, but hostapd.con did. I guess I hadn't high lighted the f when I did he copy. Now I get an error when I run the file. 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=0x0x1ac4638 ioctl[sIOCSIWMODE]: Invalid argument Could not set interface to mode(3)! Could not set interface to master mode! rtl871xdrv driver initialization failed. I guess one problem is the driver, but I don't know how to solve the Invalid Argument problem. I'll have to search for a driver for the dongle that came with the CanaKit. Link to comment Share on other sites More sharing options...
G+_Eddie Foy Posted May 28, 2016 Share Posted May 28, 2016 Sounds like the adapter doesn't support master mode. Try: iwconfig get device name (wlan0 ?) iwconfig mode master Link to comment Share on other sites More sharing options...
G+_William Burlingame Posted May 28, 2016 Author Share Posted May 28, 2016 Eddie Foy, pi@raspberrypi~ $ iwconfig wlan0 IEEE 802.11bgn ESSID:off/any Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:off lo no wireless extensions. eth0 no wireless extensions. Link to comment Share on other sites More sharing options...
G+_Eddie Foy Posted May 28, 2016 Share Posted May 28, 2016 now try: sudo iwconfig wlan0 mode master to put the adapter into master mode. Link to comment Share on other sites More sharing options...
G+_William Burlingame Posted May 28, 2016 Author Share Posted May 28, 2016 Eddie, pi@raspberrypi~ $ sudo iwconfig wlan0 mode master Error for wireless request "Set Mode" (8B06) : SET failed on device wlan0 ; Invalid argument. Does that mean your assessment that is doesn't support Master Mode is correct? Sorry to take us so much of your time. Link to comment Share on other sites More sharing options...
G+_Eddie Foy Posted May 28, 2016 Share Posted May 28, 2016 Ah! use : sudo iw list then scroll back and see supported modes (if iw is a valid command. If not : sudo apt-cache search iw should list package that has it.) Link to comment Share on other sites More sharing options...
G+_Eddie Foy Posted May 28, 2016 Share Posted May 28, 2016 There is an AP mode. Might be able to set/change that in the hostapd.conf file Link to comment Share on other sites More sharing options...
G+_William Burlingame Posted May 28, 2016 Author Share Posted May 28, 2016 I'll look into that. I'll have to hang it up for tonight. Thanks for your input. I have lots too learn about Linux. Link to comment Share on other sites More sharing options...
G+_Dan Hockey Posted May 29, 2016 Share Posted May 29, 2016 FYI for those who are having problems the issue is got to do with the latest version of Debian. In Jessie Debian they switched to something call systemd. Systemd handles things differently than what was used in wheezy, so if you're following older how-to's and they don't work, then that may be your problem. And since most of us RPI users are NOT linux admins your best bet would be to switch back to wheezy. If you have only one pi then use Berryboot or Noobs to switch between Raspbian Jessie and Raspbian Wheezy. Hope this helps. Link to comment Share on other sites More sharing options...
Recommended Posts