diff options
-rw-r--r-- | Documentation/usb/gadget-testing.txt | 64 |
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. | |||
12 | 9. MIDI function | 12 | 9. MIDI function |
13 | 10. NCM function | 13 | 10. NCM function |
14 | 11. OBEX function | 14 | 11. OBEX function |
15 | 12. PHONET function | ||
15 | 16 | ||
16 | 17 | ||
17 | 1. ACM function | 18 | 1. ACM function |
@@ -429,3 +430,66 @@ On host: serialc -v <vendorID> -p <productID> -i<interface#> -a1 -s1024 \ | |||
429 | where seriald and serialc are Felipe's utilities found here: | 430 | where seriald and serialc are Felipe's utilities found here: |
430 | 431 | ||
431 | https://git.gitorious.org/usb/usb-tools.git master | 432 | https://git.gitorious.org/usb/usb-tools.git master |
433 | |||
434 | 12. PHONET function | ||
435 | =================== | ||
436 | |||
437 | The function is provided by usb_f_phonet.ko module. | ||
438 | |||
439 | Function-specific configfs interface | ||
440 | ------------------------------------ | ||
441 | |||
442 | The function name to use when creating the function directory is "phonet". | ||
443 | The PHONET function provides just one attribute in its function directory: | ||
444 | |||
445 | ifname - network device interface name associated with this | ||
446 | function instance | ||
447 | |||
448 | Testing the PHONET function | ||
449 | --------------------------- | ||
450 | |||
451 | It is not possible to test the SOCK_STREAM protocol without a specific piece | ||
452 | of hardware, so only SOCK_DGRAM has been tested. For the latter to work, | ||
453 | in the past I had to apply the patch mentioned here: | ||
454 | |||
455 | http://www.spinics.net/lists/linux-usb/msg85689.html | ||
456 | |||
457 | These tools are required: | ||
458 | |||
459 | git://git.gitorious.org/meego-cellular/phonet-utils.git | ||
460 | |||
461 | On the host: | ||
462 | |||
463 | $ ./phonet -a 0x10 -i usbpn0 | ||
464 | $ ./pnroute add 0x6c usbpn0 | ||
465 | $./pnroute add 0x10 usbpn0 | ||
466 | $ ifconfig usbpn0 up | ||
467 | |||
468 | On the device: | ||
469 | |||
470 | $ ./phonet -a 0x6c -i upnlink0 | ||
471 | $ ./pnroute add 0x10 upnlink0 | ||
472 | $ ifconfig upnlink0 up | ||
473 | |||
474 | Then a test program can be used: | ||
475 | |||
476 | http://www.spinics.net/lists/linux-usb/msg85690.html | ||
477 | |||
478 | On the device: | ||
479 | |||
480 | $ ./pnxmit -a 0x6c -r | ||
481 | |||
482 | On the host: | ||
483 | |||
484 | $ ./pnxmit -a 0x10 -s 0x6c | ||
485 | |||
486 | As a result some data should be sent from host to device. | ||
487 | Then the other way round: | ||
488 | |||
489 | On the host: | ||
490 | |||
491 | $ ./pnxmit -a 0x10 -r | ||
492 | |||
493 | On the device: | ||
494 | |||
495 | $ ./pnxmit -a 0x6c -s 0x10 | ||