USB subsystem: Difference between revisions
No edit summary Tag: Reverted |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 24: | Line 24: | ||
List of supported NICs in <code>/fs/mp/etc/usblauncher/rules_otg.lua</code> | List of supported NICs in <code>/fs/mp/etc/usblauncher/rules_otg.lua</code> | ||
< | <pre> | ||
nic_devices = { | nic_devices = { | ||
device(0x0b95, 0x7720); -- CISCO linksys USB300M ethernet dongle | device(0x0b95, 0x7720); -- CISCO linksys USB300M ethernet dongle | ||
Line 36: | Line 36: | ||
removal"/fs/mp/etc/usblauncher/netstop.sh"; | removal"/fs/mp/etc/usblauncher/netstop.sh"; | ||
} | } | ||
</ | </pre> | ||
Content of <code>/fs/mp/etc/usblauncher/netstart.sh</code> | Content of <code>/fs/mp/etc/usblauncher/netstart.sh</code> | ||
Line 50: | Line 50: | ||
</pre> | </pre> | ||
To get a working usb network on "production" OS, copy <code>devnp-asix.so</code> from [[reformat package]] to <code>/fs/mp/lib/dll/devnp-asix.so</code> | {{#fas:circle-info}} To get a working usb network on "production" OS, copy <code>devnp-asix.so</code> from [[reformat package]] to <code>/fs/mp/lib/dll/devnp-asix.so</code> | ||
<pre> | <pre> | ||
Line 66: | Line 66: | ||
</pre> | </pre> | ||
You should get <code>devh-usb.so</code> lib from QNX SDP. | {{#fas:circle-info}} You should get <code>devh-usb.so</code> lib from QNX SDP. | ||
<code>io-hid</code> usage: | <code>io-hid</code> usage: | ||
Line 90: | Line 90: | ||
</pre> | </pre> | ||
After launch <code>io-hid</code> all HID events will be grabbed by libscreen. | {{#fas:circle-info}} After launch <code>io-hid</code> all HID events will be grabbed by libscreen. | ||
Use <code>hidview</code> tool for get info about connected HID devices. | Use <code>[https://openqnx.com/static/neutrino/utilities/h/hidview.html hidview]</code> tool for get info about connected HID devices. |
Latest revision as of 00:32, 27 May 2024
USB subsystem[edit | edit source]
usblauncher[edit | edit source]
/fs/mp/etc/usblauncher/ ├── iap2ea.lua ├── iap2.lua ├── iap2ncm.lua ├── netstart.sh ├── netstop.sh ├── override.lua ├── rules.lua ├── rules_otg.lua ├── startncm-molex.sh ├── startncm.sh ├── stopncm.sh └── umass.lua
Useful commands:
usb -vvv -N /dev/otg/io-usb-otg
USB-LAN ethernet[edit | edit source]
List of supported NICs in /fs/mp/etc/usblauncher/rules_otg.lua
nic_devices = { device(0x0b95, 0x7720); -- CISCO linksys USB300M ethernet dongle device(0x0b95, 0x772b); -- Insignia NS-PU98505 ethernet dongle device(0x2001, 0x3c05); -- D-Link DUB-E100 (revB1) ethernet dongle device(0x2001, 0x1a02); -- D-Link DUB-E100 (revC1) ethernet dongle } foreach (nic_devices) { start"/fs/mp/etc/usblauncher/netstart.sh busnum=$(busno),devnum=$(devno),path=$(USB_PATH),ign_remove /fs/mp/lib/dll/devnp-asix.so"; removal"/fs/mp/etc/usblauncher/netstop.sh"; }
Content of /fs/mp/etc/usblauncher/netstart.sh
#!/bin/sh IFACE=ax0 IPADDR=192.168.1.26 mount -T io-pkt -o $1 $2 ifconfig $IFACE $IPADDR netmask 255.255.255.0 echo "debug $IFACE done."
To get a working usb network on "production" OS, copy devnp-asix.so
from reformat package to /fs/mp/lib/dll/devnp-asix.so
1. pidin ar | grep usblauncher_otg 2. usblauncher_otg -S1 -c /fs/mp/etc/usblauncher/rules_otg.lua -M /fs/mp/etc/mcd.mnt -s /fs/mp/lib/dll/pubs/ -n/dev/otg/io-usb-otg -vvvv -b -eErtl /fs/mp/etc/usblauncher/netstart.sh busnum=0x01,devnum=0x2,path=/dev/otg/io-usb-otg,ign_remove /fs/mp/lib/dll/devnp-asix.so
USB-HID[edit | edit source]
Run USB HID server:
io-hid -d devh-usb.so
You should get devh-usb.so
lib from QNX SDP.
io-hid
usage:
# use io-hid io-hid - HID Server ( Human Interface Device ) Usage: io-hid [options] & Options: -d dll [opts] Device DLL to load and options to pass to the DLL. -n name Set server name. default "/dev/io-hid/io-hid" -v Be verbose -V Display server version Examples: USB HID devices, PS/2 mouse, Serial mouse on COM1 directly, PS/2 keyboard io-hid -dusb -dps2ser ps2mouse:mousedev:msoft:uart,1:kbd:kbddev &
After launch io-hid
all HID events will be grabbed by libscreen.
Use hidview
tool for get info about connected HID devices.