Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1

    PiCoreplayer WAP standalone or shift wifi access on the fly

    Hi here, long time no see.

    Recently i rebuild my old Henry Kloss fm radio, hosting a Pi with piCoreplayer for use in kitchen connected to wifi/lms, and with shairport enabled... So far so good, this is working as expected / perfect

    In a month i have to travel/charter with some friend, and i would like to take my Kloss with me in my luggage, so that we can listen to music through the hotel's wifi or whatever, could be very cool.

    So i tried to enable the buildin WAP, and while this is working as expected it's not the right solution, because i then have to use my phones 4G/3G connection to stream with e.g. shairport (Iphone).

    I could ofcause try to connect to piCoreplayer through 10.10.10.1, and enable wifi. But if this goes wrong somehow it's a 1. shot try, i have no possiblilty to take the SD-card and make changes there, because i will let my pc stay at home ...

    Is it possible, or did anyone try to make some kind of list, where piCoreplayer pick wifi one by one, until connection success ? - So if i fail connecting to some wifi, piCoreplayer will pick the next one on list!

    I have some experiance with Tinycore, and scripting, so some programming would be possible, if i am lead into the right direction.

    Hope i did explain good enough...

    Best regards; Jesper.

  2. #2
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    1,719
    hi Jesperlykke,

    Starting with pCP4.0.0 you can maintain wpa_supplicant.conf manually.

    I have not tried this, but I think you can have numerous wifi networks defined. That's a start!

    regards
    Greg

  3. #3
    Quote Originally Posted by Greg Erskine View Post
    hi Jesperlykke,

    Starting with pCP4.0.0 you can maintain wpa_supplicant.conf manually.

    I have not tried this, but I think you can have numerous wifi networks defined. That's a start!

    regards
    Greg
    Greg... I will try... let's see how it goes...

    If success, maybe i can make the Pi choose like this :

    1. attemp : my home wifi
    2. attemp : some hotel wifi
    3. attemp : some more hotel wifi
    ..
    4. attemp : make WAP connection, so configuration through 10.10.10.1 is possible (this must be the tricky part, as Pcp must be scripted to choose this with some working configuration when all real wifi fails)

    RG; Jesper.

  4. #4
    Senior Member M-H's Avatar
    Join Date
    Oct 2016
    Posts
    117

    multiple nics?

    Hi Jesperlykke , Hi Greg,

    not trying to steal the thread;
    But what about multiple WiFi nics?
    Would it be possible to use 2 or more WiFi nics to setup a Wireless AP regardless of the connection to a wifi network?
    This might help me too with my portable PCP4 boombox.

    Regards M-H
    Pi based multi-room audio system powered by PiCorePlayer(s):
    Pi3B with Phat-dac in a Rasptouch, 2 pi B+ with Cirrus Logic Audio Card, Pi Zero with Phat-beat , and a few other tests...

  5. #5
    Junior Member
    Join Date
    Nov 2019
    Posts
    9
    Hi!
    Sorry to resurrect this old thread, but it is pretty much the same issue I'm dealing with.

    I have a mobile setup of a squeezebox standalone server.
    It is providing a wifi access point.
    The intention is to use the pcp client with the mobile server occasionally, but also use the local server on regular basis.

    I entered this into the wpa_supplicant.conf

    Code:
    network={
            ssid="Network1"
            psk="password1"
            key_mgmt=WPA-PSK
            auth_alg=OPEN
                    priority=2
    }
    network={
            ssid="Network2"
            psk="password2"
            key_mgmt=WPA-PSK
            auth_alg=OPEN
                    priority=1
    }
    network={
            ssid="Network3"
            psk="password3"
            key_mgmt=WPA-PSK
            auth_alg=OPEN
                    priority=3
    }
    It seems the priority=1 is ignored.
    Instead Network1 (priority=2) is picked.
    Here's the log.

    Code:
    Starting piCorePlayer setup...
    Loading pCP function files and pCP configuration file...Done.
    Checking for boot codes on mmcblk0p1...
      Trying to mount /dev/mmcblk0p1.
    Checking for ssh...found, ssh will start.
    Checking for netusb...  newpcp.cfg not found on mmcblk0p1.
    Setting piCorePlayer repository...Done.
    Generating drop-down list...Done.
    Starting wifi...
    Starting WiFi on wlan0...
    udhcpc: started, v1.30.1
    udhcpc: sending discover
    udhcpc: sending discover
    udhcpc: sending select for 192.168.178.70
    udhcpc: lease of 192.168.178.70 obtained, lease time 864000
    deleting routers
    route: SIOCDELRT: No such process
    adding dns 192.168.178.5
    Done.
    Any advice is very appreciated!

    Edit:
    Of course, when deleting Network1 from the config, Network2 (mobile AP) will be connected.
    Both Networks work, but the "priority" is not respected at start-up.
    Last edited by H34dl3ss; 2019-11-25 at 14:01.

  6. #6
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,359
    The documentation is far from clear on that.....but it sure looks like the bigger the number the more priority it has

    https://w1.fi/cgit/hostap/plain/wpa_...upplicant.conf

    wpa_supplicant makes all the decisions. pCP does not have any interactions here.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  7. #7
    Junior Member
    Join Date
    Nov 2019
    Posts
    9
    Well, that pretty much nailed it!
    Turned the numbers around and everything works as intended!

    Thanks for the qualified and swift response!

    Next task will be some kind of "reconnect" feature to avoid a reboot in case the client looses wifi connection.
    But that's worth another thread if I can't find instructions elsewhere.

  8. #8
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,359
    wpa_supplicant should happily reconnect when an SSID is in range. I have a old model A running wifi, and it has been up for over 4 years.. It has a LiPO backup battery, but the wifi router goes down pretty quick after a power outtage.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  9. #9
    Junior Member
    Join Date
    Nov 2019
    Posts
    9
    Hmmmm…
    I shut down the mobile AP unintentionally before shutting down the client.
    Then I fired up the AP again to shut down the client and wasn't able to connect to the client.

    I suppose the client must have connected to the next available, low priority net if it is like you say.
    Then it is probably locked onto that net until the next "reconnect" is necessary, right?
    Will check that later.
    Last edited by H34dl3ss; 2019-11-26 at 05:09.

  10. #10
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,359
    That would probably be a fair assessment, but I've never played with that.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •