How does VLC assigns friendly name when I have two same devices - usb

How does VLC assigns the friendly name when I have two same devices? - The following are the two capture devices and the VLC assigns the friendly name as device 1: "AV.io HDMI Video" and device 2: "AV.io HDMI Video #1". I need a way to find it instead trying one by one manually.
Availability=
Caption=AV.io HDMI Video
ClassGuid={ca3e7ab9-b4c3-4ae6-8251-579ef933890f}
CompatibleID={"USB\Class_0e&SubClass_03&Prot_00","USB\Class_0e&SubClass_03","USB\Class_0e"}
ConfigManagerErrorCode=0
ConfigManagerUserConfig=FALSE
CreationClassName=Win32_PnPEntity
Description=USB Video Device
DeviceID=USB\VID_2B77&PID_3601&MI_01\6&243423424&0&0001
ErrorCleared=
ErrorDescription=
HardwareID={"USB\VID_2B77&PID_3601&REV_0000&MI_01","USB\VID_2B77&PID_3601&MI_01"}
InstallDate=
LastErrorCode=
Manufacturer=Microsoft
Name=AV.io HDMI Video
PNPClass=Camera
PNPDeviceID=USB\VID_2B77&PID_3601&MI_01\6&243423424&0&0001
PowerManagementCapabilities=
PowerManagementSupported=
Present=TRUE
Service=usbvideo
Status=OK
StatusInfo=
SystemCreationClassName=Win32_ComputerSystem
SystemName=OTT-TEST
Availability=
Caption=AV.io HDMI Video
ClassGuid={ca3e7ab9-b4c3-4ae6-8251-579ef933890f}
CompatibleID={"USB\Class_0e&SubClass_03&Prot_00","USB\Class_0e&SubClass_03","USB\Class_0e"}
ConfigManagerErrorCode=0
ConfigManagerUserConfig=FALSE
CreationClassName=Win32_PnPEntity
Description=USB Video Device
DeviceID=USB\VID_2B77&PID_3601&MI_01\7&1FD3227C&0&0001
ErrorCleared=
ErrorDescription=
HardwareID={"USB\VID_2B77&PID_3601&REV_0000&MI_01","USB\VID_2B77&PID_3601&MI_01"}
InstallDate=
LastErrorCode=
Manufacturer=Microsoft
Name=AV.io HDMI Video
PNPClass=Camera
PNPDeviceID=USB\VID_2B77&PID_3601&MI_01\7&1FD3227C&0&0001
PowerManagementCapabilities=
PowerManagementSupported=
Present=TRUE
Service=usbvideo
Status=OK
StatusInfo=
SystemCreationClassName=Win32_ComputerSystem
SystemName=OTT-TEST

Related

How to use symlinked cdc-wdm device with ModemManager?

We have created udev rules to make the device naming consistent for the cdc-wdm devices, no matter in what order our lte usb devices are registered at the usb bus. We had the issue that we could not rename the cdc-wdm devices, which I understand is some limitiation of the usbmisc driver. So we ended up creating symlinks
ACTION!="add|change", GOTO="mm_naming_rules_end"
# only rename the interfaces if the names are wrong
SUBSYSTEM=="usbmisc", ACTION=="add", KERNELS=="1-1.1.2", KERNEL=="cdc-wdm*", SYMLINK+="cdc-lte0"
SUBSYSTEM=="usbmisc", ACTION=="add", KERNELS=="1-1.1.4", KERNEL=="cdc-wdm*", SYMLINK+="cdc-lte1"
LABEL="mm_naming_rules_end"
But ModemManager does not recoqnize those devices when we use that in our nmconnection file
[connection]
id=wwan0
uuid=280d17ff-f4d4-4f47-a6e6-75ba32bc57c2
type=gsm
interface-name=cdc-lte0
permissions=
[gsm]
#apn=internet
[ipv4]
dns-search=
method=auto
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto
[proxy]

Vulkan physical device

