Help - How to - BLE - realtek device - kernel 4.x vs 5.x

I lack both high and low level understanding of this.

Kernel 5.x appears btusb.c has been modified to support listed devices and btrtl.c/h have functions for same. openwrt does not support my BLE device, specifically rtl8761b.
If there is a way to force rtl8xxxu to recognize PID/VID and associate, will the BLE functions work?

Problem 1, I would like to patch 4.x kernel with these files. I do not know the process.
I have WSL running with gl imagemaker but everything is ipk. Where is process documented for me to learn and make custom firmware image?

Problem 2, where in gl image do I find the source code for BLE? I dont know where it lives in source tree? Please help. I see gl-ble-sdk/api packages that I can load, but it looks like only supports silabs chips. Do I need to mod this package instead?

Lack of understanding problem 3, are these dongles/bt devices simply communicating through a usb virtual serial port? and if so, besides enabling device & setting bits on or off, can all the BLE be performed within a single 'c' file? How would I get that c file compiled to ipk file for openWRT?

Thank you anyone in advance who helps me to understand big picture and small details.

I have MT300 units, and want to run BLE operations using dongles. I have realtek rtl8761b dongle and silabs thunderboards.

w/kind regards,

If you want to modify the kernel in any way, you'll need to compile OpenWrt from scratch. See the section "Using the toolchain" on

Thanks, I have imagebuilder running, still lost in the maze. Spinning head, billions of questions, no tutorial!

No, imagebuilder isn't the same thing. Imagebuilder doesn't recompile the kernel or the toolchain, which is why I said that you need to compile OpenWrt from scratch.

Big picture question, is openWRT going to upgrade to 5.x kernel or is there some obvious reason why not?

OpenWrt has already been using 5.x for a while now.

Then I dont understand why btusb/btrtl files not present in openwrt kernel. These are in other linux kernels. All I see is rtl8xxxu as staging like driver with only a few VID/PIDs. ??

Ok, is there docker image for this somewhere?

Did you actually check what version of the 5.x - series those files were introduced? Kernel 5.4, for example, and 5.10 are not the same version and 5.10 can contain new files that weren't yet in 5.4.

I would hazard a guess that you only looked at the major version number, completely ignoring the minor one. I can see both btusb.c and btrtl.c/btrtl.h in 5.10 in the OpenWrt sources.

No idea, I don't use Docker.

Sounds like you are using some vendor SDK.