2015年3月30日月曜日

Scripts to test

- use locally compiled objects in a tree.
- allow to test without 'make install'.
- only bus-id is needed to be specified to test.
- other options and arguments are pre-set. 

download (  application side |  device side )

app: on application side computer
dev: on device side computer
both: both of them

0) Modify settings.sh first (both)
DIR
Top directory of kernel source which includes compiled objects.
SVR
Address of a server.
PORT
TCP port number of a server.
SSL_FLG
Whether to use SSL.
WS_FLG
Whether to use WebSocket.
PROXY_FLG
Whether to use proxy.
PROXY_URL
URL of HTTP proxy.
DBG_FLG
Enables debug for tools.
DBG_FLGS
Debug flags for kernel modules.

1) Create self signed certificate files if use SSL (OPTIONAL)
both:$ ./cert_create.sh

2) Insert kernel modules
TCP in kernel mode
both:# ./insmod_kx.sh
TCP in user mode
both:# ./insmod_ux.sh

3a) Attach from application side
dev:# ./usbipd.sh
- start daemon
dev:# ./usbip_list.sh
- list local devices
dev:# ./usbip_bind.sh <bis-id>
- bind a device
app:# ./usbip_list.sh
- list attachable devices at remote
app:# ./usbip_attach.sh <bus-id>
- attach a device
app:# ./usbip_port.sh
- list attached devices
app:# ./usbip_detach.sh <port-nr>
- detach the device
dev:# ./usbip_unbind.sh <bus-id>
- unbind the device

3b) Connect from device side
app:# ./usbipa.sh
- start daemon
dev:# ./usbip_list.sh
- list local devices
dev:# ./usbip_connect.sh <bis-id>
- connect a device to remote
dev:# ./usbip_disconnect.sh <bus-id>
- disconnect the device from remote
4) Remove kernel modules
# ./rmmod.sh

NOTE: using userspace transfer mode, attach and connect will continue runnning and not return. Pleae use other window to detach or disconnect.

0 件のコメント:

コメントを投稿