I'm trying to test getting the ACK bit from a CAN network. My system has an RPI 4, PICAN DUO and transceivers to other CAN nodes. When the RPI and the other node are both connected, all is well and I'm getting 2 way communication.
When the RPI is by itself, I'm sending a Message and should receive an Error, indicating no ack has occurred, but I'm getting nothing.
Configuration:
can.interface.Bus(interface="socketcan", receive_own_messages=True, channel="can1", bitrate=500000, err_reporting=True)
You do not deal directly with ACK, but you can be notified when such event happens. All relevant info can be found in Linux SocketCAN documentation.
If you want implementation details, at this link you can find my hlcanerrdump tool which can parse and show all errors on CAN bus (including NoAck), and hlcanerrsim tool for simulating all kinds of CAN bus errors. Study the source code and you will understand how to achieve what you want.