Access Point on demand?

Max2Play Home Forums Max2Play Add-ons Access Point on demand?

Viewing 7 posts - 1 through 7 (of 7 total)
  • 29. August 2016 at 10:49 #22683

    Hi,

    I’m currently building a portable squeezebox that uses max2play (uses my old raspi and Wolfson, a Lepai 2020 amp, some JBL Control Pro speakers, a 12V LiFePo4 battery and some other stuff flying around). Fits comfortably in a 20x30x14 case. The speakers are clamped to it and can be removed for a broader stereo base. Wifi is an Edimax EW-7811UAC that can be configured as AP.
    The system runs just fine in my home network, connected to either by home LMS or the local LMS on the Raspi. The local LMS has a 128GB USB share that syncs mp3s automatically with my NAS.

    Ok, the issue I’d like to solve: I would like to use the squeezebox also outside my home network. I have seen that there is an Access Point Plugin but I think it is only either or in terms of configuration: When I’m on my local network and forget to activate the Access Point Plugin then leave my home network, I think I cannot switch on the Access Point Plugin anymore as I cannot connect to the raspi then, correct?

    Questions:

    – Is it possible to have a timeout on the home connection (if no „home“ connect within say 60sec, activate AP + „self“ instead)?
    – If not, could I do a similar thing by connecting a separate AP to the LAN interface of the raspi? I have a spare TP-Link MR3020 that I could use. But how would the local LMS / squeezelite player react if I connect my remote through MR3020 -> LAN -> raspi and the main WLAN Edimax EW-7811UAC never finds a network it can connect to? If it finds my „home“ network, everything should be fine of course but that is not the use case. And I think I will not have a „self“ diversion in that case. So so I only miss out in internet radio then or would the local LMS / squeezelite have a bigger problem?

    I don’t want to use the MR3020 for normal WLAN connections to „home“ because the range of the Edimax EW-7811UAC is much better. Otherwise I would have a solution I think: Edimax EW-7811UAC always in AP mode (self only when traveling) and MR3020 to connect to „home“…

    Thanks much!
    mol

    • This topic was modified 7 years, 7 months ago by mol. Reason: typos
    7. September 2016 at 12:14 #22897

    Hello mol,

    Thanks for your request.

    To your first question:

    When I’m on my local network and forget to activate the Access Point Plugin then leave my home network, I think I cannot switch on the Access Point Plugin anymore as I cannot connect to the raspi then, correct?

    Right, this is not possible. If the access point is not activated and you leave your local network you cannot activat it again, only you re-enter your local network.

    Second question:

    – Is it possible to have a timeout on the home connection (if no “home” connect within say 60sec, activate AP + “self” instead)?

    For this, it is possible to write your own script and to integrate it into Max2Play with the Pluginbuilder

    It gives a example which you can use in order to understand. This is the script which is checking that the Wifi / LAN furthermore is connected. It is called autoreconnect_wifi and you can find it in /opt/max2play/start_audioplayer.sh

    With this it is possible to write your own script to start the AP if wifi is not connected. The access point starts with this:

    /var/www/max2play/application/plugins/accesspoint/scripts/install_accesspoint.sh

    For example (it is only a idea):

    #!/bin/bash
    if [ "$(LANG=C && sudo /sbin/ifconfig eth0 | grep 'inet addr:' | wc -l)" -lt "1" -a "$(LANG=C && sudo /sbin/ifconfig wlan0 | grep 'inet addr:' | wc -l)" -lt "1" ]; then
       sudo /var/www/max2play/application/plugins/accesspoint/scripts/install_accesspoint.sh; sudo reboot;
    fi
    

    It is possible to enter in crontab or something like that. Like start_audioplayer.sh script with user: pi and crontab -e

    We are eager about your solution and would be pleased about a few pictures of your solution. With your permission, we would then also publish a blog post on our site and via our social media channels.

    Thanks for your effort.

    8. September 2016 at 17:26 #22935

    Thanks for this Christoph! Will give it a try at some point. For now I realized I have a bigger issue: The rtl8812au driver does not seem to be in the kernel that is used when having the Wolfson card. Compiled a new kernel with support for that chipset but raspi won’t boot from it.
    Hence for now I just use my trusted EW-7811UN in standard mode… When I need an AP outside my network, I either need to remember to switch to AP mode or use an external MIFI that has the same SSID as my Home-Music-WLAN to connect to just to have a WiFi at the BBQ site to connect smartphone and boombox. Works 🙂

    Would be tremendous if the rtl8812au (for EW-7811UAC) could be included into the next Wolfson compatible kernel because that thing has an awesome range.

    • This reply was modified 7 years, 6 months ago by mol.
    9. September 2016 at 13:36 #22950

    Hi

    ich fände diese Funktion prinzippiell sehr nützlich. So könnte man den Pi einfach wahlweise im Heimnetz, oder auf Reisen als Accesspoint betreiben
    Bisher muss an doch anscheinend jedes Mal das Plugin installieren, und Zuhause wieder einstallieren. Bleiben dabei die geachten Einstellungen eigentlich erhalten? Oder muss ich auch jedesmal im Heimnetz erst wieder das Netzwerkkabel anschließen

    15. September 2016 at 13:59 #23039

    Hello std.

    Der Access Point wird erst installiert. Sonst müsste er wieder deinstalliert werden. Diese Idee in der Antwort, war nur ein Vorschlag zum Lösen der Frage von mol.

    The access point will not be installed. Otherwise, he may have to be uninstalled. This idea in response, was only a suggestion to resolve the question of moles.

    Best Regards

    15. September 2016 at 16:36 #23049

    @Christof

    das der AccessPoint installiert werden muss ist lar. Nur wie ich das verstanden habe, vielleicht eine Fehlinterpretation, läuft der dann immer, und der Pi ist somit im WLAN nicht mehr erreichbar
    Also muss ich erst wieder per AccessPoint auf den Pi und diesen deinstallieren.

    Das ginge ja auch noch, die Frage die sich mir hauptsächlich stellt sind meine WLAN-Einstellungen noch erhalten, oder muss ich erst wieder das Lan-Kabel anstöpseln?

    Komfortabler wäre natürlich wenn beim booten des Pi erst nach dem bekannten Netzwerk gesucht wird, und erst wenn das nicht erreichbar ist automatisch der AccessPoint gestartet wird

    10. Oktober 2016 at 11:22 #23332

    @std

    Entschuldige die späte Antwort.

    Du kannst entweder mit dem Gerät, welches mit dem Access Point verbunden ist, auf das Max2Play Browserinterface zugreifen oder wenn du ein LAN-Kabel ansteckst auch mit deinem PC auf das Max2Play Gerät zugreifen und den Access Point deaktiveren und bearbieten.

    Die WLAN-Einstellungen bleiben soweit erhalten, da diese in einem separaten Menü gespeichert werden. Deaktivierst du den Access Point verbindet sich dein Gerät wieder wie gewohnt mit deinem Router.

    Beste Grüße

    —————————————————–

    Sorry for the late reply.

    You can either access the Max2Play browser interface with the connected device or if you connect a LAN cable to the Max2Play device with your PC to disable or control the access point.

    The WLAN settings are saved in a separate menu. If you deactivate the access point your device connects again as usual with your router.

    Best Regards

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Register here