Skip to content

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

@KenyesLai

Description

@KenyesLai

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions