updated some new experiment methods. you can now fuzz on all ids randomly as well...
[goodfet] / client / FordExperiments.py
index 5853645..e826bca 100644 (file)
@@ -12,13 +12,16 @@ import Queue
 import math
 
 tT = time
 import math
 
 tT = time
-class FordExperiments(GoodFETMCPCANCommunication):
+class FordExperiments(GoodFETMCPCANCommunication, dataLocation):
     
     def __init__(self):
     
     def __init__(self):
-        GoodFETMCPCANCommunication.__init__(self)
+        GoodFETMCPCANCommunication.__init__(self, dataLocation)
         #super(FordExperiments,self).__init__(self) #initialize chip
         self.freq = 500;
 
         #super(FordExperiments,self).__init__(self) #initialize chip
         self.freq = 500;
 
+    
+
+
     def mimic1056(self,packetData,runTime):
         #setup chip
         self.client.serInit()
     def mimic1056(self,packetData,runTime):
         #setup chip
         self.client.serInit()
@@ -142,6 +145,25 @@ class FordExperiments(GoodFETMCPCANCommunication):
             
         #recieveTime = time.time()
         return packetParsed
             
         #recieveTime = time.time()
         return packetParsed
+
+    def cycle4packets1279(self):
+        self.client.serInit()
+        self.spitSetup(500)
+        # filter on 1279
+        self.addFilter([1279, 1279, 1279, 1279, 1279, 1279], verbose = False)
+        packetParsed = self.getBackground(1279)
+        packet = []
+        if (packetParsed[db0] == 16):
+            # if it's the first of the four packets, replace the value in db7  with 83
+            packetParsed[db7] = 83
+            # transmit new packet
+            self.client.txpacket(packetParsed)
+        else:
+        # otherwise, leave it alone
+            # transmit same pakcet we read in
+            self.client.txpacket(packetParsed)
+        # print the packet we are transmitting
+        print packetParsed
         
         
     def oscillateTemperature(self,time):
         
         
     def oscillateTemperature(self,time):