Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 29
  1. #11
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,352
    net-bridge kernel module extensions have been updated with missing dependencies.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  2. #12
    Senior Member
    Join Date
    Apr 2008
    Location
    France
    Posts
    2,272
    Quote Originally Posted by paul- View Post
    net-bridge kernel module extensions have been updated with missing dependencies.
    Thanks for that!
    Should be working (I'm not in front of the machine) but looks like it went away again from my network when I applied settings.

    [STRIKETHROUGH]
    I am puzzled by the fact the bridge uses the static IP address field. I would expect the bridge to try and acquire an address via DHCP, since Ethernet is connected to the LAN.

    Or could it be that this bridge mode is intended to create an Ethernet segment on an isolated network? Like to connect a non-wireless SB to the Pi?
    [/STRIKETHROUGH]

    No the player didn't leave the network, and the bridge still has the IP the ethernet interface used. However the wlan0 interface is not found, there is nothing in the bridge but eth0.
    I think my pCP is up-to-date, since the bridge interface looks to be ok.

    EDIT 2.
    Uninstalled AP mode, reboot, update PCP, reboot, reinstall AP mode.
    Now the wireless interface is there, but it isn't in the bridge.
    Code:
    root@carmel:/home/tc# grep bridge /usr/local/etc/pcp/hostapd.conf
    root@carmel:/home/tc# grep interface /usr/local/etc/pcp/hostapd.conf
    # interface used by access point
    interface=wlan0
    ctrl_interface=/var/run/hostapd
    ctrl_interface_group=0
    Perhaps a defect in pcp-apmode?

    EDIT3. set_hostapd_conf() in /tmp/tcloop/pcp-7.0.0-www/var/www/cgi-bin wifi_apmode.cgi rather? Seems to fail to add/remove the bridge=br0 stanza according to the value of $AP_BRIDGE (1=bridge, *=no bridge).
    Last edited by epoch1970; 2021-04-24 at 09:07.
    2 SB 3 • 1 PCP 7 • Libratone Loop, Zipp, Zipp Mini • iPeng (iPhone + iPad) • LMS 8.1 (docker) with plugins: CD Player, WaveInput by bpa • Material Skin by Craig Drummond • IRBlaster by Gwendesign (Felix) • Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger • PowerSave by Jason Holtzapple • Song Info, Song Lyrics by Erland Isaksson • BBC Sounds by Stuart McLean • AirPlay Bridge by philippe_44 • Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins.

  3. #13
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,352
    Its been forever since I did a full test on that feature. I'll have to check it out.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  4. #14
    Senior Member
    Join Date
    Apr 2008
    Location
    France
    Posts
    2,272
    Crap. vi says 'wifi_apmode.cgi' is read only and I don't know how to set /tmp/tcloop/pcp-7.0.0-www in RW mode. A remount doesn't do it.

    Anyways.
    /usr/local/etc/pcp/hostapd.conf
    Needs to be modified with
    Code:
    #bridge=
    (for sed to succeed in the cgi)

    wifi_apmode.cgi
    needs to be modified with an addition starting near line 86 in set_hostapd_conf(), something like that
    Code:
    case $AP_BRIDGE in
      0) # Comment any bridge= stanza
          sudo sed -i "s/\(^bridge=\).*/#\1/" $HOSTAPDCONF
          echo '[ INFO ] AP will not be bridged to ethernet'
      ;;
      1) # Enable bridging
          sudo sed -i "s/^#\(bridge=\).*/\1br0/" $HOSTAPDCONF
          echo '[ INFO ] AP will be bridged to ethernet'
      ;;   
    esac
    Untested, as you will understand.


    When that works, I think I will reconsider having an AP on my desk and use the pCP machine as my local AP. Neat.

    Thanks for pCP, as always.
    Last edited by epoch1970; 2021-04-24 at 09:41.
    2 SB 3 • 1 PCP 7 • Libratone Loop, Zipp, Zipp Mini • iPeng (iPhone + iPad) • LMS 8.1 (docker) with plugins: CD Player, WaveInput by bpa • Material Skin by Craig Drummond • IRBlaster by Gwendesign (Felix) • Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger • PowerSave by Jason Holtzapple • Song Info, Song Lyrics by Erland Isaksson • BBC Sounds by Stuart McLean • AirPlay Bridge by philippe_44 • Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins.

  5. #15
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,352
    I just tested, and it's working as designed (obviously with the updated kernel modules) It was intended to bridge eth0 to wlan0, where the eth0 is the upstream connection to your main network. I'm browsing the internet from my cell phone connected to the wifi AP created by pCP, and my phone has a DHCP address assigned by my primary network DHCP server.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  6. #16
    Senior Member
    Join Date
    Apr 2008
    Location
    France
    Posts
    2,272
    Quote Originally Posted by paul- View Post
    I just tested, and it's working as designed (obviously with the updated kernel modules) It was intended to bridge eth0 to wlan0, where the eth0 is the upstream connection to your main network. I'm browsing the internet from my cell phone connected to the wifi AP created by pCP, and my phone has a DHCP address assigned by my primary network DHCP server.
    I updated (minor, patch) and rebooted. I'm running 7.0.1, regular kernel flavor.
    It doesn't work for me, the "bridged" access point does not deliver an IP address. Which I can understand if the same code as I've seen yesterday is running the show.
    To make the running AP actually work, I have to:
    - ssh in the machine (bridge with eth0 in it are ok)
    - sudo vi /usr/local/etc/pcp/hostapd.conf, add line "bridge=br0", save
    - Stop and start the AP from the GUI.

    It doesn't work because brctl show indicates the wireless interface is not bridged. This is because the option is missing from hostapd.conf as generated by the cgi script. (at least that was the cause yesterday)
    And it starts working as soon as the bridge option is added to hostapd, and the process restarted so that it re-reads the configuration.

    I stand by my guns.
    2 SB 3 • 1 PCP 7 • Libratone Loop, Zipp, Zipp Mini • iPeng (iPhone + iPad) • LMS 8.1 (docker) with plugins: CD Player, WaveInput by bpa • Material Skin by Craig Drummond • IRBlaster by Gwendesign (Felix) • Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger • PowerSave by Jason Holtzapple • Song Info, Song Lyrics by Erland Isaksson • BBC Sounds by Stuart McLean • AirPlay Bridge by philippe_44 • Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins.

  7. #17
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,352
    Brctl is creating the bridge. Hostapd does care or need to know it’s in a bridge, the kernel handles it.

    The cgi doesn’t do the work, it’s done in shell scripts.
    Code:
    brctl addbr br0
    brctl addif br0 eth0 wlan0
    So for some reason your system is failing during bridge creation. What rpi board are you using? What WiFi chip are you using?
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  8. #18
    Senior Member
    Join Date
    Apr 2008
    Location
    France
    Posts
    2,272
    Quote Originally Posted by paul- View Post
    Brctl is creating the bridge. Hostapd does care or need to know it's in a bridge, the kernel handles it.

    The cgi doesn't do the work, it's done in shell scripts.
    Code:
    brctl addbr br0
    brctl addif br0 eth0 wlan0
    So for some reason your system is failing during bridge creation. What rpi board are you using? What WiFi chip are you using?
    Brctl creates the bridge. This part is correct. That work on my machine, too.
    Hostapd does care or need to know it's in a bridge , the kernel handles it. This is wrong, twice.
    1 - The kernel has about nothing to do with all this.
    2 - Bridging a wireless interface in client mode is not possible as per WiFi specs. The default mode of a WiFi interface is client. Hostapd turns the interface to AP mode, and after that can take care of bridging it. It is the proper way of doing things.
    The cgi doesn't do the work, it's done in shell scripts. This is irrelevant, and hopefully untrue. My eyes tell me the cgi creates the hostapd config file, and that's where the beef is. If some code, in pcp-apmode I assume, did what you pretend, that would be unfortunate since the code would only work in case hostapd has finished turning the interface to AP mode; that code would be racy and brittle. But fortunately, that's not how pcp-apmode is written. It eschews bridging wlan0. And that job has to be done by hostapd.
    So for some reason your system is failing during bridge creation. It is not. The bridge is created and eth0 is in it. Only wlan0 is not in it. Hostapd runs but no IP is delivered to clients. For the third time, the solution is to handle hostapd option bridge= in the cgi.
    What rpi board are you using? What WiFi chip are you using? Pi 3B with built in wireless interface. Works fine once the interface is added to the bridge...
    Last edited by epoch1970; 2021-04-25 at 05:51. Reason: Formatting
    2 SB 3 • 1 PCP 7 • Libratone Loop, Zipp, Zipp Mini • iPeng (iPhone + iPad) • LMS 8.1 (docker) with plugins: CD Player, WaveInput by bpa • Material Skin by Craig Drummond • IRBlaster by Gwendesign (Felix) • Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger • PowerSave by Jason Holtzapple • Song Info, Song Lyrics by Erland Isaksson • BBC Sounds by Stuart McLean • AirPlay Bridge by philippe_44 • Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins.

  9. #19
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,352
    I love the use of the word "wrong". I know you to tinker around with enough stuff to know that there are more than one way to tackle a task. The hostapd documentation clearly states that it "can" be used. That does not mean it has to be used, and it for sure does not mean that hostapd has to manage the bridge.

    But Looking a the scripting, I will agree that there could have been a race condition in the startup of hostapd and configuring the bridge. But I'm going to solve that with and easier update route for me. I've updated the extension. Just press the update button on the APMode web page.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  10. #20
    Senior Member
    Join Date
    Apr 2008
    Location
    France
    Posts
    2,272
    Well thank you for the update, indeed it works for me now. That's great.

    There is at least one advantage to bridging in the script, the AP could be run by wpa-supplicant and not hostapd. Wpa-supplicant doesn't bridge the interface for you, AFAIK.
    Code:
    network={
        mode=2
        ssid="TestAccessPoint"
        key_mgmt=WPA-PSK
        proto=RSN
        group=CCMP TKIP
        psk="password"
        frequency=2437
    }
    FYI, I had to reboot twice during the process:
    - After download/install: unable to configure a channel until rebooted. Wireless firmware not loaded, I guess.
    - After first config/start: the mDNS IP advertisement was, shall I say, not right. The machine advertised 10.10.10.1 (the AP's address in case it is not bridged). Looks benign but if you're like me and use "http://hostname.local" to reach the GUI, the GUI freezes at some point. A reboot fixes the advertisement to the correct address.

    I think I'll get rid of my hardware AP now. Thanks again.
    2 SB 3 • 1 PCP 7 • Libratone Loop, Zipp, Zipp Mini • iPeng (iPhone + iPad) • LMS 8.1 (docker) with plugins: CD Player, WaveInput by bpa • Material Skin by Craig Drummond • IRBlaster by Gwendesign (Felix) • Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger • PowerSave by Jason Holtzapple • Song Info, Song Lyrics by Erland Isaksson • BBC Sounds by Stuart McLean • AirPlay Bridge by philippe_44 • Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins.

Posting Permissions

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