I’m currently using the Khadas VIM1 as a BLE gateway device running a custom AOSP build. My goal is to simultaneously connect and communicate with multiple BLE peripheral devices (wearable pendants) for audio streaming and control.
When testing BLE advertising with my custom app, I found the system log shows:
mNumOfAdvertisementInstancesSupported = 1
Because of this, startAdvertising() fails with “Too many advertisers” even if only one custom app is running.
Questions:
Does the AP6212 Bluetooth chip on VIM1 support multiple BLE advertising instances?
Is there a way to increase this instance count via firmware, driver modification, or kernel tuning?
Is it possible to disable the system Bluetooth stack (com.android.bluetooth) and take full control with a custom implementation?
Khadas Official Android Image
Does the official Android image from Khadas (via firmware download) support:
BLE advertising?
BLE GATT server?
Wi-Fi configuration via app (WifiManager)?
I2S interface for audio output?
I’m trying to decide whether I should stick with the official image or fully build AOSP from scratch.
I need to ensure that I can advertise to (and handle) multiple BLE devices simultaneously for commercial use. Any tips or confirmed limitations are appreciated.
Q:Does the AP6212 Bluetooth chip on VIM1 support multiple BLE advertising instances?
Q:Is there a way to increase this instance count via firmware, driver modification, or kernel tuning?
A:AP6212 Bluetooth chip on VIM1 support multiple BLE advertising instances,count up to 5。
Is it possible to disable the system Bluetooth stack (com.android.bluetooth) and take full control with a custom implementation?
A:At present, we do not support it.
Q:BLE advertising
Q:BLE GATT server
A:The officially released firmware is not supported. A patch needs to be applied. VIM1_BLE_ADVERTISER_SUPPORT.rar (1.3 KB)
Q:Wi-Fi configuration via app。
A:Yes But you need to use the system signature file to sign the application.
Just to confirm, does this mean that with the official image, it is possible to support up to 5 BLE advertising instances and also control I2S audio output?
When you mentioned applying the patch, did you mean applying it directly to the prebuilt image (update.img) from dl.khadas.com - Index of /products/vim1/firmware/android/pie/, or did you mean downloading the Android source code, applying the patch there, and then building a new image?
Also, just to clarify, when you say “official image,” are you referring to the update.img, or to the AOSP source code provided for building the image?
@sonpet ,
Q:When you mentioned applying the patch, did you mean applying it directly to the prebuilt image (update.img) from dl.khadas.com - Index of /products/vim1/firmware/android/pie/, or did you mean downloading the Android source code, applying the patch there, and then building a new image?
A:Apply it directly to the prebuilt image (update.img) from dl.khadas.com.
Could you please clarify how exactly we should apply the patch to the prebuilt update.img?
Do you provide a new update.img file that already includes the patch, or is there a specific method to modify the existing binary image ourselves?
Thank you for your reply.
The links you provided seem to indicate that we should download the Android source code and apply the patch there.
However, you previously mentioned that we could apply it directly to the prebuilt update.img.
Could you please clarify if you mean that we should download the source code, apply the patch, and then build a new update.img ourselves?
@sonpet ,
Q: Could you please clarify if you mean that we should download the source code, apply the patch, and then build a new update.img ourselves?
A:Yes
“The VIM1_BLE_ADVERTISER_SUPPORT.rar (1.3KB) patch you sent does not seem to work on Android 9.0 Pie. Is it incompatible with this version? Can I manually modify the code according to the patch content?”
Yes, the Khadas VIM1’s AP6212 Bluetooth chip supports multiple BLE advertising instances. According to Khadas, the AP6212 can handle up to 5 concurrent BLE advertising instances.
I’m currently using Android 9 (Pie), and although I manually modified the system files according to the contents of the patch you provided, it’s still not working. It still shows that only 1 advertising instance is supported.
What should I do in this case?
Would it work if I switch to Android 7 as you mentioned?