Open HXHZQF opened 3 months ago
Hello @HXHZQF ,
I have suspect if it related to https://github.com/espressif/esp-hosted/issues/381#issuecomment-2113893509 But this can only be confirmed after btmon logs.
Could you please get us following logs in textual format to understand scenario:
Host
ESP
idf.py monitor
logsThank you very much for your support!
I’ve reviewed the details in #381 (comment) carefully, and it seems like the issue we’re encountering is indeed similar. However, following the same steps didn’t resolve the problem. To help you better understand the situation, I’ve provided the relevant logs in the attachment:
Host:
dmesg logs from the start Bluetooth steps and their results Output from btmon Output from hcidump Output from hciconfig -a ESP:
sdkconfig file minicom or idf.py monitor logs I hope this information will help us in resolving the issue. Please let me know if you need any further details. bluetoothctl.log btmon.log c6_monitor.log dmesg.log hcidump.log sdkconfig.txt
Seems to be related to:
But give me some time to cross-check this with bluetooth team and get back.
What is BlueZ version you use?
As mentioned in (2) above,
starting from BlueZ version 5.65 experimental features really work
Can you try latest BlueZ built with experiementtal features ?
Hello,
I am also encountering the same issue. I’m a Linux beginner, and currently, in versions above 5.55, when I run the "advertise on" command, I see "command unknown" in btmon. If you could provide some guidance or direction on how to resolve this, it would be greatly appreciated.
Thank you!
What happens if you skip running 'name thomas123' , @Dorismei ?
What is BlueZ version you use?
As mentioned in (2) above,
starting from BlueZ version 5.65 experimental features really work
Can you try latest BlueZ built with experiementtal features ?
Hi,
I checked the version using bluetoothctl --version, and it shows that I am currently using BlueZ version 5.70. As noted, experimental features are expected to work starting from version 5.65.
I will proceed with testing the latest BlueZ build with experimental features enabled and update you on the results.
Thank you!
What happens if you skip running 'name thomas123' , @Dorismei ?
Hello mantriyogesh,
I tried removing the name "thomas123," but the issue still persists. Are there any other possible solutions to this problem?
Thank you!
Hi people,
I have also been strugling with this error for the past few days, here is what I tried:
hcitool
, which was a good step in the right direction. Because now we constrained the problem to Bluez itself and not some underlying issue.bluetoothctl
utility. My solution was to simply downgrade BlueZ5 to v5.55 (I was using v5.65)
Hello @luisCactuasys ,
I understand it might be frustrating some times.
I think getting to lower versions is good for debugging, but may not be great for long term.
If you have controlled environment, can you please upgrade kernel version locally to 5.10.x +, if your kernel version is lower than that? I don't exactly remember your your kernel version, but some users reported issues with kernel versions around 5.7.x. not exactly sure of range right now. But let me know if your kernel falls in this catagory, I will check and let you know.
Overall, bluetoothctl or btmgmt should be able to cater your all needs. bluetoothctl is user friendly and btmgmt is for advanced use cases, AFAIK.
Deprecated tools like hciconfig etc, are easy to use, but they invoke some command sequences, which are deprecated for the bluetooth specs. So something is working fine, then great. But sometimes something not working, you might need to reconsider of blutoothctl. In general, the spec would be followed at the same time by kernel version , bluetooth stack, bluetooth controller and bluetooth commands. I would suggest you to for for decent & recent stable LTS OS (if your eco allows) and without changes, if your issues are getting reproduced or not.
In general, ESP-Hosted is just relaying of the bluetooth messages as is, from controller to host stack and vice versa. So ESP-Hosted would have least issues and controller and/or bluetooth stack configs or issues may be present, if you face any kind of issues.
Controller is from ESP-IDF. As per my experience, till now only single issue we had faced in controller over the years, otherwise it behaved as per the specs. But anyway, btmon and other logs would help if it is controller issues or not. Over the time, we typically observe the bluetooth stack and it's changing nature as per kernel version caused issues, also the incorrect configs, while creating valid use case, was typical issue.
But I think it is important to rule out which entity started to deviate from spec, which could be checked from bluetooth specs. I know specs are technical. But we are also dependent on internal bluetooth teams. ESP-Hosted, being relay, only intention is to deliver msg from one point to other, and vice versa. If you cannot verify on your own, you can get dumps and logs to cross check. Alternatively, in debugging side, if you can recreate use case using ESP-IDF bluetooth examples, to see if the issue is from stack or controller.
Hi, @mantriyogesh,
I doubt the issue lies with the ESP-hosted setup. As I mentioned earlier, when I tested with another Linux environment using the exact same hardware (Beaglebone Black and ESP32-C3), I had no problem using bluetoothctl
to advertise.
Here are the details of both setups:
Debian:
ESP32-C3 with esp-hosted_ng (latest version).
Beaglebone Black running Debian (AM335x image) with Kernel 5.10 and Bluez 5.55. This setup worked perfectly. Yocto (Kirkstone):
ESP32-C3 with esp-hosted_ng (latest version).
Beaglebone Black running Yocto Poky with Kernel 5.15 and Bluez 5.65. In this setup, the advertisement did not work with bluetoothctl. To troubleshoot, I decided to downgrade Bluez to version 5.55 on the Yocto setup:
Yocto (Kirkstone) after Bluez downgrade:
If you’re interested, I can share the logs from btmon
, btmgmt
, dbus-monitor
, etc. However, they are quite similar to others already shared here.
Thank you!
Thanks for full details and clarifications. As you suggested the blueZ stack may have some difference. Further thank you for confirming that it is not ESP-Hosted issue.
However it would be good to study and point the difference with detailed logs. May be it gets solved, may be not solved, but at least would be good to capture for any similar issues if someone faces in future.
I agree. I'm currently short on time, but I plan to explore the issue further in the near future and will keep you informed.
kernel 5.15 + c6-ng(sdio) https://github.com/espressif/esp-hosted/blob/master/esp_hosted_ng/docs/bluetooth.md#gatt-server GATT server Steps:
Run sudo bluetoothctl。 Run list to get MAC address of ESP. To set device name, run menu advertise. Then name。
To come back to main menu, run back。
To start advertising, run advertise on. Perform below steps on Mobile Phone:
Turn on mobile phone's bluetooth. Open nRF connect application, ESP's MAC address will be displayed under SCANNER tab as a result of scan.
Click on connect. Client tab will be open. Click on Generic Attribute option.
Perform read/write on listed characteristics fields in Generic Attribute service. To disconnet:
Run disconnect on linux host's bluetoothctrl OR click on DISCONNECT in nRF connect application's GATT client screen.
log: