How to get service, path, interface parameters for QDBusInterface class ?
-
Hi every body !
I have an usb device (code : DIO-0808LY-USB) attach to host :
Laptop - x64 - linux ubuntu 23.04,
Jetson agx orin - arm64 - linux ubuntu 20.04.In old source code (run on an embeded board), they used QDBusInterface to connect and control, and now , I think I will use QDbusInterface too.
QDBusInterface's constructor need 3 string parameters is service, path and interface but i don't known how to get value of that parameters from my device.When I attach that device to host, a file will create on /dev/bus/usb/003/file. File name is a number and will count up after each device attach.
When I run command "lsusb", it display is :
Bus 003 Device 005: ID 06ce:a302 Contec DIO-0808LY-USBWhen I run command : usb-devices. It display is :
T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=06ce ProdID=a302 Rev=ba.ca
S: Manufacturer=Contec Co.,ltd
S: Product=DIO-0808LY-USB
S: SerialNumber=1002121068D0
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 4 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0msI think path is /dev/bus/usb/003/file but not sure.
How to get 3 string parameters from an specific usb device.
Help me, please ! -
Hi every body !
I have an usb device (code : DIO-0808LY-USB) attach to host :
Laptop - x64 - linux ubuntu 23.04,
Jetson agx orin - arm64 - linux ubuntu 20.04.In old source code (run on an embeded board), they used QDBusInterface to connect and control, and now , I think I will use QDbusInterface too.
QDBusInterface's constructor need 3 string parameters is service, path and interface but i don't known how to get value of that parameters from my device.When I attach that device to host, a file will create on /dev/bus/usb/003/file. File name is a number and will count up after each device attach.
When I run command "lsusb", it display is :
Bus 003 Device 005: ID 06ce:a302 Contec DIO-0808LY-USBWhen I run command : usb-devices. It display is :
T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=06ce ProdID=a302 Rev=ba.ca
S: Manufacturer=Contec Co.,ltd
S: Product=DIO-0808LY-USB
S: SerialNumber=1002121068D0
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 4 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0msI think path is /dev/bus/usb/003/file but not sure.
How to get 3 string parameters from an specific usb device.
Help me, please !@Van-Duong D-Bus is something completely different than
/dev/bus
. These two are completely unrelated.If you do have some system service which works with your USB device and exposes a D-Bus interface, you need to refer to its documentation, it will tell you the paths.
Alternatively, try running
dbus-monitor
when connecting your device. If there is some D-Bus interface handling for it already on your system, you will see some messages there. -
@Van-Duong D-Bus is something completely different than
/dev/bus
. These two are completely unrelated.If you do have some system service which works with your USB device and exposes a D-Bus interface, you need to refer to its documentation, it will tell you the paths.
Alternatively, try running
dbus-monitor
when connecting your device. If there is some D-Bus interface handling for it already on your system, you will see some messages there.@sierdzio
I have not experience about dbus. I converting source code from old linux embedded board to a new device. String parameters of old device is not compatible with new device and return invalid connection. But now, I cannot contact to old developers and have not documents about it too.
I will trying with dbus-monitor.
Have you a tool, trick or other ways to help me find parameters from connected device ?
Thank you so much ! -
@sierdzio
I have not experience about dbus. I converting source code from old linux embedded board to a new device. String parameters of old device is not compatible with new device and return invalid connection. But now, I cannot contact to old developers and have not documents about it too.
I will trying with dbus-monitor.
Have you a tool, trick or other ways to help me find parameters from connected device ?
Thank you so much !@Van-Duong said in How to get service, path, interface parameters for QDBusInterface class ?:
Have you a tool, trick or other ways to help me find parameters from connected device ?
No,
dbus-monitor
is the only thing that comes to my mind. -
@Van-Duong said in How to get service, path, interface parameters for QDBusInterface class ?:
Have you a tool, trick or other ways to help me find parameters from connected device ?
No,
dbus-monitor
is the only thing that comes to my mind.