The most comprehensive demo is here:
https://pycyphal.readthedocs.io/en/stable/pages/demo.html
Your code looks correct (except for the condition if request.command == uavcan.file.Read_1.Request:
– it doesn’t make sense but it’s not related to your issues).
You need to enable verbose logging in PyCyphal (e.g., via the PYCYPHAL_LOGLEVEL
environment variable) to see what is happening at the time of request arrival. There will be a lot of output, so you will need to sift through that carefully (LLMs are usually helpful with that).
I also recommend dumping all serial port exchanges into a file, and then feeding that file into an analyzer tool like this: Postmortem dump analyzer tool. It does not support Cyphal Serial out of the box though, but the support is easy to add using CandumpCaptureLoader
as a reference – there is a todo comment about that on line 267. Let me know if you need practical help with that.
The point of using the analyzer tool is to see whether the request actually makes it to the server.