Fix PCAP MAC PID issues by checking against the serial returned instead

This commit is contained in:
Paul Hollinsky
2018-10-04 17:37:17 -04:00
parent efe04128fb
commit 6ad4e564b9
4 changed files with 17 additions and 8 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
#include "device/neovifire2/include/neovifire2usb.h"
// #include "device/plasion/include/neoviion.h"
// #include "device/plasion/include/neoviplasma.h"
// #include "device/radgalaxy/include/radgalaxy.h"
#include "device/radgalaxy/include/radgalaxy.h"
// #include "device/radstar2/include/radstar2.h"
// #include "device/radsupermoon/include/radsupermoon.h"
// #include "device/valuecan3/include/valuecan3.h"
+4 -2
View File
@@ -131,8 +131,10 @@ std::vector<neodevice_t> PCAP::FindByProduct(int product) {
EthernetPacket packet(data, header->caplen);
if(packet.etherType == 0xCAB2 && packet.srcMAC[0] == 0x00 && packet.srcMAC[1] == 0xFC && packet.srcMAC[2] == 0x70) {
if(product != packet.srcMAC[3]) // This is where the PID is stored in the MAC
continue; // This is not a product we're currently looking for
/* Here we could check packet.srcMAC[3] against the PID, however for some devices
* this is not correct. For this reason, we don't check the product here and instead
* check the serial number that comes back later.
*/
neodevice_t neodevice;
/* Unlike other transport layers, we can't get the serial number here as we