change USB Device Name reported to Host - General Help and Assistance on using CHDK stable releases - CHDK Forum supplierdeeply

change USB Device Name reported to Host

  • 18 Replies
  • 11641 Views
change USB Device Name reported to Host
« on: 09 / June / 2014, 03:22:06 »
Advertisements
is it possible to change the name of the camera as reported to the USB Host.
i can modify the libusb drivers to list it as something else in the Device manager (windows 7)
once i load the libusb drivers

but when it is detected it is detetcted as
Canon Digital Camera
and then
Canon PowerShot SX50 HS

*

Online reyalp

  • ******
  • 14079
Re: change USB Device Name reported to Host
« Reply #1 on: 09 / June / 2014, 16:13:43 »
Name reported where? Windows? PTP clients?

The model name reported in ptp_getdeviceinfo is probably settable somehow, since it varies between "ixus" and "elph" variants of the same camera. This shows up in flash params, but whether changing that would change the USB response or have other side effects is not clear.
Don't forget what the H stands for.

Re: change USB Device Name reported to Host
« Reply #2 on: 09 / June / 2014, 21:14:47 »
Change USB Device Name(s) reported [to] "by" Host

"....modify the libusb drivers to list it as something else in the Device manager (windows Xp/7/8)..."

0/ You will require administrative permissions, or above, to do these edits. 

1/ The "Generic" USB Device Class 06h Driver can be Switched Off, if desired. by inserting a ";" in the Driver.inf file.

2/ The Windows Registry, for the cameras "Device Decription", can be edited and changed from the default text.

3/ The Windows Registry, for the cameras "Friendly Name", can be edited and changed from the default text.

4/ Note #1 that Windows [Driver Model] has a "Ranking" scheme for all drivers.

5/ Note #2 that HKLM\System\Cont...\Enum\USB\"Canon_Camera" will probably be set to a "Restricted" permission.

6/ Note #3 that the above changes are reversable, and changing a text based description won't crash windows.

7/ Note #4 that editing the Windows Registry for Camera Data might crash windows.

H-H

For the details, see attached files.

continued Post #3

a related, Multi-Camera,  post continued at:-
..... http://chdk.setepontos.com/index.php?topic=11583.msg113423#msg113423
« Last Edit: 09 / June / 2014, 22:31:54 by Hardware_Hacker »

Re: change USB Device Name reported to Host
« Reply #3 on: 09 / June / 2014, 21:18:49 »
continued from Post #2

Some times it is undesirable to have a "Generic" Wia/PtP/MtP windows driver
load when a canon camera is connected to a USB port, this default action can be disabled, if required.

Attached .... USB Device Classes.png
« Last Edit: 09 / June / 2014, 21:37:55 by Hardware_Hacker »


Re: change USB Device Name reported to Host
« Reply #4 on: 12 / June / 2014, 02:55:35 »
Thank you Hardware_Hacker

for the detailed explanation about USB device reporting, device Id etc.

I have been already changing  the friendly name in the drivers -  for windows 7 i can change the Strings in LibUSB driver generator and it works, for xp i need to tweak the registry to change the friendly name - and it works - in a way.

however when ever a new camera is connected the first thing reported is CANON DIGITAL CAMERA - then the drivers for the specific model are loaded and the name changes to CANON POWERSHOT SX50HS for eg. i dont mind the first one but i wish i could chage the  second to for eg CHDK PS SX50HS or  something. it definitely changes if i provide a driver with that name and do a UPDATE DRIVER. but every time a new camera is connected it loads the name by default for eg CANON POWERSHOT SX150 obviously this string is reported to the OS from the  device itself as the drivers loaded are generic drivers either for canon digital camera or are generic enough for all Digital Still Cameras.

can we tweak CHDK so that the initial string reported to the OS is changed and it loads the string provided in CHDK

it would be good if instead of loading the default imaging drivers the system would ask for driver and we could provide the  LIBusb driivers  as i never use the default drivers loaded and always need a PTP connection to the camera.



Re: change USB Device Name reported to Host
« Reply #5 on: 16 / June / 2014, 23:49:33 »

