Coder Social home page Coder Social logo

Comments (17)

simps100 avatar simps100 commented on July 17, 2024 5

Did anyone get chance to test this out? Device works fairly well but any improvement on latency particularly phone calls would be most welcome!

from wireless-carplay-dongle-reverse-engineering.

CiNcH83 avatar CiNcH83 commented on July 17, 2024 1

Security is also that we should be able to modify by using WPA2-AES instead of WPA.

The given configuration supports both, WPA(TKIP) and WPA2(CCMP-AES). All CarPlay enabled iPhones connect with WPA2. So it may be safe to disable WPA altogether.

Not yet, I am still testing a few more things to try and figure out what causes the intermittent audio breakouts before I change these.

Since screen and control data have higher priority with WMM enabled (for better touchscreen reaction times), media audio may starve a bit. So you may have to increase Media Delay in the adapter's settings:
grafik

1000ms is the default. You may try 1500ms. I actually hoped that the higher transfer speeds of 802.11ac would compensate for the higher priority touchscreen data.

(Also making phone calls benefits from WMM. So there may be less delay.)

Another possible enhancement... uapsd_advertisement_enabled=1 may help reducing the iPhone's power consumption during a CarPlay session. It is recommended by Apple to be enabled.

from wireless-carplay-dongle-reverse-engineering.

dmavromatis avatar dmavromatis commented on July 17, 2024 1

Yup -- looks good to me... however @CiNcH83 & @hassankhan, I can try it out on my dev Carlinkit 2 dongle running latest CFW if you'd like.

from wireless-carplay-dongle-reverse-engineering.

dmavromatis avatar dmavromatis commented on July 17, 2024

Nice -- do you have any before and after results to share? E.g. any noticeable improvements?

from wireless-carplay-dongle-reverse-engineering.

edominicci avatar edominicci commented on July 17, 2024

Not yet, I am still testing a few more things to try and figure out what causes the intermittent audio breakouts before I change these.

It could be related, but I am not entirely convinced that this is the root cause.

from wireless-carplay-dongle-reverse-engineering.

CiNcH83 avatar CiNcH83 commented on July 17, 2024

What's the original hostapd.conf? I still believe the USB to be the bottleneck in terms of bandwidth...

from wireless-carplay-dongle-reverse-engineering.

CiNcH83 avatar CiNcH83 commented on July 17, 2024

OK, found original hostapd.conf:

# Basic configuration

interface=wlan0
ssid=AutoBox-582f
#bridge=br0

# WPA and WPA2 configuration

macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

#device_type=6-0050F204-1
# Hardware configuration

#wmm_enabled=1
#wmm_ac_bk_cwmin=4
#wmm_ac_bk_cwmax=10
#wmm_ac_bk_aifs=7
#wmm_ac_bk_txop_limit=0
#wmm_ac_bk_acm=0
#wmm_ac_be_aifs=3
#wmm_ac_be_cwmin=4
#wmm_ac_be_cwmax=10
#wmm_ac_be_txop_limit=0
#wmm_ac_be_acm=0
#wmm_ac_vi_aifs=2
#wmm_ac_vi_cwmin=3
#wmm_ac_vi_cwmax=4
#wmm_ac_vi_txop_limit=94
#wmm_ac_vi_acm=0
#wmm_ac_vo_aifs=2
#wmm_ac_vo_cwmin=2
#wmm_ac_vo_cwmax=3
#wmm_ac_vo_txop_limit=47
#wmm_ac_vo_acm=0

driver=rtl871xdrv
ieee80211n=1
#ieee80211ac=1
#hw_mode=g
#channel=1
hw_mode=a
channel=36
#require_ht=1
beacon_int=100
dtim_period=1

#ht_capab=[HT40+]
ht_capab=[SHORT-GI-20][SHORT-GI-40][HT40+]
device_name=RTL8822BS
#device_name=RTL8188EU
manufacturer=Realtek

from wireless-carplay-dongle-reverse-engineering.

CiNcH83 avatar CiNcH83 commented on July 17, 2024

Just some additional info on 802.11n vs. 802.11ac. On the Carlinkit/CPLAY2air dongles, we have a 2x2 antenna configuration. On 40MHz wide channels, this means up to 300mbps on N and 400mbps on AC (net speed is around half of that). For 80MHz wide channels, vht_capab has to be set.

from wireless-carplay-dongle-reverse-engineering.

dmavromatis avatar dmavromatis commented on July 17, 2024

Have you tested these changes on the device yet? I'm willing to do it on a dev dongle I have, but want to make sure it doesn't brick the unit due to WiFi not working after making the modifications.

from wireless-carplay-dongle-reverse-engineering.

CiNcH83 avatar CiNcH83 commented on July 17, 2024

I am not on a custom FW. I am just familiar with Wi-Fi and hostapd.

