aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2014-12-16 08:56:36 -0500
committerFelipe Balbi <balbi@ti.com>2015-01-12 13:13:25 -0500
commitda2907d2b08c2495c2e39f799b9ccbf76fd1aa58 (patch)
tree59ebedfdce13b8d0ebc9b45a38f1afc9af17dbf7
parentd81b85dcf186f6fa4b59e5b8181e85366ebfdd61 (diff)
Documentation: usb: PHONET function testing
Summary of how to test PHONET function of USB gadget. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--Documentation/usb/gadget-testing.txt64
1 files changed, 64 insertions, 0 deletions
diff --git a/Documentation/usb/gadget-testing.txt b/Documentation/usb/gadget-testing.txt
index c8ae54022ec8..02d4366a847d 100644
--- a/Documentation/usb/gadget-testing.txt
+++ b/Documentation/usb/gadget-testing.txt
@@ -12,6 +12,7 @@ provided by gadgets.
129. MIDI function 129. MIDI function
1310. NCM function 1310. NCM function
1411. OBEX function 1411. OBEX function
1512. PHONET function
15 16
16 17
171. ACM function 181. ACM function
@@ -429,3 +430,66 @@ On host: serialc -v <vendorID> -p <productID> -i<interface#> -a1 -s1024 \
429where seriald and serialc are Felipe's utilities found here: 430where seriald and serialc are Felipe's utilities found here:
430 431
431https://git.gitorious.org/usb/usb-tools.git master 432https://git.gitorious.org/usb/usb-tools.git master
433
43412. PHONET function
435===================
436
437The function is provided by usb_f_phonet.ko module.
438
439Function-specific configfs interface
440------------------------------------
441
442The function name to use when creating the function directory is "phonet".
443The PHONET function provides just one attribute in its function directory:
444
445 ifname - network device interface name associated with this
446 function instance
447
448Testing the PHONET function
449---------------------------
450
451It is not possible to test the SOCK_STREAM protocol without a specific piece
452of hardware, so only SOCK_DGRAM has been tested. For the latter to work,
453in the past I had to apply the patch mentioned here:
454
455http://www.spinics.net/lists/linux-usb/msg85689.html
456
457These tools are required:
458
459git://git.gitorious.org/meego-cellular/phonet-utils.git
460
461On the host:
462
463$ ./phonet -a 0x10 -i usbpn0
464$ ./pnroute add 0x6c usbpn0
465$./pnroute add 0x10 usbpn0
466$ ifconfig usbpn0 up
467
468On the device:
469
470$ ./phonet -a 0x6c -i upnlink0
471$ ./pnroute add 0x10 upnlink0
472$ ifconfig upnlink0 up
473
474Then a test program can be used:
475
476http://www.spinics.net/lists/linux-usb/msg85690.html
477
478On the device:
479
480$ ./pnxmit -a 0x6c -r
481
482On the host:
483
484$ ./pnxmit -a 0x10 -s 0x6c
485
486As a result some data should be sent from host to device.
487Then the other way round:
488
489On the host:
490
491$ ./pnxmit -a 0x10 -r
492
493On the device:
494
495$ ./pnxmit -a 0x6c -s 0x10