Raspberry pi changes to Utils.sh and LinuxSerialUSB.cpp
Changes need to be made due to the rpi not having pci
In Utils.sh Because there is no "pci" in the string I had it search for "bcm2708_usb" Change line 83
SerialPort="$SearchFor"
To
RpiSearch="bcm2708_usb"
if echo "$SearchFor" | grep -q "$RpiSearch"; then
if [-d /sys/class/tty ]([)]; then
pushd /sys/class/tty &>/dev/null
for dev in ttyUSB*/device ttyACM*/device; do
id=$(readlink -f "$dev" | sed -r 's,^.*(pci.*)/usb[[[ "$id" == "$SearchFor" ](0-9]*/[0-9./-]*/[0-9]*-([0-9.]*):[0-9.]*(/ttyUSB[0-9]*)?$,\1+\2,g')
if)]; then
SerialPort="/dev/$(dirname "$dev")"
break;
fi
done
popd &>/dev/null
fi
else
SerialPort="$SearchFor"
fi
It might be better to search for something else but this seems best right now
In LinuxSerialUSB.cpp Also added a search for "bcm2708_usb" Change line 27 change
LoggerWrapper::GetInstance()->Write(LV_STATUS,"TranslateSerialUSB %s isn't serial usb",sInput.c_str());
return sInput;
To
string s_str ("bcm2708_usb");
unsigned found = sInput.find(s_str);
if (found==std::string::npos)
{
LoggerWrapper::GetInstance()->Write(LV_STATUS,"TranslateSerialUSB %s isn't serial usb",sInput.c_str());
return sInput;
}
Once again the search criteria might be better Also I'm not sure if the search for "pci" is best the way it is. I'm not sure if the location of the rpi search will be constant.