Filtering with CBT
  • 0
  • Tried to filter some messages today but it doesn't seem to work like I expected.

    This is the example:
    0x03 0x01 0x01 0x0290 0x0291 Enable logging on Bus 1 and filter for Message Id 0x290 or 0x291

    I added an ID which I got from the JSON formatted file but nothing happened. Has anybody used this already?

    Does this look for the specified ID or does it filter the specified ID out? I'm not sure about this.

  • 0
  • What happens when you issue that command? Do you still see all unfiltered data? I have used the filter command with great success however I have noticed it can get in a weird state some times. I have found it works best to make sure to turn off all logging. 0x03 0x01 0x00 0x0000 0x0000, then turn on logging with just the filters I want. Like you did above. Also I didn't have much luck making that command work in Realterm it didn't seem to like the 16bit values. Maybe I was just doing something wrong. However when I use CoolTerm and send the data like "03010102900291" seems to work as expected.

    Hope this helps!

  • 0
  • Thanks! Realterm could be the problem. Will try cool term.

  • 0
  • Also I just found something strange. It appears filtering is only paying attention to the last two numbers of the bus id value.
    Ex. if you do 03010106120612 to filter for id:612 (also I believe 0301010612 will work if you are only interested in filtering one ID).
    it will filter for "x12" so if you had say a device id of say 312 also on the bus that will still come through the filter.

    Is this a bug or am I doing something wrong?

  • 0
  • administrators

    This command will filter for only the IDs you specify.

    TheDIgital_1: I could have a bug in the code for sure. The way the MCP2515 filter settings work is a little wacky.

  • 0
  • I've seen this issue too with certain filter requests using SerialCommand - it matches the 2nd byte of the filter but displays traffic regardless of whether the first byte matches.

    That is, a filter on 0x751 shows traffic from 0x251 as well.

    If I filter in code instead it works perfectly.

  • 0
  • @Derek - where do you want us to post bugs? On the Github issues page?

  • 0
  • administrators

    Yeah, that would be awesome!

  • 8
    Posts
  • 1480
    Views
  • Log in to reply