I'm learning Vulkan by API spec (http://vulkan-spec-chunked.ahcox.com/ch02s09.html), and I'm little confused about how physical devices are in Vulkan. I do have only one intel physical video card device, but vkEnumeratePhysicalDevices returns count of 2. The devices are identical, but the queue flags seems differ, and the queue flags are undocumented (actually they are, but only to flag 8, in second queue I do have the flag values 16 and 32).
typedef enum VkQueueFlagBits {
VK_QUEUE_GRAPHICS_BIT = 0x00000001,
VK_QUEUE_COMPUTE_BIT = 0x00000002,
VK_QUEUE_TRANSFER_BIT = 0x00000004,
VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008,
} VkQueueFlagBits;
here is the output of my vulkan code:
GPU count: 2 ( physical devices )
Physical Device 0:
Device API version: 1.0.42 - 4194346
Device Vendor Id: 0x8086
Device Id: 1916
Device Driver version: 0.0.1 - 1
Device type: 1
Device Name: Intel(R) HD Graphics 520 (Skylake GT2)
Device Pipeline UID: f557cfd4
Queue Properties:
Flags: 7
Count: 1
ts Valid Bits: 24
Physical Device 1:
Device API version: 1.0.42 - 4194346
Device Vendor Id: 0x8086
Device Id: 1916
Device Driver version: 0.0.1 - 1
Device type: 1
Device Name: Intel(R) HD Graphics 520 (Skylake GT2)
Device Pipeline UID: f557cfd4
Queue Properties:
Flags: 49
Count: 0
ts Valid Bits: 1
Someone can help me understand why there is 2 physical devices for the same real device and the missing flags ?
The count=0 of the second device is curious. More seriously, its flags and tsVB values are corrupted (49 is not an valid value for flags and 1 not valid for tsVB).
This pretty much boils down to there being one extraneous *.json file on your system.
These *.json files store informations about ICDs present on the machine. They are stored in standard location(s).
vkEnumeratePhysicalDevices+vkGetPhysicalDeviceProperties are relatively dumb commands doing nothing much else than reading said *.json file(s) and returning its contents. I think though that calling something "real" like vkCreateDevice would not work on the badly installed driver.
What exactly happened to creare this problem is up to your curiosity to explore. For starters I believe on Linux distros there is a command to map a file to its originating package. It will probably be something about bad cleanup of previous driver, or possibly bug in the installation script of the new one. At least one person had this problem before.
Based on what I explained here, I believe this is relatively benign bug. The first device should work just fine. And you can just ignore the second one. Or simply delete its *.json manifest to prevent it from showing up in vkEnumeratePD.

Unavailable Camera control API functions, Sony Development SDK, Camera WX500

