linux/Documentation/input/yealink.txt
<<
>>
Prefs
   1Driver documentation for yealink usb-p1k phones
   2
   30. Status
   4~~~~~~~~~
   5The p1k is a relatively cheap usb 1.1 phone with:
   6  - keyboard            full support, yealink.ko / input event API
   7  - LCD                 full support, yealink.ko / sysfs API
   8  - LED                 full support, yealink.ko / sysfs API
   9  - dialtone            full support, yealink.ko / sysfs API
  10  - ringtone            full support, yealink.ko / sysfs API
  11  - audio playback      full support, snd_usb_audio.ko / alsa API
  12  - audio record        full support, snd_usb_audio.ko / alsa API
  13
  14For vendor documentation see http://www.yealink.com
  15
  16
  171. Compilation (stand alone version)
  18~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  19Currently only kernel 2.6.x.y versions are supported.
  20In order to build the yealink.ko module do
  21
  22  make
  23
  24If you encounter problems please check if in the MAKE_OPTS variable in
  25the Makefile is pointing to the location where your kernel sources
  26are located, default /usr/src/linux.
  27
  28
  291.1 Troubleshooting
  30~~~~~~~~~~~~~~~~~~~
  31Q: Module yealink compiled and installed without any problem but phone
  32   is not initialized and does not react to any actions.
  33A: If you see something like:
  34   hiddev0: USB HID v1.00 Device [Yealink Network Technology Ltd. VOIP USB Phone
  35   in dmesg, it means that the hid driver has grabbed the device first. Try to
  36   load module yealink before any other usb hid driver. Please see the
  37   instructions provided by your distribution on module configuration.
  38
  39Q: Phone is working now (displays version and accepts keypad input) but I can't
  40   find the sysfs files.
  41A: The sysfs files are located on the particular usb endpoint. On most
  42   distributions you can do: "find /sys/ -name get_icons" for a hint.
  43
  44
  452. keyboard features
  46~~~~~~~~~~~~~~~~~~~~
  47The current mapping in the kernel is provided by the map_p1k_to_key
  48function:
  49
  50   Physical USB-P1K button layout       input events
  51
  52
  53              up                             up
  54        IN           OUT                left,   right
  55             down                           down
  56
  57      pickup   C    hangup              enter, backspace, escape
  58        1      2      3                 1, 2, 3
  59        4      5      6                 4, 5, 6,
  60        7      8      9                 7, 8, 9,
  61        *      0      #                 *, 0, #,
  62
  63  The "up" and "down" keys, are symbolised by arrows on the button.
  64  The "pickup" and "hangup" keys are symbolised by a green and red phone
  65  on the button.
  66
  67
  683. LCD features
  69~~~~~~~~~~~~~~~
  70The LCD is divided and organised as a 3 line display:
  71
  72    |[]   [][]   [][]   [][]   in   |[][]
  73    |[] M [][] D [][] : [][]   out  |[][]
  74                              store
  75
  76    NEW REP         SU MO TU WE TH FR SA
  77
  78    [] [] [] [] [] [] [] [] [] [] [] []
  79    [] [] [] [] [] [] [] [] [] [] [] []
  80
  81
  82Line 1  Format (see below)      : 18.e8.M8.88...188
  83        Icon names              :   M  D  :  IN OUT STORE
  84Line 2  Format                  : .........
  85        Icon name               : NEW REP SU MO TU WE TH FR SA
  86Line 3  Format                  : 888888888888
  87
  88
  89Format description:
  90  From a userspace perspective the world is separated into "digits" and "icons".
  91  A digit can have a character set, an icon can only be ON or OFF.
  92
  93  Format specifier
  94    '8' :  Generic 7 segment digit with individual addressable segments
  95
  96    Reduced capability 7 segm digit, when segments are hard wired together.
  97    '1' : 2 segments digit only able to produce a 1.
  98    'e' : Most significant day of the month digit,
  99          able to produce at least 1 2 3.
 100    'M' : Most significant minute digit,
 101          able to produce at least 0 1 2 3 4 5.
 102
 103    Icons or pictograms:
 104    '.' : For example like AM, PM, SU, a 'dot' .. or other single segment
 105          elements.
 106
 107
 1084. Driver usage
 109~~~~~~~~~~~~~~~
 110For userland the following interfaces are available using the sysfs interface:
 111  /sys/.../
 112           line1        Read/Write, lcd line1
 113           line2        Read/Write, lcd line2
 114           line3        Read/Write, lcd line3
 115
 116           get_icons    Read, returns a set of available icons.
 117           hide_icon    Write, hide the element by writing the icon name.
 118           show_icon    Write, display the element by writing the icon name.
 119
 120           map_seg7     Read/Write, the 7 segments char set, common for all
 121                        yealink phones. (see map_to_7segment.h)
 122
 123           ringtone     Write, upload binary representation of a ringtone,
 124                        see yealink.c. status EXPERIMENTAL due to potential
 125                        races between async. and sync usb calls.
 126
 127
 1284.1 lineX
 129~~~~~~~~~
 130Reading /sys/../lineX will return the format string with its current value:
 131
 132  Example:
 133  cat ./line3
 134  888888888888
 135  Linux Rocks!
 136
 137Writing to /sys/../lineX will set the corresponding LCD line.
 138 - Excess characters are ignored.
  14Readnd the sysfs files.
  4414/a>For venndor documentation see  12. ke1yboard features
 1~~~~~1~~~~~~~~~~~~~~~
 1The c1urrent mapping in the ke1rnel 14the eleWef="updana tne dispationtded by the dana &nk.; titxt#L119" id="L119" class="line" name="L119"> 1funct1ion:
  891
  501   Ph1ysical USB-P1K button la1yout 1     i4.2lable icon#L50" id="L50" class="line" name="L50">  501A: Th1ref="Documentation/input1/yeal1nk.txtt/yealink.txt#L110" id="L110" class="line" name="L110"> 1
 1     1         up             1     15k.txt#L44" id="L44" class="line" name="L44">  441     1   IN           OUT     1     1     lefyealinable icon#L50" id="L50" class="line" name="L50">  5012. ke1        down            1     15ion/input/M#L50" id="L50" class="line" name="L50">  501~~~~~1ref="Documentation/input1/yeal156on/input/D#L50" id="L50" class="line" name="L50">  501The c1 pickup   C    hangup   1     1     entut/t#L104" id="L104" class="line" name="L104"> 1funct1   1      2      3      1     1     1, 2, IN#L104" id="L104" class="line" name="L104"> 1
 1     1   7      8      9      1     1     7, 8, k.txt#L84" id="L84" class="line" name="L84">  841     1   *      0      #      1     1     *, 0, NEW#L84" id="L84" class="line" name="L84">  841
  841     1 "up" and &quo1t;dow16d binary rSU#L84" id="L84" class="line" name="L84">  841     1 "pickup" and 1"16c. status MO#L84" id="L84" class="line" name="L84">  8412. ke1the button.
  841
  841The c1ref="Documentation/input1/yeal16the elemenTH#L84" id="L84" class="line" name="L84">  841funct1D features
  841
  861The L1CD is divided and organi1sed a17    7, 8, LED#L50" id="L50" class="line" name="L50">  501
  841    |1[]   [][]   [][]   [][] 1  in 17lcd line1
RINGTONt#L84" id="L84" class="line" name="L84">  841     1[] M [][] D [][] : [][] 1  out17k.txt#L44" id="L44" class="line" name="L44">  441     1                        1 stor17k.txt#L45" id="L45" class="line" name="L45">  451
  501    N1EW REP         SU MO TU 1WE TH17ntation/input/yealink.tx#L50" id="L50" class="line" name="L50">  5011. Comppilation (stand alone veryeal17e corresponding tdeseendpoinwef="updana tne ref=eon/input/icot#L119" id="L119" class="line" name="L119"> 1    [1] [] [] [] [] [] [] [] [1] [] 1] []
  501
  501
 1Line 11  Format (see below)   1   : 18k.txt#L123" id="L123" class="line" name="L123"> 1     1   Icon names           1   : 1 M  D  :link.tx - l.txtf="Dtne rethe
/icot#L104" id="L104" class="line" name="L104"> 1Line 12  Format               1   : 18c. statecho -nn/inputk.txtcumentaarchliny writing#L104" id="L104" class="line" name="L104"> 1
 1Line 13  Format               1   : 186input/yealink.txt#L113" id="L113" class="line" name="L113"> 1
  831
  831    [1t description:
  501  Fro1m a userspace perspectiv1e the1world islink.tx - sou using ntation oink.10iDoingdxt#L104" id="L104" class="line" name="L104"> 1  A d1igit can have a characte1r set1 an iconecho -nnRINGTONtaarchlalink.txiny writing#L104" id="L104" class="line" name="L104"> 1
 1     1mat specifier
 1Line 1#39;8' :  Generic 7 1segme19k.txt#L45" id="L45" class="line" name="L45">  451
  961    R1educed capability 7 segm1 digi1, when5. Sou uslink.txt#L69" id="L69" class="line" name="L69">  691    &1#39;1' : 2 segments 1digit1only ainput/yealink.txt#L19" id="L19" class="line" name="L19">  19
  19Currenttly only kernel 2.6.x.y vocum19k.txt#L50" id="L50" class="line" name="L50">  50200   2'M' : Most signi2icant2minuteO88..6-bonlyhanhrefationsnk.tx ne
<.ko / alsconsson/i8000 Hzs&quref="on/ients#L50" id="L50" class="line" name="L50">  5020/a>
  20  makehref="Documentation/inpu2/yeal2nk.txt#L103" id="L103" class="line" name="L103"> 203   2Icons or pictograms:
 204   2'.' : For exampl2 like2AM, PM, a.ko / a-v -d.10i-ri8000 -f S16_LE -t wav oinobar.wav#L104" id="L104" class="line" name="L104"> 205   2&ef="Documentation/input2Docum20k.txt#L96" id="L96" class="line" name="L96">  96206
 20/a>
 20/a>
  29<09~~~2~~~~~~~~~~~
  50210For2userland the following i2terfa2es are6. Credainp&nk.; Acknowlednk.txt#L95" id="L95" class="line" name="L95">  95211  /2ys/.../
  19212   2       line1        Read2Write2t, snd_usbOlivieroVaw.yepe,oink.refrn/input/yatib2k-apiocumject do/inpmuchon/#L19" id="L19" class="line" name="L19">  19213   2       line2        Read2Write2 lcd line2
  20<14   2       line3        Read2Write2 lcd lin- Mfrn/i Diehl,oink.l sourceseali wring handtx alinmemory.txto"Documt#L20" id="L20" class="line" name="L20">  20<15   2href="Documentation/inpu2/yeal215cd lin- Dmitry.Torokhov,oink.mentn" crounpufdntreaiew 216   2       get_icons    Read2 retu2nk.txt#L17" id="L17" class="line" name="L17">  17217   2       hide_icon    Writ2, hid2 the e

Treforf="nal LXR softw/yeaion/inpL17" id="entatioink.txinkge.net/cumjects/lxr">LXR ut/yunityhe entme&quexpent claslcan'tionL17" id="mailto:lxr@lk.txtno">lxr@lk.txtnohe e. _contens">

lxr.lk.txtno kindtyi ws.txtionL17" id="entation/inredpill-lk.cumtno">Redpillt/yecum AShe entocumentron/iLyealiiconulpondin="Dopenss="lquotr/inpsput/cem19k5. _contents/bodyens/htmlul