From e96e56891d1e010ab336a0af9b00f0272a8a8196 Mon Sep 17 00:00:00 2001 From: chrishoder Date: Fri, 25 Jan 2013 21:02:22 +0000 Subject: [PATCH] changes to the GoodFETMCPCANCommunication file. to make it reset filters git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1416 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- client/GoodFETMCPCANCommunication.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/client/GoodFETMCPCANCommunication.py b/client/GoodFETMCPCANCommunication.py index d243d02..7d8c205 100644 --- a/client/GoodFETMCPCANCommunication.py +++ b/client/GoodFETMCPCANCommunication.py @@ -73,12 +73,15 @@ class GoodFETMCPCANCommunication: ########################## def sniff(self,freq,duration,description, verbose=True, comment=None, filename=None, standardid=None, debug=False, faster=False): + #reset eveything on the chip + self.client.serInit() self.reset() - self.client.serInit() + #### ON-CHIP FILTERING if(standardid != None): - + if( comment == None): + comment = "" self.client.MCPreqstatConfiguration(); self.client.poke8(0x60,0x26); # set RXB0 CTRL register to ONLY accept STANDARD messages with filter match (RXM1=0, RMX0=1, BUKT=1) self.client.poke8(0x20,0xFF); #set buffer 0 mask 1 (SID 10:3) to FF @@ -202,9 +205,9 @@ class GoodFETMCPCANCommunication: row.append(duration) #boolean that tells us if there was filtering. 0 == no filters, 1 == filters if(standardid != None): - row.append(0) - else: row.append(1) + else: + row.append(0) #write packet to file for byte in packet: row.append("%02x"%ord(byte)); -- 2.20.1