Lines Matching +full:- +full:function
10 1. ACM function
11 2. ECM function
12 3. ECM subset function
13 4. EEM function
14 5. FFS function
15 6. HID function
16 7. LOOPBACK function
17 8. MASS STORAGE function
18 9. MIDI function
19 10. NCM function
20 11. OBEX function
21 12. PHONET function
22 13. RNDIS function
23 14. SERIAL function
24 15. SOURCESINK function
25 16. UAC1 function (legacy implementation)
26 17. UAC2 function
27 18. UVC function
28 19. PRINTER function
29 20. UAC1 function (new API)
30 21. MIDI2 function
33 1. ACM function
36 The function is provided by usb_f_acm.ko module.
38 Function-specific configfs interface
39 ------------------------------------
41 The function name to use when creating the function directory is "acm".
42 The ACM function provides just one attribute in its function directory:
46 The attribute is read-only.
51 Testing the ACM function
52 ------------------------
72 2. ECM function
75 The function is provided by usb_f_ecm.ko module.
77 Function-specific configfs interface
78 ------------------------------------
80 The function name to use when creating the function directory is "ecm".
81 The ECM function provides these attributes in its function directory:
85 function instance
95 The ifname can be written to if the function is not bound. A write must be an
99 Testing the ECM function
100 ------------------------
112 3. ECM subset function
115 The function is provided by usb_f_ecm_subset.ko module.
117 Function-specific configfs interface
118 ------------------------------------
120 The function name to use when creating the function directory is "geth".
121 The ECM subset function provides these attributes in its function directory:
125 function instance
135 The ifname can be written to if the function is not bound. A write must be an
139 Testing the ECM subset function
140 -------------------------------
152 4. EEM function
155 The function is provided by usb_f_eem.ko module.
157 Function-specific configfs interface
158 ------------------------------------
160 The function name to use when creating the function directory is "eem".
161 The EEM function provides these attributes in its function directory:
165 function instance
175 The ifname can be written to if the function is not bound. A write must be an
179 Testing the EEM function
180 ------------------------
192 5. FFS function
195 The function is provided by usb_f_fs.ko module.
197 Function-specific configfs interface
198 ------------------------------------
200 The function name to use when creating the function directory is "ffs".
201 The function directory is intentionally empty and not modifiable.
206 process which implements the function proper). The gadget should be enabled
209 The FFS function provides just one attribute in its function directory:
213 The attribute is read-only and signals if the function is ready (1) to be
217 Testing the FFS function
218 ------------------------
220 On the device: start the function's userspace daemon, enable the gadget
222 On the host: use the USB function provided by the device
224 6. HID function
227 The function is provided by usb_f_hid.ko module.
229 Function-specific configfs interface
230 ------------------------------------
232 The function name to use when creating the function directory is "hid".
233 The HID function provides these attributes in its function directory:
255 $ echo -ne \\x05\\x01\\x09\\x06\\xa1.....
257 Testing the HID function
258 ------------------------
262 - create the gadget
263 - connect the gadget to a host, preferably not the one used
265 - run a program which writes to /dev/hidg<N>, e.g.
272 - observe the keystrokes from the gadget
274 7. LOOPBACK function
277 The function is provided by usb_f_ss_lb.ko module.
279 Function-specific configfs interface
280 ------------------------------------
282 The function name to use when creating the function directory is "Loopback".
283 The LOOPBACK function provides these attributes in its function directory:
290 Testing the LOOPBACK function
291 -----------------------------
295 host: test-usb (tools/usb/testusb.c)
297 8. MASS STORAGE function
300 The function is provided by usb_f_mass_storage.ko module.
302 Function-specific configfs interface
303 ------------------------------------
305 The function name to use when creating the function directory is "mass_storage".
306 The MASS STORAGE function provides these attributes in its directory:
310 stall Set to permit function to halt bulk endpoints.
336 read-only. This is implied if CD-ROM emulation
342 being a CD-ROM.
345 forced_eject This write-only file is useful only when
346 the function is active. It causes the backing
349 Any non-zero number of bytes written will
353 Testing the MASS STORAGE function
354 ---------------------------------
360 9. MIDI function
363 The function is provided by usb_f_midi.ko module.
365 Function-specific configfs interface
366 ------------------------------------
368 The function name to use when creating the function directory is "midi".
369 The MIDI function provides these attributes in its function directory:
380 Testing the MIDI function
381 -------------------------
390 $ arecordmidi -l
392 14:0 Midi Through Midi Through Port-0
394 $ arecordmidi -p 24:0 from_gadget.mid
398 $ aplaymidi -l
402 $ aplaymidi -p 20:0 to_host.mid
408 $ arecordmidi -l
412 $ arecordmidi -p 20:0 from_host.mid
416 $ aplaymidi -l
418 14:0 Midi Through Midi Through Port-0
421 $ aplaymidi -p24:0 to_gadget.mid
429 $ aplaymidi -l
431 14:0 Midi Through Midi Through Port-0
438 $ aplaymidi -p 128:0 file.mid
445 whatever is played at the gadget side with aplaymidi -l is audible
448 10. NCM function
451 The function is provided by usb_f_ncm.ko module.
453 Function-specific configfs interface
454 ------------------------------------
456 The function name to use when creating the function directory is "ncm".
457 The NCM function provides these attributes in its function directory:
461 function instance
473 The ifname can be written to if the function is not bound. A write must be an
477 Testing the NCM function
478 ------------------------
490 11. OBEX function
493 The function is provided by usb_f_obex.ko module.
495 Function-specific configfs interface
496 ------------------------------------
498 The function name to use when creating the function directory is "obex".
499 The OBEX function provides just one attribute in its function directory:
503 The attribute is read-only.
507 Testing the OBEX function
508 -------------------------
512 seriald -f /dev/ttyGS<Y> -s 1024
516 serialc -v <vendorID> -p <productID> -i<interface#> -a1 -s1024 \
517 -t<out endpoint addr> -r<in endpoint addr>
521 https://github.com/felipebalbi/usb-tools.git master
523 12. PHONET function
526 The function is provided by usb_f_phonet.ko module.
528 Function-specific configfs interface
529 ------------------------------------
531 The function name to use when creating the function directory is "phonet".
532 The PHONET function provides just one attribute in its function directory:
536 function instance
539 Testing the PHONET function
540 ---------------------------
546 http://www.spinics.net/lists/linux-usb/msg85689.html
550 git://git.gitorious.org/meego-cellular/phonet-utils.git
554 $ ./phonet -a 0x10 -i usbpn0
561 $ ./phonet -a 0x6c -i upnlink0
567 http://www.spinics.net/lists/linux-usb/msg85690.html
571 $ ./pnxmit -a 0x6c -r
575 $ ./pnxmit -a 0x10 -s 0x6c
582 $ ./pnxmit -a 0x10 -r
586 $ ./pnxmit -a 0x6c -s 0x10
588 13. RNDIS function
591 The function is provided by usb_f_rndis.ko module.
593 Function-specific configfs interface
594 ------------------------------------
596 The function name to use when creating the function directory is "rndis".
597 The RNDIS function provides these attributes in its function directory:
601 function instance
611 The ifname can be written to if the function is not bound. A write must be an
615 Testing the RNDIS function
616 --------------------------
628 14. SERIAL function
631 The function is provided by usb_f_gser.ko module.
633 Function-specific configfs interface
634 ------------------------------------
636 The function name to use when creating the function directory is "gser".
637 The SERIAL function provides just one attribute in its function directory:
641 The attribute is read-only.
645 Testing the SERIAL function
646 ---------------------------
651 echo VID PID >/sys/bus/usb-serial/drivers/generic/new_id
671 15. SOURCESINK function
674 The function is provided by usb_f_ss_lb.ko module.
676 Function-specific configfs interface
677 ------------------------------------
679 The function name to use when creating the function directory is "SourceSink".
680 The SOURCESINK function provides these attributes in its function directory:
685 isoc_maxpacket 0 - 1023 (fs), 0 - 1024 (hs/ss)
693 Testing the SOURCESINK function
694 -------------------------------
698 host: test-usb (tools/usb/testusb.c)
701 16. UAC1 function (legacy implementation)
704 The function is provided by usb_f_uac1_legacy.ko module.
706 Function-specific configfs interface
707 ------------------------------------
709 The function name to use when creating the function directory
711 The uac1 function provides these attributes in its function directory:
724 Testing the UAC1 function
725 -------------------------
731 aplay -l # should list our USB Audio Gadget
733 17. UAC2 function
736 The function is provided by usb_f_uac2.ko module.
738 Function-specific configfs interface
739 ------------------------------------
741 The function name to use when creating the function directory is "uac2".
742 The uac2 function provides these attributes in its function directory:
746 c_srate list of capture sampling rates (comma-separated)
754 c_hs_bint capture bInterval for HS/SS (1-4: fixed, 0: auto)
757 p_srate list of playback sampling rates (comma-separated)
764 p_hs_bint playback bInterval for HS/SS (1-4: fixed, 0: auto)
765 req_number the number of pre-allocated request for both capture
774 p_fu_vol_name playback function unit name
785 Testing the UAC2 function
786 -------------------------
789 host: aplay -l # should list our USB Audio Gadget
791 This function does not require real hardware support, it just
796 $ arecord -f dat -t wav -D hw:2,0 | aplay -D hw:0,0 &
800 $ arecord -f dat -t wav -D hw:CARD=UAC2Gadget,DEV=0 | \
801 aplay -D default:CARD=OdroidU3
803 18. UVC function
806 The function is provided by usb_f_uvc.ko module.
808 Function-specific configfs interface
809 ------------------------------------
811 The function name to use when creating the function directory is "uvc".
812 The uvc function provides these attributes in its function directory:
845 # ln -s header/h class/fs
846 # ln -s header/h class/ss
847 # mkdir -p functions/uvc.usb0/streaming/uncompressed/u/360p
856 # ln -s ../../uncompressed/u
858 # ln -s ../../header/h
860 # ln -s ../../header/h
862 # ln -s ../../header/h
865 Testing the UVC function
866 ------------------------
870 # uvc-gadget -u /dev/video<uvc video node #> -v /dev/video<vivid video node #>
872 where uvc-gadget is this program:
873 http://git.ideasonboard.org/uvc-gadget.git
877 http://www.spinics.net/lists/linux-usb/msg99220.html
881 luvcview -f yuv
883 19. PRINTER function
886 The function is provided by usb_f_printer.ko module.
888 Function-specific configfs interface
889 ------------------------------------
891 The function name to use when creating the function directory is "printer".
892 The printer function provides these attributes in its function directory:
899 Testing the PRINTER function
900 ----------------------------
906 # ls -l /devices/virtual/usb_printer_gadget/
916 host->device transmission:
926 device->host transmission::
938 20. UAC1 function (virtual ALSA card, using u_audio API)
941 The function is provided by usb_f_uac1.ko module.
945 Function-specific configfs interface
946 ------------------------------------
948 The function name to use when creating the function directory is "uac1".
949 The uac1 function provides these attributes in its function directory:
953 c_srate list of capture sampling rates (comma-separated)
961 p_srate list of playback sampling rates (comma-separated)
968 req_number the number of pre-allocated requests for both capture
983 Testing the UAC1 function
984 -------------------------
987 host: aplay -l # should list our USB Audio Gadget
989 This function does not require real hardware support, it just
994 $ arecord -f dat -t wav -D hw:2,0 | aplay -D hw:0,0 &
998 $ arecord -f dat -t wav -D hw:CARD=UAC1Gadget,DEV=0 | \
999 aplay -D default:CARD=OdroidU3
1002 21. MIDI2 function
1005 The function is provided by usb_f_midi2.ko module.
1011 Function-specific configfs interface
1012 ------------------------------------
1014 The function name to use when creating the function directory is "midi2".
1015 The midi2 function provides these attributes in its function directory
1016 as the card top-level information:
1040 represents the Function Block for Block 0 information.
1044 name Function Block name string
1047 first_group The first UMP Group number (0-15)
1048 num_groups The number of groups in this FB (1-16)
1049 midi1_first_group The first UMP Group number for MIDI 1.0 (0-15)
1050 midi1_num_groups The number of groups for MIDI 1.0 (0-16)
1051 ui_hint UI-hint of this FB
1053 midi_ci_verison Supported MIDI-CI version number (8 bit)
1054 is_midi1 Legacy MIDI 1.0 device (0-2)
1062 If multiple Function Blocks are required, you can add more Function
1064 Function Block number (1, 2, ....). The FB subdirectories can be
1065 dynamically removed, too. Note that the Function Block numbers must be
1075 Testing the MIDI2 function
1076 --------------------------
1102 $ aconnect -o
1107 $ aplaymidi -p 20:1 to_host.mid
1111 $ aconnect -i
1116 $ arecordmidi -p 24:1 from_gadget.mid
1118 If you have a UMP-capable application, you can use the UMP port to
1122 $ aseqdump -u 2 -p 24:1
1133 $ arecordmidi -p 20:1 from_host.mid
1137 $ aplaymidi -p 24:1 to_gadget.mid
1141 Function Block 0.
1146 $ amixer -c1 contents
1148 ; type=INTEGER,access=r--v----,values=1,min=0,max=2,step=0