canbus_interface icon indicating copy to clipboard operation
canbus_interface copied to clipboard

When I lost recv , I can't send any message anymore!

Open KenyesLai opened this issue 6 years ago • 0 comments

Holle: my code: def SendBack(data): msg = can.Message(arbitration_id=0x000601, data = data, extended_id=False) bus.send(msg) bus.flush_tx_buffer() time.sleep(0.001) try: Ans = str(bus.recv(timeout=1.0)) except: print("Error") return(None) if(len(Ans) > 10): return("success") else: return(None) My question is when it lost recv then i cant send any new message. it can't send any data and any response. I need to restart Raspberry Pi then CAN bus will be normal. Please help me to fix this question. Thank you

KenyesLai avatar Apr 23 '18 07:04 KenyesLai