I am trying to modify the CameraRemoteSampleApp provided by the Sony SDK to add full control over the aperture, iso, and shutter speed to the interface.
At this point however all the relevant functions are off limits.
The documentation defines these functions as "available if the latest version of the PlayMemories Smart Remote Control is installed and in use".
a) The smart remote control is installed and running, with the smartphone connected through it and wifi (Samsung Galaxy SIII).
b) I can take photos with the SDK Sample App.
c) Using the available API list shows that the functions exist but are not available.
d) Calling one of those functions directly returns "Not Available Now". This error code is not present in the documentation.
How can one get access to ISO/F-number/Shutter speed functions in this case?
JSON requests and responses:
Request Methods: {"id":1,"method":"getMethodTypes","version":"1.0","params":[""]}
Response: {"id":1,"results":[["actTakePicture",[],["string*"],"1.0"],["actZoom",["string","string"],["int"],"1.0"],["awaitTakePicture",[],["string*"],"1.0"],["cancelTouchAFPosition",[],[],"1.0"],["getApplicationInfo",[],["string","string"],"1.0"],["getAvailableApiList",[],["string*"],"1.0"],["getAvailableExposureCompensation",[],["int","int","int","int"],"1.0"],["getAvailableExposureMode",[],["string","string*"],"1.0"],["getAvailableFNumber",[],["string","string*"],"1.0"],["getAvailableFlashMode",[],["string","string*"],"1.0"],["getAvailableFocusMode",[],["string","string*"],"1.0"],["getAvailableIsoSpeedRate",[],["string","string*"],"1.0"],["getAvailableLiveviewSize",[],["string","string*"],"1.0"],["getAvailablePostviewImageSize",[],["string","string*"],"1.0"],["getAvailableSelfTimer",[],["int","int*"],"1.0"],["getAvailableShootMode",[],["string","string*"],"1.0"],["getAvailableShutterSpeed",[],["string","string*"],"1.0"],["getAvailableWhiteBalance",[],["{\"whiteBalanceMode\":\"string\", \"colorTemperature\":\"int\"}","{\"whiteBalanceMode\":\"string\", \"colorTemperatureRange\":\"int*\"}*"],"1.0"],["getEvent",["bool"],["{\"type\":\"string\", \"names\":\"string*\"}","{\"type\":\"string\", \"cameraStatus\":\"string\"}","{\"type\":\"string\", \"zoomPosition\":\"int\", \"zoomNumberBox\":\"int\", \"zoomIndexCurrentBox\":\"int\", \"zoomPositionCurrentBox\":\"int\"}","{\"type\":\"string\", \"liveviewStatus\":\"bool\"}","{\"type\":\"string\", \"liveviewOrientation\":\"string\"}","{\"type\":\"string\", \"takePictureUrl\":\"string*\"}*","{\"type\":\"string\", \"continuousError\":\"string\", \"isContinued\":\"bool\"}*","{\"type\":\"string\", \"triggeredError\":\"string*\"}","{\"type\":\"string\", \"sceneRecognition\":\"string\", \"steadyRecognition\":\"string\", \"motionRecognition\":\"string\"}","{\"type\":\"string\", \"formatResult\":\"string\"}","{\"type\":\"string\", \"storageID\":\"string\", \"recordTarget\":\"bool\", \"numberOfRecordableImages\":\"int\", \"recordableTime\":\"int\", \"storageDescription\":\"string\"}*","{\"type\":\"string\", \"currentBeepMode\":\"string\", \"beepModeCandidates\":\"string*\"}","{\"type\":\"string\", \"currentCameraFunction\":\"string\", \"cameraFunctionCandidates\":\"string*\"}","{\"type\":\"string\", \"currentMovieQuality\":\"string\", \"movieQualityCandidates\":\"string*\"}","{\"type\":\"string\", \"checkAvailability\":\"bool\", \"currentAspect\":\"string\", \"currentSize\":\"string\"}","{\"type\":\"string\", \"cameraFunctionResult\":\"string\"}","{\"type\":\"string\", \"currentSteadyMode\":\"string\", \"steadyModeCandidates\":\"string*\"}","{\"type\":\"string\", \"currentViewAngle\":\"int\", \"viewAngleCandidates\":\"int*\"}","{\"type\":\"string\", \"currentExposureMode\":\"string\", \"exposureModeCandidates\":\"string*\"}","{\"type\":\"string\", \"currentPostviewImageSize\":\"string\", \"postviewImageSizeCandidates\":\"string*\"}","{\"type\":\"string\", \"currentSelfTimer\":\"int\", \"selfTimerCandidates\":\"int*\"}","{\"type\":\"string\", \"currentShootMode\":\"string\", \"shootModeCandidates\":\"string*\"}","{\"type\":\"string\", \"currentAELock\":\"bool\", \"aeLockCandidates\":\"bool*\"}","{\"type\":\"string\", \"checkAvailability\":\"bool\", \"currentBracketShootMode\":\"string\", \"currentBracketShootModeOption\":\"string\"}","{\"type\":\"string\", \"checkAvailability\":\"bool\", \"currentCreativeStyle\":\"string\", \"currentCreativeStyleContrast\":\"int\", \"currentCreativeStyleSaturation\":\"int\", \"currentCreativeStyleSharpness\":\"int\"}","{\"type\":\"string\", \"currentExposureCompensation\":\"int\", \"maxExposureCompensation\":\"int\", \"minExposureCompensation\":\"int\", \"stepIndexOfExposureCompensation\":\"int\"}","{\"type\":\"string\", \"currentFlashMode\":\"string\", \"flashModeCandidates\":\"string*\"}","{\"type\":\"string\", \"currentFNumber\":\"string\", \"fNumberCandidates\":\"string*\"}","{\"type\":\"string\", \"currentFocusMode\":\"string\", \"focusModeCandidates\":\"string*\"}","{\"type\":\"string\", \"currentIsoSpeedRate\":\"str
Request Versions: {"id":2,"method":"getVersions","version":"1.0","params":[]}
Response: {"id":2,"result":[["1.0"]]}
Request API: {"id":3,"method":"getAvailableApiList","version":"1.0","params":[]}
Response: {"id":3,"result":[["getVersions","getMethodTypes","getApplicationInfo","getAvailableApiList","getEvent","actTakePicture","stopRecMode","startLiveview","stopLiveview","actZoom","setSelfTimer","getSelfTimer","getAvailableSelfTimer","getSupportedSelfTimer","setExposureCompensation","getExposureCompensation","getAvailableExposureCompensation","getSupportedExposureCompensation","setShootMode","getShootMode","getAvailableShootMode","getSupportedShootMode","getSupportedFlashMode"]]}
Request Flash: {"id":5,"method":"getSupportedFlashMode","version":"1.0","params":[]}
Response Flash: {"id":5,"result":[["off","auto","on","slowSync","rearSync"]]}
Request speed: {"id":5,"method":"getAvailableShutterSpeed","version":"1.0","params":[]}
Response speed: {"id":5,"error":[1,"Not Available Now"]}
There are a couple things that you can check first:
Do you have the latest version of Smart Remote Control installed?
Do you have the latest firmware update for your camera?

Message protocol for embedded device

I'm building an embedded device with a couple of sensors. The device will 'stream' digital data from these sensors over Bluetooth or USB.
Most of the communication will be from the embedded device to the host. The host will infrequently be sending control messages, to control the gain etc.
Since the physical and data link layers are taken care of, I'm looking for a simple message protocol that will make it easy to develop user applications to process/display data on the host computer. Does anyone have any suggestions?
A simple text protocol may be the best for this application.
Use the communication channel as a bi-directional serial pipe.
The device can stream sensor values in ASCII (text) format, separated by commas, with each set separated by the newline character. The rate is preferably set by the host.
For example,
21204,32014 (new line character '\n' - 0x0A) at the end of each line
21203,32014
21202,32011
....
This makes it easier to test, to stream the values to a file, import in to a spreadsheet etc.
Similarly commands to the device too, is best done in text.
SET GAIN_1 2 ( sent by host )
OK ( reply by device )
SET GAIN_2 4 (sent by host )
OK ( reply by device )
SET GAIN_9 2 (sent by host )
ERROR ( reply by device if it does not understand)
SET RATE 500 ( set the sensor dump rate to every 500 ms )
OK

USB driver bus relation (virtual Port number)

I want to get the virtual port number of usb driver. This property can be found in device manager name as bus relation or children.
if (SetupDiGetDeviceRegistryProperty(devInfo,
&devInfoData,
SPDRP_ADDRESS,
NULL,
(PBYTE)&dwAddr, //szName,
sizeof(dwAddr),
NULL))
{
int len=_stprintf( szBuf2,TEXT("\n%d"), dwAddr);
Can anybody guide.
If your on Windows Mobile or Windows CE, you should find the active driver in HKEY_LOCAL_MACHINE\drivers\active. Enumerate down the active drivers till you find the USB driver by "Key" and the name of the driver should be its port name, i.e. USB1 or COM8 etc.