can we tweak CHDK so that the initial string reported to the OS is changed and it loads the string provided in CHDK

it would be good if instead of loading the default imaging drivers the system would ask for driver and we could provide the  LIBusb driivers  as i never use the default drivers loaded and always need a PTP connection to the camera.

I haven't tried it but I think you can change the (WDM) Default WIA/PTP/MTP drivers

To a, customized, default generic LibUsb0 driver.

I am using Win-Dos PE 8v1 or Win-Xp PE for my projects. i.e. a Miniature version of Windows.

It has been working Reliably and Repeatably for about 3 years.

The LibUsb0 Drivers are NOT installed but Merged, you also have the powers of
a SUPER Administrator and can change anything and everything you wish.

The Win-Dos_8v1  only crashes when you make a typo in the VERBOSE WDM/LibUsb0 driver.

Just like CHDK, power OFF and then reboot then fix your typo's.

Boot's from the Boot.wim, Load's and Run's in 2 Gig Ram from the hidden windows system partition.

Then from Win-Dos 8v1, with no desktop, metro, start, etc loads a ChdkPtp-r5xx command which
then starts a Win-GUI and runs ChdkPtp-r5xx. i.e it works just like Win-3v11.

Also I could do the same for Android_x86, buts its still a bit buggy.
But no Android ChdkPtp-r5xx is currently available.

On a small cheap laptop using 4 partitions:-

1/ Android_x86 and Mini Win-Dos 8v1

2/ Win-7

3/ Win-8v1 #1

4/ Win-8v1 #2 [Backup]

H-H
« Last Edit: 17 / June / 2014, 00:17:54 by Hardware_Hacker »

*

Online reyalp

  • ******
  • 14079
Re: change USB Device Name reported to Host
« Reply #6 on: 17 / June / 2014, 01:14:12 »
can we tweak CHDK so that the initial string reported to the OS is changed and it loads the string provided in CHDK
As I said in my earlier post, you *might* be able to change the cameras name, but potential side effects are unknown.
Hooking into the camera code to change what is reported without changing the name in ROM (if in fact that is the used by USB) might be possible but would require substantial reverse engineering and coding.

Quote
it would be good if instead of loading the default imaging drivers the system would ask for driver and we could provide the  LIBusb driivers  as i never use the default drivers loaded and always need a PTP connection to the camera.
PTP support is built into windows, although as H_H says, you might be able to disable it.

Is there some specific problem you are trying to solve with all this?
Don't forget what the H stands for.

Re: change USB Device Name reported to Host
« Reply #7 on: 17 / June / 2014, 01:26:37 »
I am only changing from the Default Windows WDM (side) which just gives access to:-

Win_Xp Sd_Card is accessed via UsbScan.sys (Default) to LibUsb0.sys as a default.

Win_7 and Win_8 is accessed via MTP (Default) to LibUsb0.sys as a default.

With Xp PE, Win_7 PE and Win_8x PE there is NO default so  LibUsb0.sys is now set as the default.

In the case of Windows PE the "potential side effects are..." .. known
It works but with bugs, it works as desired, or it crashes.

The main point is that when working with multiple cameras each camera can
be assigned a Repeatable, Reliable and Custom behavior on or before the connection
via the (VERBOSE) LibUsb0.sys driver.

In the case of a standard windows installation the "Default" can be switched of just by a
single ";" in the right place. And then LibUsb0.sys now set as a default with some extra coding.

H-H
« Last Edit: 17 / June / 2014, 01:56:14 by Hardware_Hacker »


Re: change USB Device Name reported to Host
« Reply #8 on: 28 / September / 2015, 06:13:27 »
Can anyone comment on a fast (or perhaps an automated) method to install the libusb drivers for a large camera count on

  • a single machine
  • the same cameras on multiple machines

specifically Win7 64 bit?

Re: change USB Device Name reported BY Host
« Reply #9 on: 28 / September / 2015, 21:05:14 »
Can anyone comment on a fast (or perhaps an automated) method to install the libusb drivers for a large camera count on
  • a single machine
  • the same cameras on multiple machines


