sle118 / squeezelite-esp32

ESP32 Music streaming based on Squeezelite, with support for multi-room sync, AirPlay, Bluetooth, Hardware buttons, display and more
1.07k stars 100 forks source link

Does Cspot comes with /handles different WiFi capabilities? #391

Closed bungh0l10 closed 4 months ago

bungh0l10 commented 5 months ago

Describe the bug

I'm running a somewhat WiFi router through a rpi5 running LMS upon having a LTE USB dongle attached and an ALFA AWUS036ACH WifFi antenna to spread signal. Bus 001 Device 002: ID 0bda:8812 Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac 2T2R DB WLAN Adapter As lacking an inbuild kernel driver, I'm using the one from here https://github.com/morrownr/8812au-20210629 . So... while the squeezeamp using LMS and cspot work well with standard settings (144MBs) in hostapd.conf

country_code=DE bridge=br0 interface=wlan0 driver=nl80211 ssid=XXXXXXXX hw_mode=g channel=1 macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 ieee80211n=1 ht_capab=[SHORT-GI-20][DSSS_CCK-40][TX-STBC-2BY1][RX-STBC-1][MAX-AMSDU-7935] ieee80211d=1 wmm_enabled=1 wpa=2 wpa_passphrase=XXXXXXXXXXX wpa_key_mgmt=WPA-PSK rsn_pairwise=CCMP

I am encountering only stutter using Cspot after enabling 300MBs ht_capab=[HT40+][HT40-][SHORT-GI-20][SHORT-GI-40][RX-STBC-1][MAX-AMSDU-7935] Playing Music through LMS on the other hand works flawlessly, without any stutter and also using the spotty plugin from Michael doesn't stutter as well.

Telnet unfortuately doesn't output anything on this stutter, only the usual informations you see while playing a song through cspot :( As I know this might be an edgecase for sure I still wanted to mention i,t as it wonders me why only cpsot might suffer from increased bandwith.

Cheers

Preliminary Information

  1. Firmware Version: 1670
  2. Plugin Version: 0.600
  3. LMS: latest 8.4

    Hardware Details

Please describe your hardware setup:

bungh0l10 commented 5 months ago

image

has been tested with 3 😅

sle118 commented 5 months ago

Thinking that you might be hitting some incompatibilities on the WiFi PHY layer in which case there isn't much we could do since wifi is provided by the esp-idf. Not sure if that could help, but I'm currently refactoring the platform and compiling against esp-idf 4.4.6. the jump requires a full reflash, though, and I would need to test a squeezeamp build first, but let me know if you are willing to try

bungh0l10 commented 5 months ago

Sure I'd like to give it a try.

bungh0l10 commented 4 months ago

Hi,

I just wanted to give an update from my end. I was able to manage driver/hostapd settings which were responsible for the stutter. I'm very sorry for any inconvenience or taken effort my intake might have caused.

To anyone who might end up here through google search etc., looking for appropriate settings for 2.4 GHz using RTL8812AU / ALFA AWUS036ACH USB-WifFi antenna here you go:

/etc/modprobe.d/8812au.conf

options 8812au rtw_switch_usb_mode=1 rtw_led_ctrl=0 rtw_country_code=XX
   
Where to replace XX with your regarding country code, see http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
/etc/hostapd/hostapd.conf

ht_capab=[SHORT-GI-20][SHORT-GI-40][TX-STBC-1][RX-STBC-1][HT20][DSSS_CCK-40][MAX-AMSDU-7935]