Closed EricB-ADI closed 1 year ago
@yc-adi @EricB-ADI is this still an open issue?
As far as I am aware, yes. However, we do not know if it is a BLE_hci.py problem or a Cordio/Task Scheduler problem. @AbbyWolf-ADI is working on a refactored version of the HCI for python, which may or may not rule out the python, but will at least improve the usability and rule out slow processing times of Python in regards to many print statements. When I was dealing with this, it was a multi level issue concerning the pyserial API, buffer overflows with the link layer for the HCI and more. It has not been cleared or even really investigated further, so we will leave it open for now.
However, I believe the primary user of this functionality is RF and I and only seems to show up on big reads. I have added a companion utility that uses PYOCD to control the radio, which was the main user of this, so if it persists, we may want to just deprecate or remove it until it becomes a bigger problem.
I agree. We may close this issue now.
As far as I am aware, yes. However, we do not know if it is a BLE_hci.py problem or a Cordio/Task Scheduler problem. @AbbyWolf-ADI is working on a refactored version of the HCI for python, which may or may not rule out the python, but will at least improve the usability and rule out slow processing times of Python in regards to many print statements. When I was dealing with this, it was a multi level issue concerning the pyserial API, buffer overflows with the link layer for the HCI and more. It has not been cleared or even really investigated further, so we will leave it open for now.
However, I believe the primary user of this functionality is RF and I and only seems to show up on big reads. I have added a companion utility that uses PYOCD to control the radio, which was the main user of this, so if it persists, we may want to just deprecate or remove it until it becomes a bigger problem.
Does the HCI trace actually encode in utf-8?
No, the HCI is a traditional opcode/data format in bytes. What you are seeing is a piece of code that allows you to basically steal the trace output, not the HCI data. This is where the actual HCI data is parsed.
Closing this issue. It seems to be resolved.
I don't know what is causing this but there seems to be some issues with the readReg command in the HCI, on at least the MAX32690 and I think the MAX32655.
It seems to be that the device works fine a few times, but will almost always come back with incorrect data and then the python cli tools crashes since the length isn't as expected.
You can see that the read reg command comes back identical, until it comes back with 040E06012220000000.
The program immediately crashes upon the next call. It seems that the last call was in fact about to return the correct data but the response was incomplete, and so an error occurs trying to access an index that doesn't exists.