Hello,
yes, it is possible to use the CAN bus as an interface for blhost. The support is based on python-can library. Take a look at supported hardware interfaces:
https://python-can.readthedocs.io/en/stable/interfaces.html I have tried it with Peak-System PCAN USB adapter.
CAN might be used with -cb/--can interface option with blhost.
-cb, --can interface[,channel,bitrate,rxid,txid]
CAN Bus settings
interface[,channel,bitrate,rxid,txid]
- interface ... CAN interface name (refer to python-can library)
- channel ... CAN channel number
- bitrate ... CAN bitrate (default=1000000)
- rxid ... default arbitration ID for RX (default=0x123)
- txid ... default arbitration ID for TX (default=0x321)
For example in case of PCAN, the interface name would be pcan, so the full command to get-property 1 using the PCAN can interface is.
blhost --can pcan get-property 1
Please note that SPSDK must be installed with "can" extras like this: pip install spsdk[can]
https://spsdk.readthedocs.io/en/latest/examples/_knowledge_base/installation_guide.html#can-support