To "...Change USB Device Name reported "BY" the Host..."

I am still using the same basic method for about 4++ years now.
YES it could be "Automated" by AutoIT or similar .... But is it really worth the effort.

## Since my multiple cameras are usually ebay cheapies they tend to be delivered at
      different and random times also Canon's USB iSerial Numbers are also random. So the
      only practical solution is to "Test" and "Customize" the  libusb camera drivers on a
      as "Delivered" time scale.

## Canon's USB iSerial Numbers are then used to:-
      "...Change USB Device Name reported "BY" the Host..."
      by way of a "Custom" WDM Driver that also is LibUsb compatible.

## Windows is very "Unreliable" with multiple Usb devices of the same type...
       An Example: My OLDER SanDisk USB Sticks are continually not recognized
       by all versions of windows and it wants to "Re-Format" them [!@#$%^&*()]

## So if you have 64 Canon P&S cameras there are 64 versions of "LibUSB00.sys"
     [to LibUSB63.sys]  running as 64 "Separate" and "Unique" windows "Services".
     Also I change the GUID from the one used by libUsb to something like:-
    F000....A495....0000 for a Canon A495 camera so each camera model has a
     "Unique" GUID as far as I can tell the F000......000 GUID is also "UN-Used" by windows.

## These 64 "Separate" and "Unique" windows "Services" also have "Customized" windows
       friendly "Names" and windows "Messages. An Example:-  Ixus_125 camera number 64
       friendly "Name" could be "Ixus 125 #64" etc... etc... this is also synce'd with W-W's
       large font so that that camera will also display "Ixus 125 #64" to keep track of every thing
       just put a text file "Ixus_125_#64.txt" in the root of that camera's SD Card it can contain
       any note's that you like. You can also make temporary changes to any file by changing
       the 8.3 "Fat 12/16/32" "Names.DOS" to "Names~DOS" Examples:- "Ixus_125_#64.txt"
       to "Ixus_125_#64~txt" 0r "Ixus_125_#64&txt" and even DISKBOOT.BIN to DISKBOOT~BIN

## Once the "Individual" libusb camera drivers are created its then a fairy quick and
      easy process to then create further different versions that DO NOT require "INSTALLING"
      Instead they are "MERGED" into the windows Registry it takes less than a second to do.
      I have had NO problems and driver conflicts with "Merging" if you have the right privileges
      you are then able  to change any windows "Restricted" privileges without a system crash.

## Some of the libusb camera drivers have "Dummy" values, that windows will create when a
      Camera in the Multi-Camera Array is connected. An Example is the Usb-2 Hubs, so if it is
      blank that camera has never been connected to that Usb-2 Hub. etc....etc...

## Another important but UN-posted change I sometimes make is that I change the CHDK "SLEEP"
      values from the standards that are suitable for the "CHDK Legacy Cameras" to one more suitable
       for the much faster and newer Dig!c 4 and Dig!c 5 cameras, from memory sometimes this value is
      as small  as "1" sleep. This change will make a big difference when trying to control 64 cameras.
      [i.e. Experiment with the sleep values.]

I think that the "Sleep" values could also be another problem in mphx's recent post:-

"....But with 64 cameras , things change...."     Reply #325 on: 24/September/2015

 Re: Multi-camera setup project. « Reply #327 on: 25/September/2015
 http://chdk.setepontos.com/index.php?topic=11667.msg124821#msg124821

Important Notes:-

@@ As this is a very complex subject it's ONLY worthwhile doing for large and complex
      Multi-Camera Arrays and the LibUsb Camera Custom Drivers are always developed
      and tested on a PE or RE version of windows run totally in Ram, one simple typo will
      result in a system crash.

@@ Also in accordance with forum rule "Number 5" to use the PE or RE version of windows you will
       need to check the license compliance. I used the "Preview Versions" which have a much simpler
       and unrestricted Licence.

H-H

« Last Edit: 28 / September / 2015, 23:06:44 by Hardware_Hacker »

 

Related Topics