RPi + Runeaudio +Wifi as Accesspoint

Raspberry Pi related support

Re: RPi + Runeaudio +Wifi as Accesspoint

Postby johnbanks » 19 Aug 2016, 12:01

Frank/Dror ...
Thanks for your inputs.
I'm away from home for a few days so will try again on my return.
Once I get it running on an RPi2, I'll try on my RPi3 and will report back.
Frank - I don't think you should be despondent.
Your solution will be particularly popular when the next image is released and it can be installed just by wireless.
There must be many users like me who do not have a wired LAN connection where their Rune & hifi speakers are located.
Regards
johnbanks
 
Posts: 124
Joined: 11 Jun 2014, 00:16

Re: RPi + Runeaudio +Wifi as Accesspoint

Postby Mat » 19 Aug 2016, 15:52

hondagx35 wrote:Only two users who tried to setup an AP on RuneAudio?
I need your input to see if it is worth implementing this feature.


Usefull feature. Just tried it on RPI 1 model B without success. RPI does not boot after changes. Does not have RPI2 here at the moment.
Mat
 
Posts: 21
Joined: 01 Jul 2015, 12:19

Re: RPi + Runeaudio +Wifi as Accesspoint

Postby hondagx35 » 19 Aug 2016, 22:36

Hi Mat,

Just tried it on RPI 1 model B without success.


on RP1:

- do not update the kernel and firmware
- first switch to nightly build and get this running
- check if iw is installed
- check if your dongle is able to act as AP (iw list)

Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: RPi + Runeaudio +Wifi as Accesspoint

Postby dror » 23 Aug 2016, 22:07

Hi,
Some more impressions/issues
First, after changing the AP configuration - for example, I tried to turn off the NaT and to turn off the AP (using the commands you post of course), then executing a reboot via ssh - the pi is not responsive. You need to unplug the power cord and replug for the reboot and the changes take effect.
Turning them on and reboot worked for me though :roll:

Second, the NaT off configuration is not working as expected. My android connects to the AP, and as expected there is an examination mark ("!") near the wifi sign indicating there is no internet access. The problem is - you can't access the UI no matter what I put into as the web address. Moreover, network diagnostic utility I use - "Fing" - can't analyse the network. You do get an IP though :roll: .

Third but probably an off topic (please tell me if so, I will open a new thread) -with the great working NaTed configuration, the DLNA renderer is not visible through my Android - But - I do see the Airplay renderer, and the DLNA renderer IS visible to my PC on the network.

Thanks,
Dror
dror
 
Posts: 140
Joined: 03 Dec 2015, 10:14

Re: RPi + Runeaudio +Wifi as Accesspoint

Postby hondagx35 » 23 Aug 2016, 23:34

Hi Dror,

First, after changing the AP configuration

works for me

Second, the NaT off configuration is not working as expected.

also works on my setup

Third ....., the DLNA renderer is not visible

I have to check this.

Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: RPi + Runeaudio +Wifi as Accesspoint

Postby hondagx35 » 26 Aug 2016, 16:37

Hi all,

if you expierence problems with EDIMAX dongles and / or lost connections please see the modified hostapd.conf.
post16708.html#p16708

hostapd.conf
Code: Select all
# interface and driver
interface=wlan0
driver=nl80211

# WIFI-Config
ssid=RuneAudioAP
channel=7
hw_mode=g
wmm_enabled=1
auth_algs=1
max_num_sta=10

# WIFI authorization
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
wpa_passphrase=RuneAudio


I did some tests with different dongles and it looks it is working great.

Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: RPi + Runeaudio +Wifi as Accesspoint

Postby JERKBALL » 28 Aug 2016, 15:51

Hey Frank,

thank you for that possibility to have RuneAudio as Access Point. Perfect for using RuneAudio in Car Environment.

Sadly, it won't work on my RPi1...

Got everything together correctly.. Fixed issues with dnsmasq and hostapd, but now I get in dmesg:

[ 46.417419] cfg80211: Found new beacon on frequency: 2472 MHz (Ch 13) on phy0
[ 46.417569] cfg80211: Pending regulatory request, waiting for it to be processed...
[ 47.203911] systemd[1]: Stopping Automatic wireless network connection using netctl profiles...
[ 47.831803] systemd[1]: Failed to reset devices.list on /system.slice: Invalid argument
[ 49.742828] systemd[1]: Stopped Automatic wireless network connection using netctl profiles.
[ 50.136218] systemd[1]: Starting Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator...
[ 50.145709] systemd[1]: Started Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator.
[ 50.281932] systemd[1]: hostapd.service: main process exited, code=exited, status=1/FAILURE
[ 50.300318] systemd[1]: Unit hostapd.service entered failed state.
[ 50.759632] systemd[1]: Starting A lightweight DHCP and caching DNS server...
[ 51.114264] systemd[1]: Started A lightweight DHCP and caching DNS server.


Some Infos:

[root@runeaudio ~]# lsusb
Bus 001 Device 006: ID 07d1:3c03 D-Link System AirPlus G DWL-G122 Wireless Adapter(rev.C1) [Ralink RT2571W]


[root@runeaudio ~]# redis-cli hgetall AccessPoint
1) "enabled"
2) "1"
3) "ip-address"
4) "192.168.1.1"
5) "broadcast"
6) "192.168.1.255"
7) "ssid"
8) "RuneAudioAP"
9) "passphrase"
10) "RuneAudio"
11) "dhcp-range"
12) "192.168.1.2,192.168.1.254,24h"
13) "dhcp-option"
14) "option:dns-server,192.168.1.1"
15) "enable-NAT"
16) "0"


