-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WiFi flash and ram memory consumption way too high #212
Comments
It's a dead repo with a dead product. If at least, BouffaloLab could give a good documentation. |
A few days ago I have actually started to migrate my retro FPGA support MCU for the MiSTeryNano to the Pi Pico. I'll continue to support the BL616 but there will be the option to use the rp2040 and probably also the esp32-s2/3. All of these have inferior USB host capabilities and I really like the bl616 ... but the SDK definitely is a problem. Too bad ... |
Yes, for sure. Seems that BLab has abandoned BL616/618 because they are missing on products BLab page. I'm waiting for esp32-p4 that will have great peripherals, I hope that price can be affordable. |
@WGR7 BL618/BL616 is still maintained by Bouffalo, together with BL70X/BL70XL. |
@gamelaster maybe it's true, but doesn't matter because there's no updates on SDK and support is dead. |
@WGR7 about updates on SDK, yes, those are bit slow recently, but it should be updated in some near time. |
The problem is not the low update frequency. The problem is the SDK itself. E.g. major parts of WiFi and Bluetooth are inside closed source libraries:
These contain not only the basic RF functions but major parts of the protocol stacks and even parts of demo applications. According the the bl616 datasheet, it e.g. supports classic bluetooth. I was delighted and expected to be able to add bluetooth HID support to my retro FPGA project to use wireless bluetooth controllers with it. In reality there is one demo that implements audio parts for classic bluetooth. But that needs one specific version of the libraries which in turn lacks other aspects i needed. And since this is all closed source you cannot debug it or even dig through the source code to understand how to use it. The device seems great and the highspeed USB host is a great thing. But it's nearly impossible to implement complex projects that are not directly covered by the examples. |
@harbaum this is sadly true, BT/BLE and WiFi is indeed too much packed into blobs for some reason, unnecessary. Also, BL618 doesn't explain all the information about clock and power trees. Previous generation of chips (BL60X and BL70X) were better in this. To other side, BL61X and BL808 were kinda rushed... |
In fact, partial source code from Sophgo can be used (for example: https://github.com/sophgo/cvi_alios_open/blob/master/components/ble_host/bt_host/host/a2dp.c )To replace libbtprofile.a, HID may be implemented. And through this method, I have already implemented LDAC decoding on AI think m61 |
To me it seems more like these chips were made for a specific customer with a specific use case (in this case maybe some bluetooth audio application). This has then been implemented by combining all kinds of existing open source solutions. And it looks like this happened in a rush and rather than cleanly integrating different projects they were tightly mixed and modified until the use case was covered. The resulting SDK now consists of lots of components that rely on each other for no apparent reason. This also explains those different closed source bluetooth libs. They also cover specific use cases and are not really generic. |
I was able to implement BT-LE HID support. Unfortunately only very few pure BT-LE HID devices exist and the majority is still classic BT. This includes e.g. the 8bit do ones and the Nintendo Joycons and I wasn't able to even isolate the classic BT stuff I'll n the SDK to compile a raw basic application that would allow me to e.g. scan for devices. So I gave up. A few weeks later I started using WiFi and ran into very similar issues. Trying to connect to an AP gave nul pointer assertions in the closed source part which were eventually resolved by randomly poking in the proj.conf. Once it was able to connect it ran out of memory and/or e.g. the USB started to become unreliable. When trying to initiate an AP scan the FreeRTOS tasks stopped working once the scan completed ... I don't even know if wifi and FreeRTOS are supposed to work together. So while it may be possible to hack around some of these issues I expect to run in similar issues over and over again. That's not useful for an open source project like mine where others are supposed to continue on my work. I already started to distribute patched versions of the SDK and the CherryUSB stack with my project. I am now porting everything over to the Pico and ESP32 and then people have the choice. I'll keep supporting the BL616 and whenever it looks like classic BT becomes usable or Wifi is stable enough to be integrated this can still be added. For now I use the BL616 as a USB host only and if you want Bluetooth or WiFi you need to use one of the other controllers. |
I am trying to port BTstack to BL618, and it can now be detected by classic Bluetooth devices, but it cannot be connected. I think this is just a scheduling issue with BTstack. |
Cool. I was once considering giving tinyUSB a try as it had support for ehci controllers. But for Bluetooth you still need the closed source RF Part inside one of those libraries, don't you? If scanning and active connecting work I might be tempted to give it a try. I already have the whole hid layer working for USB, so adding Bluetooth hid should not be too complex if l2cap is running. Also WiFi won't work with that, would it? |
I'm not really interested in WIFI, so I haven't worked on the bl618's WIFI module. I'm doing all this work to realize a complete A2DP application |
But you are still using the closed source library for the low level stuff, don't you? |
It doesn't matter, only the Bluetooth controller is closed source. I just need to wrap the closed-source API into a usable interface for btstack. |
@O2C14 amazing! Will you share your work later? |
Of course, I am currently organizing the code. Unfortunately, I am preparing for the final exam and may analyze this later |
No worries. Good luck with final exams! |
All the code is here:https://github.com/O2C14/btstack_test |
That's really impressive. I definitely need to have a closer look at that. |
You can try the ai-thinker sdk. |
The library of bluetooth controllers included in this SDK is much bigger, so I don't want to use this library |
The bigger size may be due to large debug info rather than the code. |
WiFi eats a lot of flash and nearly all of the RAM. The resulting flash is unreliable and flashing hangs at flash erase. But more importantly there's not enough ram left for a useful application.
Also most of the WiFi seems to be closed source and the debug output is a new line/return mess. And finally WiFi and USB host don't seem to go nicely and the system often hangs during boot when enabling both.
Can WiFi be simplified with a few simple examples not depending on a shell and the like which wouldn't be used in real-life-scenarios?
The text was updated successfully, but these errors were encountered: