Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions src/UsbCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ static const camera_type camera_type_list[] = {
{ USB3, TIS_VENDOR_ID, 0x8415, "DFK 23UM021" },
{ USB3, TIS_VENDOR_ID, 0x8416, "DFK 23UP031" },
{ USB3, TIS_VENDOR_ID, 0x8426, "DMK 23UP031-AF" },
{ USB3, TIS_VENDOR_ID, 0x8436, "DFK 23UP031-AF" }
{ USB3, TIS_VENDOR_ID, 0x8436, "DFK 23UP031-AF" },
{ USB37, TIS_VENDOR_ID, 0x9402, "DMK 37BUX178" }
};


Expand All @@ -71,24 +72,34 @@ const camera_type find_camera_type(const unsigned int& idVendor, const unsigned
return c;
}
}
const unsigned int idProductMask = 0xFC00;

// type not known assure we still can handle the device
// as long as it is one of ours
if (idVendor != 0x199e)
return camera_type_list[0];

if ((idProduct & (0x9000)) == (0x9000))
if (idProductMask == 0x9400)
{
return { USB33, idVendor, idProduct, "Unkown USB33 Camera" };
return { USB37, idVendor, idProduct, "Unkown USB37 Camera" };
}

if ((idProduct & (0x8400)) == (0x8400))
else if (idProductMask == 0x9000 ||
idProductMask == 0x9800 ||
idProductMask == 0x9c00)
{
return { USB3, idVendor, idProduct, "Unknown USB3 Camera" };
return { USB33, idVendor, idProduct, "Unkown USB33 Camera" };
}

if ((idProduct & (0x8200)) == (0x8200) || (idProduct & (0x8300)) == (0x8300))
else if (idProductMask == 0x8200 || idProductMask == 0x8300)
{
return { USB2, idVendor, idProduct, "Unknown USB2 Camera" };
}
else if (idProductMask == 0x8400 ||
idProductMask == 0x8500 ||
idProductMask == 0x8600 ||
idProductMask == 0x8700)
{
return { USB2, idVendor, idProduct, "Unknown USB2.3 Camera" };
}

return camera_type_list[0];
}
Expand Down
1 change: 1 addition & 0 deletions src/UsbHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ std::shared_ptr<UsbCamera> UsbHandler::open_camera(std::string serial_number)

switch (t.camera_type)
{
case USB37:
case USB33:
return std::make_shared<Usb33Camera>(this->session, d);
case USB3:
Expand Down
1 change: 1 addition & 0 deletions src/definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ enum TYPE
USB2,
USB3,
USB33,
USB37,
};

struct camera_type
Expand Down
17 changes: 17 additions & 0 deletions src/firmware-update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ void print_device_info(const std::string& serial_number)

if (type.camera_type == USB2)
{
std::cout << "USB2 type" << std::endl;
UVC_COMPLIANCE mode = cam->get_mode();

std::cout << "UVC mode is: ";
Expand All @@ -196,12 +197,28 @@ void print_device_info(const std::string& serial_number)
}
else if (type.camera_type == USB3 && cam->get_firmware_version() < 102)
{
std::cout << "USB3 type" << std::endl;
std::cout << "\n!!! FIRMWARE UPGRADE REQUIRED !!!\n\n";
std::cout << "To correctly interact with this camera under Linux\n";
std::cout << "this device requires a firmware upgrade.\n\n";
std::cout << "Please contact the manufacturer to receive the concerning firmware files."
<< std::endl;
}
else if (type.camera_type >= USB3) {
std::cout << "USB type: ";
switch (type.camera_type) {
case USB3: std::cout << "USB3" << std::endl; break;
case USB33: std::cout << "USB33" << std::endl; break;
case USB37: std::cout << "USB37" << std::endl; break;
default: std::cout << "Unknown: " << type.camera_type << " "
<< type.product_name << std::endl;
}
std::cout << "Please contact the manufacturer to check for firmware updates."
<< std::endl;
}
else {
std::cout << "USB type: " << type.product_name << std::endl;
}

std::cout << std::endl;
}
Expand Down