Skip to content

Commit 5808fc2

Browse files
author
Reini Urban
committed
Updates for USB33 and USB37
print the proper USB type, and the recommended action
1 parent 664bfb3 commit 5808fc2

File tree

4 files changed

+36
-2
lines changed

4 files changed

+36
-2
lines changed

src/UsbCamera.cpp

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ static const camera_type camera_type_list[] = {
5858
{ USB3, TIS_VENDOR_ID, 0x8415, "DFK 23UM021" },
5959
{ USB3, TIS_VENDOR_ID, 0x8416, "DFK 23UP031" },
6060
{ USB3, TIS_VENDOR_ID, 0x8426, "DMK 23UP031-AF" },
61-
{ USB3, TIS_VENDOR_ID, 0x8436, "DFK 23UP031-AF" }
61+
{ USB3, TIS_VENDOR_ID, 0x8436, "DFK 23UP031-AF" },
62+
{ USB37, TIS_VENDOR_ID, 0x9402, "DMK 37BUX178" }
6263
};
6364

6465

@@ -75,7 +76,13 @@ const camera_type find_camera_type(const unsigned int& idVendor, const unsigned
7576
// type not known assure we still can handle the device
7677
// as long as it is one of ours
7778

78-
if ((idProduct & (0x9000)) == (0x9000))
79+
if ((idProduct & 0x9400) == 0x9400)
80+
{
81+
return { USB37, idVendor, idProduct, "Unkown USB37 Camera" };
82+
}
83+
else if (((idProduct & 0x9800) == 0x9000) ||
84+
((idProduct & 0x9c00) == 0x9c00) ||
85+
((idProduct & 0x9c00) == 0x9c00))
7986
{
8087
return { USB33, idVendor, idProduct, "Unkown USB33 Camera" };
8188
}
@@ -90,6 +97,14 @@ const camera_type find_camera_type(const unsigned int& idVendor, const unsigned
9097
return { USB2, idVendor, idProduct, "Unknown USB2 Camera" };
9198
}
9299

100+
if (((idProduct & 0x8400) == 0x8400) ||
101+
((idProduct & 0x8500) == 0x8500) ||
102+
((idProduct & 0x8600) == 0x8400) ||
103+
((idProduct & 0x8700) == 0x8700))
104+
{
105+
return { USB2, idVendor, idProduct, "Unknown USB2.3 Camera" };
106+
}
107+
93108
return camera_type_list[0];
94109
}
95110

src/UsbHandler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ std::shared_ptr<UsbCamera> UsbHandler::open_camera(std::string serial_number)
107107

108108
switch (t.camera_type)
109109
{
110+
case USB37:
110111
case USB33:
111112
return std::make_shared<Usb33Camera>(this->session, d);
112113
case USB3:

src/definitions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ enum TYPE
3838
USB2,
3939
USB3,
4040
USB33,
41+
USB37,
4142
};
4243

4344
struct camera_type

src/firmware-update.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ void print_device_info(const std::string& serial_number)
182182

183183
if (type.camera_type == USB2)
184184
{
185+
std::cout << "USB2 type" << std::endl;
185186
UVC_COMPLIANCE mode = cam->get_mode();
186187

187188
std::cout << "UVC mode is: ";
@@ -196,12 +197,28 @@ void print_device_info(const std::string& serial_number)
196197
}
197198
else if (type.camera_type == USB3 && cam->get_firmware_version() < 102)
198199
{
200+
std::cout << "USB3 type" << std::endl;
199201
std::cout << "\n!!! FIRMWARE UPGRADE REQUIRED !!!\n\n";
200202
std::cout << "To correctly interact with this camera under Linux\n";
201203
std::cout << "this device requires a firmware upgrade.\n\n";
202204
std::cout << "Please contact the manufacturer to receive the concerning firmware files."
203205
<< std::endl;
204206
}
207+
else if (type.camera_type >= USB3) {
208+
std::cout << "USB type: ";
209+
switch (type.camera_type) {
210+
case USB3: std::cout << "USB3" << std::endl; break;
211+
case USB33: std::cout << "USB33" << std::endl; break;
212+
case USB37: std::cout << "USB37" << std::endl; break;
213+
default: std::cout << "Unknown: " << type.camera_type << " "
214+
<< type.product_name << std::endl;
215+
}
216+
std::cout << "Please contact the manufacturer to check for firmware updates."
217+
<< std::endl;
218+
}
219+
else {
220+
std::cout << "USB type: " << type.product_name << std::endl;
221+
}
205222

206223
std::cout << std::endl;
207224
}

0 commit comments

Comments
 (0)