Replacing hostapd.conf shouldn't be much of a problem though when using custom FW. It can be done via USB stick and U2W.sh. If the config doesn't work, the original hostapd.conf can be restored.

from wireless-carplay-dongle-reverse-engineering.

hassankhan avatar hassankhan commented on July 17, 2024

@CiNcH83 can you look over the following and check if it looks good to you? Just want to make sure I'm not missing anything from the discussion above 😀

# Basic configuration

interface=wlan0
ssid=AutoBox-582f
#bridge=br0

# WPA and WPA2 configuration

macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

#device_type=6-0050F204-1
# Hardware configuration

# https://github.com/ludwig-v/wireless-carplay-dongle-reverse-engineering/issues/54#issue-857282109

driver=rtl871xdrv
ieee80211ac=1
channel=36
hw_mode=a
channel=36
#require_ht=1
beacon_int=100
dtim_period=1

wmm_enabled=1
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0

#ht_capab=[HT40+]
ht_capab=[SHORT-GI-20][SHORT-GI-40][HT40+]
device_name=RTL8822BS
#device_name=RTL8188EU
manufacturer=Realtek

# https://github.com/ludwig-v/wireless-carplay-dongle-reverse-engineering/issues/54#issuecomment-831874170

uapsd_advertisement_enabled=1

from wireless-carplay-dongle-reverse-engineering.

CiNcH83 avatar CiNcH83 commented on July 17, 2024

@CiNcH83 can you look over the following and check if it looks good to you?

Here are some changes and additions from my side:

# WPA2 only
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=12345678
rsn_pairwise=CCMP

# VHT80
vht_capab=[SHORT-GI-80]
vht_oper_chwidth=1

The channel is twice in your config.

from wireless-carplay-dongle-reverse-engineering.

CiNcH83 avatar CiNcH83 commented on July 17, 2024

It looks like Realtek isn't really a good choice for a Linux AP, see here. hostapd-rtl871xdrv seems to be really old sh** which probably doesn't allow for AC/VHT. That's probably why Carlinkit is considering switching to Broadcom. There are however also newer nl80211 based drivers around for RTL8822BS.

from wireless-carplay-dongle-reverse-engineering.

hassankhan avatar hassankhan commented on July 17, 2024

@dmavromatis Awesome, please do post back if it works, definitely would be interesting if there is a noticeable improvement.

from wireless-carplay-dongle-reverse-engineering.

CiNcH83 avatar CiNcH83 commented on July 17, 2024

I just realized that they are trying to enable 802.11ac and WMM for BCM4354 based models:

# Basic configuration

interface=wlan0
ssid=AutoBox-582f

# WPA and WPA2 configuration

macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

driver=nl80211
ieee80211n=1
ieee80211ac=1
wmm_enabled=1
#hw_mode=g
#channel=11
hw_mode=a
channel=36
require_ht=1
require_vht=1

#ht_capab=[SHORT-GI-20]
#ht_capab=[SHORT-GI-20][SHORT-GI-40][HT40+]
#ht_capab=[SHORT-GI-20][SHORT-GI-40][HT40-]
#vht_capab=[SHORT-GI-80][SHORT-GI-160]

So they might be abandoning Realtek because of the bad Linux soft AP driver.

from wireless-carplay-dongle-reverse-engineering.

Ar4erR07 avatar Ar4erR07 commented on July 17, 2024

Seems hostapd compiled without AC support:
random: Trying to read entropy from /dev/random Configuration file: /mnt/UPAN/hostapdORIMOD.conf Line 64: unknown configuration item 'ieee80211ac' Line 70: unknown configuration item 'vht_capab' Line 71: unknown configuration item 'vht_oper_chwidth' 3 errors found in configuration file '/mnt/UPAN/hostapdORIMOD.conf'

from wireless-carplay-dongle-reverse-engineering.

dmi97 avatar dmi97 commented on July 17, 2024

Replacing hostapd.conf shouldn't be much of a problem though when using custom FW. It can be done via USB stick and U2W.sh. If the config doesn't work, the original hostapd.conf can be restored.

Can it be replaced when using the original firmware? I have a Carlinkit A2A (AndroidAuto) dongle and I need to change the default 5Ghz wifi channel because at channel 36 I get occasional stuttering especially in highly populated areas. Carlinkit support also confirmed that's the issue but their way of changing the wifi channel did not work.

They told me to flash the firmware with a file named default_wifi_channel and the channel number inside, but that doesn't work the device gets flashed but the channel stays at 36.

So I am trying to unpack the img file to change this setting directly on the firmware. But can't figure out how, the img file cannot be mounted or extracted, it shows a "corrputed file" error. What am I missing?
O2W_AUTOKIT_Update.zip

from wireless-carplay-dongle-reverse-engineering.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.