What's interesting for me is, that wlan0 is down in interfaces.. if I try to up the interface. Raspi freezes...

Help would be very appreciated...

Thanks a lot


//Edit

Think I got it:

[root@runeaudio ~]# /usr/bin/hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Line 2: unknown configuration item ' interface'
Line 3: unknown configuration item ' driver'
Line 5: invalid line ' # WIFI-Config'
Line 7: unknown configuration item ' channel'
Line 8: unknown configuration item ' hw_mode'
Line 9: unknown configuration item ' wmm_enabled'
Line 10: unknown configuration item ' auth_algs'
Line 11: unknown configuration item ' max_num_sta'
Line 13: invalid line ' # WIFI authorization'
Line 14: unknown configuration item ' wpa'
Line 15: unknown configuration item ' wpa_key_mgmt'
Line 16: unknown configuration item ' wpa_pairwise'
Line 17: unknown configuration item ' rsn_pairwise'
13 errors found in configuration file '/etc/hostapd/hostapd.conf'
Failed to set up interface with /etc/hostapd/hostapd.conf
Failed to initialize interface


Copy and paste from Firefox adds some spaces before the code.... that's what hostapd don't like in config...

Maybe someone else stumbles over the same issue...

Sorry for the empty noise...
JERKBALL
 
Posts: 1
Joined: 28 Aug 2016, 15:44

Re: RPi + Runeaudio +Wifi as Accesspoint

Postby hondagx35 » 28 Aug 2016, 21:13

Hi JERKBALL,

welcome to RuneAudio.

Sorry for the empty noise...

So it works on your RP1?

Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: RPi + Runeaudio +Wifi as Accesspoint

Postby johnbanks » 29 Aug 2016, 10:38

Frank ...

Firstly thx for yr additional improvements (add haveged and to hostapd.conf).

After many hours spent on this, here are my conclusions about an AP (not using NAT) on an RPi2 ...

I’ve got an AP working using a generic dongle with a Ralink chipset RT RT5370 and have successfully changed the SSID name & Pass phrase and the AP’s ip address.

But I have failed to get the same result with an Edimax dongle which uses a Realtek chipset. The Rune Network UI shows wlan0 connected to my selected AP ip address with my selected SSID name. My wifi discovery program (InSSIDer) shows Rune_AP (my selected name) to be broadcasting on channel 7. However I cannot connect to Rune_AP from my Windows 10 laptop or from my Nexus Android tablet.

My debug report is ... http://pastebin.com/tuNekrZc

Also running the command below gave the following ...
[root@runeaudio ~]# /usr/sbin/hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Could not set channel for kernel driver
Interface initialization failed
wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED
wlan0: Unable to setup interface.
wlan0: interface state DISABLED->DISABLED
wlan0: AP-DISABLED
hostapd_free_hapd_data: Interface wlan0 wasn't started
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
[root@runeaudio ~]#

I don’t know whether the above is helpful?

I am mindful that several months ago when building an RPi just as an AP that online tutorials needed to provide a modified version of hostapd which solved Edimax/Realtek driver problems (ref AdaFruit & Dave Conroy).

The following link is informative .... https://github.com/oblique/create_ap/blob/master/howto/realtek.md

Could yr success with Edimax be related to the RPi3 built in wifi or yr choice of ip address (192.168.1.1) which is commonly used by routers? I’m clutching at straws for understanding yr success and my failure.

Thx
johnbanks
 
Posts: 124
Joined: 11 Jun 2014, 00:16

Re: RPi + Runeaudio +Wifi as Accesspoint

Postby hondagx35 » 29 Aug 2016, 11:03

Hi johnbanks,

But I have failed to get the same result with an Edimax dongle which uses a Realtek chipset.

I'm using exactly the same dongle and it works without issues.
Code: Select all
[    5.195539] usb 1-1.4: New USB device found, idVendor=7392, idProduct=7811
[    5.195555] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    5.195566] usb 1-1.4: Product: 802.11n WLAN Adapter
[    5.195575] usb 1-1.4: Manufacturer: Realtek
[    5.195584] usb 1-1.4: SerialNumber: 00e04c000001


Could yr success with Edimax be related to the RPi3 built in wifi or yr choice of ip address (192.168.1.1) which is commonly used by routers?

I have used a RP2 for the EDIMAX test.
The IP address shouldn't matter as long as it is a valid one.

Also running the command below gave the following ...
[root@runeaudio ~]# /usr/sbin/hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Could not set channel for kernel driver
Interface initialization failed
wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED
wlan0: Unable to setup interface.
wlan0: interface state DISABLED->DISABLED
wlan0: AP-DISABLED
hostapd_free_hapd_data: Interface wlan0 wasn't started
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
[root@runeaudio ~]#


Please send me your hostapd.conf.
I think you have messed up something while changing the ssid.

Code: Select all
root@runeaudio:~# /usr/sbin/hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Using interface wlan0 with hwaddr 80:1f:02:c5:d1:f0 and ssid "RuneAudioAP"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED

This is with the provided hostapd.conf on a RP2 with EDIMAX dongle.

Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

support RuneAudio Donate with PayPal

PreviousNext

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 11 guests