Trying to filter messages using can in python using the following:
bus=can.Bus(interface="ixxat",channel=0, bitrate=250000)
filter=[{"can_id":0x0629, "can_mask"=0xFFFF}]
bus.setfilters(filter)
while True:
msg=bus.recv()
print(msg)
I've tried with "extended"=False as well, and attempted to use a different id, in case I misunderstand what 0629 means. Have tried "can_id" = 629, 0x629 with the same outcome.
I've tried setting the bus initially with filter, bus.apply_filters, and bus.set_filters. Does not seem to change the output.
The idea is to track a particular device in the network to monitor it closely, as well as make sending commands in response to its messaging easier. On a related note, I am also not sure how to send messages specifically to a device, unless that information is also found in the message itself (which all the technical specs on the device seem to indicate). This is my first time working with CAN-bus, so I'm learning it on the fly- have read lots of documentation on it, but still getting some of the principles down. Thank you for any help.
Am I misusing the "can_id", or "can_mask" settings?
Am I misunderstanding how this works? Thanks so much for the help. I also need to add more detail because of the code above, so I am writing what the system says. I can't think of anything else that might be relevant to getting this particular issue resolved. Once I learn how to track each message, I can identify the new devices on the network that we've added, ensure that they are the correct ones, and then begin sending messages to set them up in the network. Thanks again.