Yeaphone

Bitte verfasse deine Kommentare auf Englisch!

93 Kommentare bisher (eigenen Kommentar verfassen)
[1] Eingetragen von Wojciech Zabolotny am Freitag, 15.09.2006 @ 18:54
Does the YeaPhone extension support the USB-B2K USB<->Phone adapter?
(It is also serviced by the yealink.ko driver)
Antwort von Thomas: Not yet, sorry - I do not own this adapter, so for the next few weeks it's probably second priority. Still I'd like to contact you when it comes to trying YeaPhone with the B2K.
[2] Eingetragen von Al Johnson am Dienstag, 10.10.2006 @ 22:16
I have both a P1K and a B2K and hope to get YeaPhone working soon (x86 running Gentoo) but at the moment it tells me:
Could not find event link in directory /sys/bus/usb/drivers/yealink/1-2:1.3/!
I've not looked into exactly why yet.

On the B2K front the svn checkout of the yealink driver doesn't support enough of the B2K functionality to be usable yet. I've added keymap decoding, but the receiver on/off and switching between line and USB don't work yet.
[3] Eingetragen von Al Johnson am Mittwoch, 11.10.2006 @ 16:31
Fixed the event link problem - needed to modprobe evdev before yealink for the event link to be created. All the yeaphone bits are working - many thanks! The one way audio is a linphone configuration problem ;-)

I'll let you know how I get on with the B2K
[4] Eingetragen von lecheel am Donnerstag, 19.10.2006 @ 02:51
I got problem compile yeaphone 0.1
any hint?
===================
make all-recursive
make[1]: Entering directory `/work/yeaphone-0.1'
Making all in src
make[2]: Entering directory `/work/yeaphone-0.1/src'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT lpcontrol.o -MD -MP -MF ".deps/lpcontrol.Tpo" -c -o lpcontrol.o lpcontrol.c; \
then mv -f ".deps/lpcontrol.Tpo" ".deps/lpcontrol.Po"; else rm -f ".deps/lpcontrol.Tpo"; exit 1; fi
In file included from lpcontrol.c:43:
lpcontrol.h:46: error: syntax error before ‘callback’
lpcontrol.c:123: error: unknown field ‘general_state’ specified in initializer
lpcontrol.c:124: warning: excess elements in struct initializer
lpcontrol.c:124: warning: (near initialization for ‘lpc_vtable’)
lpcontrol.c: In function ‘lpcontrol_thread’:
lpcontrol.c:203: error: ‘GSTATE_GROUP_POWER’ undeclared (first use in this function)
lpcontrol.c:203: error: (Each undeclared identifier is reported only once
lpcontrol.c:203: error: for each function it appears in.)
lpcontrol.c:203: error: ‘GSTATE_POWER_OFF’ undeclared (first use in this function)
lpcontrol.c: At top level:
lpcontrol.c:218: error: syntax error before ‘callback’
lpcontrol.c: In function ‘set_lpstates_callback’:
lpcontrol.c:219: error: ‘LinphoneCoreVTable’ has no member named ‘general_state’
lpcontrol.c:219: error: ‘callback’ undeclared (first use in this function)
make[2]: *** [lpcontrol.o] Error 1
make[2]: Leaving directory `/work/yeaphone-0.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/work/yeaphone-0.1'
make: *** [all] Error 2
Antwort von Thomas: Hi lecheel,
you are missing the patched linphone! Please download linphone 1.4.1 and the patches provided on www.devbase.at, apply the patches and install the patched linphone (i.e. make install). Now yeaphone will find the general_state which are needed to keep track of the internal state of the linphone backend.
Tell me if it still not works.
[5] Eingetragen von lecheel am Freitag, 20.10.2006 @ 01:59
Thomas,
I already patch the linphone 1.4.1 and have make install :-(
[6] Eingetragen von lecheel am Freitag, 20.10.2006 @ 02:49
Thanks Thomas,
The problem since I didn't make patch completely I use ./configure --enable-video=no --enable-ipv6=no
for linphone
so far got error in
make[2]: Entering directory `/work//linphone-1.4.1-yea/console'
/bin/sh ../libtool --tag=CC --mode=link gcc -Wall -Wp,-D_FORTIFY_SOURCE=2 -Werror -DENABLE_TRACE -D_ORTP_SOURCE -g -O2 -fno-strict-aliasing -o linphonec linphonec.o commands.o ../coreapi/liblinphone.la -lreadline -lncurses
gcc -Wall -Wp,-D_FORTIFY_SOURCE=2 -Werror -DENABLE_TRACE -D_ORTP_SOURCE -g -O2 -fno-strict-aliasing -o .libs/linphonec linphonec.o commands.o ../coreapi/.libs/liblinphone.so -lreadline -lncurses -Wl,--rpath -Wl,/usr/local/lib
../coreapi/.libs/liblinphone.so: undefined reference to `gstate_new_state'
../coreapi/.libs/liblinphone.so: undefined reference to `gstate_initialize'
collect2: ld returned 1 exit status
make[2]: *** [linphonec] Error 1
make[2]: Leaving directory `/work/linphone-1.4.1-yea/console'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/work/linphone-1.4.1-yea'
make: *** [all] Error 2
[7] Eingetragen von lecheel am Freitag, 20.10.2006 @ 03:06
Thomas,
your package totally work sorry for brother :-p

great thanks
[8] Eingetragen von fnord_boy am Montag, 30.10.2006 @ 14:40
Hi,

is the download of yeaphone the uptodate version ? or is there also a developement version ?

i have started making some small modifications to the code, to also be able to handle the P4K phones (backlicht, dialtone, speaker, on/off hook)
when finished, i want to provide you with a patch. So having a uptodate code base will obviously be helpful

John
Antwort von Thomas: fnord_boy, the version on this web-site is the latest one, I haven't done further development recently - aside from hunting after the memory leak.
If you send me your modifications I will apply them and do another release.
Thanks!
[9] Eingetragen von alex am Freitag, 1.12.2006 @ 13:26
Dear Sir:

i meet a problem is "can not find .yeaphonerc"
when i run yeaphone. message as following

//.yeaphonerc: No such file or directory

Could you give me some suggestion ?

thanks a lot
Antwort von Thomas: Hi Alex,
Yeaphone tries to store its configuration in $HOME/.yeaphone ($HOME being your home directory). Apparently $HOME is "/" on your system and your user account, and Yeaphone might not have write permissions to create a file in your root directory.

If you can confirm that using the root directory is what you intended, then try to create a file "/.yeaphonerc" yourself with the following contents (my guess for Taiwan):
Code:
intl-access-code 002
natl-access-code ""
country-code 886

Hope this helps,
-Thomas
[10] Eingetragen von alex am Sonntag, 3.12.2006 @ 12:59
dear Thomas:

thanks a lot for your reply, it is useful
for me.
Could i ask another question ? if my usb
phone only have keypad & audio but without display
--> how can i do "let the display redirect to Null
device"?

best regards & thanks

alex

Antwort von Thomas: Hi Alex,
Unfortunately this is a big limitation right now. The program is very much focused on Yealinks P1K, but it would not be too much work to at least support any phone with its keypad (whether or not it provides a display).
Right now Yeaphone chokes if it does not find the directories in /sys providing the diplay interface for the P1K (consisting of "files" like line1, line2, ... to which you can write the text to be displayed). A more general solution would be to specify a vendor and product ID and have Yeaphone grab the keypad (as event device) - just like it is done in keyevent (also on my website). Then if it turns out to be a Yealink P1K the display could be also enabled.
I guess that would be a great step forward to a more general piece of software.

So besides moving to liblinphone 1.5.1 this will definitely be on my todo list.
[11] Eingetragen von alex am Donnerstag, 7.12.2006 @ 09:03
dear Thomas:

thanks a lot about your answer. now
i buy one pair of "USB-p1k" and hope them
can work well under yeaphone .

best regards & thanks

Alex
[12] Eingetragen von Philippe am Freitag, 15.12.2006 @ 10:43
Hello,

I am trying to install linphonec and it seem that it depends on libasound2 r1, which is not available at the moment.

Do you know where I can find it ?

Thanks,
Philippe


Installing linphonec (1.4.1-r0) to root...
Downloading http://feed.devbase.at/slugos-3.10/linphonec_1.4.1-r0_armeb.ipk
Installing libasound2 (1.0.11-r1) to root...
Downloading http://feed.devbase.at/slugos-3.10/libasound2_1.0.11-r1_armeb.ipk
wget: server returned error 404: HTTP/1.1 404 Not Found
Nothing to be done
An error ocurred, return value: 22.
Collected errors:
ipkg_download: ERROR: Command failed with return value 1: `wget --passive-ftp -q -P /tmp/ipkg-PGcX4H http://feed.devbase.at/slugos-3.10/libasound2_1.0.11-r1_armeb.ipk'
Failed to download libasound2. Perhaps you need to run 'ipkg update'?
Antwort von Thomas: Hi Philippe,
apparently the problem was a mismatch between the package listing (a text file) and the actual files on the server. I probably compiled the newer r1-version some time ago but only uploaded the listing. Its fixed now, meaning libasound2_1.0.11-r1_armeb.ipk is online.
If you still run into problems let me know!
[13] Eingetragen von Philippe am Freitag, 15.12.2006 @ 23:14
Hello,

It seems there is a problem with the USB-HID.

Thanks in advance,
Philippe

root@luxy:~# ipkg install -force-reinstall kernel-module-usb-hid
Nothing to be done
An error ocurred, return value: 4.
Collected errors:
Cannot find package kernel-module-usb-hid.
Check the spelling or perhaps run 'ipkg update'
root@luxy:~# linphonec
gstate_new_state: GSTATE_POWER_OFF -> GSTATE_POWER_STARTUP ((null))
Ready
gstate_new_state: GSTATE_POWER_STARTUP -> GSTATE_POWER_ON ((null))
linphonec> soundcard list
0: ALSA: default device
Antwort von Thomas: Hi Philippe,
I just noticed I made a mistake in the instructions for the installation, the module is not kernel-module-usb-hid but kernel-module-usbhid (without the dash).
The website now shows the correct procedure.
[14] Eingetragen von Tiziano Martelli am Freitag, 9.02.2007 @ 19:50
Hi, Thomas. You'we done a great work but I'm not able to compile under Linux (on a clean system)
If I apply the patch before compiling linphone 1.6.0 the compilation of linphone fails because of undefined reference to "gstate_initialize" and "gstate_new_state" (I think this functions are in yeahphone module).
If I don't apply the patch the compilation of linphone goes thrugh but, as you already said in preceding comments, the compilation of yeaphone fails. What can I do?
Thanks in advance
Antwort von Thomas: Hi Tiziano,
after applying the patch please check the directory coreapi, there should now be a file general_state.c which provides the two functions you mentioned. If it is there anyway or you still get the error, your makefiles might not be recreated automatically. Please download the new patches (Revision 1, see above) and use them instead. They now include the changes in coreapi/Makefile.in.
Let me know if it still does not compile.
-Thomas
[15] Eingetragen von Alfred am Montag, 19.02.2007 @ 00:34
hi guys

Do you know if the Komunikate KIP1000 phone
is supported by Yealink:

http://www.laptopstuff.co.uk/product_details.php?item_id=2813&category_id=159&category_name=Skype

I tried to do "modprobe yealink" while the
handset is pluggen in, but it looks like it is
not detected.

I tried using the linux kernel usbhid module,
the device appears as a generic sound card
with HID "Consumer Page" reporting events
volume up/down..

any hint is really appreciated ;)


/alfred
[16] Eingetragen von Bob am Mittwoch, 21.02.2007 @ 17:09
Howdy, I am a gentoo user and cannot seem to get yeaphone to compile. I have created an ebuild that applies the revision1 patch cleanly and compiles linphone, but when I try to compile yeaphone it errors. Here is what it looks like:
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT lpcontrol.o -MD -MP -MF ".deps/lpcontrol.Tpo" -c -o lpcontrol.o lpcontrol.c; \
then mv -f ".deps/lpcontrol.Tpo" ".deps/lpcontrol.Po"; else rm -f ".deps/lpcontrol.Tpo"; exit 1; fi
In file included from /usr/include/ortp/rtpport.h:146,
from /usr/include/ortp/rtpsession.h:24,
from /usr/include/ortp/ortp.h:24,
from /usr/include/linphone/linphonecore.h:24,
from lpcontrol.h:31,
from lpcontrol.c:45:
/usr/include/glib-2.0/glib.h:30:26: error: glib/galloca.h: No such file or directory
/usr/include/glib-2.0/glib.h:31:25: error: glib/garray.h: No such file or directory
/usr/include/glib-2.0/glib.h:32:30: error: glib/gasyncqueue.h: No such file or directory
/usr/include/glib-2.0/glib.h:33:26: error: glib/gatomic.h: No such file or directory
/usr/include/glib-2.0/glib.h:34:29: error: glib/gbacktrace.h: No such file or directory
/usr/include/glib-2.0/glib.h:35:26: error: glib/gbase64.h: No such file or directory
/usr/include/glib-2.0/glib.h:36:32: error: glib/gbookmarkfile.h: No such file or directory

I think this gives you the general idea of the error.It ends with this:
../config.h:104:1: warning: "PACKAGE_VERSION" redefined
In file included from /usr/include/ortp/rtpport.h:34,
from /usr/include/ortp/rtpsession.h:24,
from /usr/include/ortp/ortp.h:24,
from /usr/include/linphone/linphonecore.h:24,
from lpcontrol.h:31,
from lpcontrol.c:45:
/usr/include/ortp/ortp-config.h:104:1: warning: this is the location of the previous definition
make[2]: *** [lpcontrol.o] Error 1
make[2]: Leaving directory `/usr/src/yeaphone-0.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/yeaphone-0.1'
make: *** [all] Error 2
Antwort von Thomas: Hi Bob,
I think you are using the version of ortp available in the gentoo ebuild archive. Currently that's version 0.7..1-r1, however linphone comes with version 0.13.0 in its subdirectory oRTP. The clean way would probably to create an ebuild for the new ortp, add a patch for linphone to make the build process skip the oRTP directory (that might be the trickiest part) but add a dependency for ortp >= 0.13.0.
There is another possible conflict - libeXosip is available as a (masked) ebuild, however linphone comes with its own version of libeXosip. I have not check whether both would install in the same directories. As far as I know linphone's author wants to move to the latest version of libeXosip at some point...
Hope that fixes your problem,
-Thomas
[17] Eingetragen von ken am Mittwoch, 28.02.2007 @ 18:35
Hi Thomas,
I am trying to port yeaphone/linphone/yealink to an embedded powerpc platform. I started by just trying to get a b1k functional with the yealink driver that comes in the vanilla kernel. This is what comes out the console when I plug in the phone:
# usb 3-2: new full speed USB device using ohci_hcd and address 2
usb 3-2: Product: VOIP USB Phone
usb 3-2: Manufacturer: Yealink Network Technology Ltd.
usb 3-2: configuration #1 chosen from 1 choice
drivers/usb/input/yealink.c: invalid payload size 8, expected 16
input: Unspecified device as /class/input/input0
drivers/usb/input/yealink.c: urb_ctl_callback - urb status -32
drivers/usb/input/yealink.c: urb_ctl_callback - urb status -32

---------
The display doesn't show what the driver source says it should, and pressing any button results in more "urb_ctl_callback..." messages.

I have tried 2 different phones, and 3 different linux boxes and all show the same symptoms;
box1.. Ubuntu 6.06 x86 P4
box2.. Ubuntu 6.06 G3 ppc
box3.. vanilla 2.6.21-rc1 ppc (8245)

I have searched through the lkml archives and
kernel sources and discoverd that the yealink driver internal revisions differ what you recommend -> 20061216.

This is what I found:

slugosbe/unstable -> yld-20051230 (kernel 2.6.20)
slugosbe/cross/stable -> yld-20060830 (kernel 2.6.16)
vanilla 2.6.21-rc1 -> yld-20051230
Savannah usbb2k-api yealink.c -> yld-20060830

These slugosbe revision numbers come from the yealink.ko module.
I tried using the source from the Savannah project, and get the same messages. BTW the sound part of the phone works fine, and the phone(s) work correctly on MacOSX with Skype.

1) any ideas as to why the vanilla kernel modules don't work?
2) any idea as what patches are neccessary to get to your recommended version of yealink.c?

Any help would be appreciated, thanks.
...ken...
Antwort von Thomas: For the record: Ken and I found out that the handset he is using actually is a P1KH. It comes with the same enclosure and display but uses a different µC inside. However the essential difference is that it uses a slightly different data format for USB communication which the current yealink kernel module cannot handle. We decoded the protocol already and implemented a "prove of concept", a kernel mode driver still has to be implemented though.
[18] Eingetragen von ken am Mittwoch, 28.02.2007 @ 22:10
oops, that's a p1k not a b1k. ;P
[19] Eingetragen von Matte am Sonntag, 20.05.2007 @ 23:02
hi Thomas after compilation when I run yeaphone I get the following error:

matte@home:~$ yeaphone
/home/matte/.yeaphonerc: No such file or directory
Could not find device link in directory /sys/bus/usb/drivers/yealink/!

I'm running Xubuntu on PPC
Linux home.be4mind.com 2.6.15-28-powerpc #1 Tue Mar 13 20:52:09 UTC 2007 ppc GNU/Linux

I can make calls with patched linphonec and the usbphone.
Do u have any suggestion?
Thx alot
Matte
Antwort von Thomas: The problem is that for kernel versions < 2.6.18 the generic usbhid driver grabs the USB interface handling key scans and the yealink module turns useless.
A relatively simple solution is to detach the usbhid driver from user-space and then allow the yealink driver to attach itself. A little tool doing that will be presented on a new web page about the P1K shortly.
[20] Eingetragen von Tomasz am Donnerstag, 21.06.2007 @ 12:59
You have mentioned hunting for memory leak in linphonec (10.30.2006). Were you able to fix it?

It looks to me that linphone compiled for uClinux with uClibc does not free memory at all. But thats my subjective observation.
Antwort von Thomas: Hi Tomasz,
the leak is already fixed in linphone >= 1.7.0, at least the one I saw. It happened with OPTIONS requests which my provider sends with every reregistration. I found the problem and submitted the patch earlier this year, see this thread.
Along with the bug fix the extended interface for yeaphone (and derived projects like botphone) was included, so there is no need to patch linphone anymore if you like to use it with yeaphone.

Please try the new linphone and tell me if it still leaks memory.
[21] Eingetragen von panchito am Freitag, 13.07.2007 @ 00:46
Hi, I get a similar error as 2 posts above:

Could not find event link in directory /sys/bus/usb/drivers/yealink/2-1:1.3/!

I use a Kernel 2.6.21.5-linkstationPPC and I'm not quite sure I understood the answer above. I tried to rmmod usbhid module and manually modprobe yealink module but same error.

Can you give more information on how to proceed?

...or I'll wait for that little tool presented shortly.

Thanks!
panchito
Antwort von Thomas: Hi panchito,
could you please check if there is a directory called /dev/input/ containing one or more files called eventX (X being a number)?
Furthermore there must be a symbolic link showing up when you execute
Code:
ls -l `find /sys -name ringtone -printf %h`/input:event*


Does 'dmesg' show anything suspicious when you connect the handset?

BTW, the little program I mentioned in posting 19 is not needed for kernel versions >= 2.6.18 (still you can find its source code here).
[22] Eingetragen von panchito am Samstag, 14.07.2007 @ 03:48
Thanks for this information. It made me realize no evdev module comes with this kernel. I recompiled it and everything works! That's great!!! Thanks for your help!
[23] Eingetragen von lmyronuk am Montag, 13.08.2007 @ 18:51
First, nice work.
I seem to have a problem with the USB-P4K key inputs... press"1" and "8" appears on my monitor (not the LCD); "2" gives "5"; "3" gives "2"; etc according to following:

in --> <no obvious effect>
vol+ --> 0
vol- --> <no obvious effect>
up --> #
down --> *
out --> 4
del --> <moves caret up one line>
dial --> 1
1 --> 8
2 --> 5
3 --> 2
4 --> 9
5 --> 6
6 --> 3
7 --> <backspace>
8 --> <no obvious effect>
9 --> <new line>
* --> <move down one line>
0 --> <backspace>
# --> <move right one character>
help --> <no obvious effect>
flash--> <no obvious effect>
send --> <no obvious effect>
redial-> <no obvious effect>
spkr --> 7

This is with linphone configured per instructions here, yeaphone invoked, and keys being pressed with handset on-hook. Correct time & date are displayed in LCD; power LED is lit green.

Thoughts, anyone?

Lonn Myronuk
Antwort von Thomas: Hi Lonn,
I guess you are using the yealink driver included in the official linux kernel. This is an old version which supports the USB-P1K only. The P4K has a different key layout (as you noticed) and some more specialties. You can read about the most recent status of the yealink driver at http://cvs.savannah.nongnu.org/viewvc/yealink-module/?root=usbb2k-api
The new driver should support the P4K, however yeaphone lacks the ability to generate the ring tone (= turn on speaker and play audio waveform). As linphone itself supports playing a "wav" ringtone, this might be just a small change inside yeaphone.

One thing that's not really clear to me is why your key inputs appear as regular keyboard presses _while_ yeaphone is running. Yeaphone should exclusively grab the device's input events and when it terminates it releases the input event interface.
[24] Eingetragen von Brandon am Freitag, 31.08.2007 @ 22:57
I have 2 issues currently.
The first issue I have is when I run yeaphone my handset doesn't do anything. When I check lsmod the yealink modules is loaded but it is not attached to any hardware. The device says it is a yealink phone when I look at the usb devices. It is a Fonaso branded phone and says it is a P1K. I believe from reading an earlier post it may be a P1KH. I am wondering when it will be possible to use a P1KH? The second issue is I can get linphonec to work sort of. When I make or recieve a call the audio doen't work at first and sometimes not at all. I get a digital crackling.
Given enough time it may start to work. Sometimes stopping linphonec and restarting it may net a call that works right off, but a second consecutive call doesn't. I cannot find any rhyme or reason why it will start working eventually in the middle of a call. I can wait anywhere from 1 to 5 minutes and the audio may start to work. In every case the person I am trying to talk to can hear my audio but I can't hear them. Any answer as to why?

Antwort von Thomas: You are probably right about the P1KH. If plug in your handset, run 'dmesg' and see the "invalid playload size 8" message, then it is a P1KH. I am currently working on a library for the P1K, P1KH, B2K, ... but it will take a few weeks. It will be purely user-space, no need for a kernel module.

The other issue could be caused by a NAT router. Have you tried to establish a local call from linphonec (NSLU2) to you PC? If that works try forwarding the RTP port specified in .linphonerc (audio_rtp_port).
Other things to try: Invoke linphonec with "-d 6 -l logfile.txt" to see if there are any problems with the audio stream. Or, run linphonec + handset on your PC to see if the problem is specific to the NSLU2.
[25] Eingetragen von Brandon am Freitag, 31.08.2007 @ 23:00
Oh btw I didn't specify my hardware. Turbo Slug with SlugOS 3.10 using the ipackages provided in the repo. USB-P1K Fonaso branded usb phone.
[26] Eingetragen von Brandon am Montag, 3.09.2007 @ 03:46
Thanks for your reply Thomas. I do get an invalid playload size 8, that is what led me to believe it was a P1KH. That answers that. Now the other issue. I found out tonight that if I plug in a usb hub into the unit I can hear the audio, but it is choppy. I think the interference is caused by the ethernet on the board some how. When the P1KH is plugged directly into the usb port I hear noise consistent with the flashing of the ethernet led. Have you ever heard of this? Like I said if I plug up a usb hub I can hear the audio it is just choppy. Plugged directly in it may work for a minute and it may not, which is what is so confusing. I would just assume what ever causes the problem would make it not work at all.
[27] Eingetragen von rbuick am Sonntag, 9.09.2007 @ 11:46
I have a p4k phone and have loaded the latest rpm on Fedora 7. When I run yeaphone, the time day and date come up but am not able to dial out. dmesg gives: input: Yealink usb-p1k as /class/input/input8
usbcore: registered new interface driver yealink
drivers/input/misc/yealink.c: Yealink phone driver:yld-20051230.
While lsmod gives: yealink 21953 0
Running linephonec worked but did not ask for a password.
Before installing the rpm I was able to hear calls using Twinkle but the other end was unable to hear me.
Any help would be much appreciated.

Thanks.
Antwort von Thomas: Hi Robert,
the main problem is that the yealink kernel module shipped with the official Linux kernel is rather old, its release data is 2005-12-30 (see your dmesg). There are updates available but they never made it upstream and might already need some adaption of include paths etc.
Right now even the latest version of the yealink kernel module might not make you happy - 1. P4K support is only experimental, and 2. yeaphone is not able to handle the hook event and ringing via the phone's speaker.
Therefore I am currently working on a user-space driver for yealink phones. This will take a few more weeks but then yeaphone should fully support the P4K. Also other projects should be able to add yealink support more easily.

Not sure what the problem with Twinkle is. Can you record your voice through the P4K (eg. using arecord)? Might there be a NAT problem on the other end? Did you check using an echo service (eg. sip:enum-echo-test@sip.nemox.net)?

I'll keep you update when there are news about P4K support, driver development can be tracked at http://www.devbase.at/svn/view.cgi/libyealink/trunk/?root=voip.

Update: The yealink driver and yeaphone (both from this site) are now fully supporting the P4K!
[28] Eingetragen von jivko am Sonntag, 23.09.2007 @ 08:47
I have a Freshtel FT-102, this should be a P1K brand. The keys and sound are ok, but the display do not work. All the time I see an icon with computer and phone and a X mark between them (seems to mean disconnect :)

dmesg shows:
/home/share/src/yealink-module/yealink.c: unexpected response fd
uhci_hcd 0000:00:07.2: release dev 3 ep81-INT, period 16, phase 8, 61 us
uhci_hcd 0000:00:07.2: reserve dev 3 ep81-INT, period 16, phase 8, 61 us
Antwort von Thomas: Hi Jivko,
Are you sure this is a P1K? There is another handset available which uses an identical USB vendor and product ID but provides a graphics screen instead of the P1K's 7-segment display. This might be the reason why your display stays empty.

For the graphics screen there is a driver available at http://lekernel.net/scrapbook/freshtel.html but it is not compatible with yeaphone.
[29] Eingetragen von jivko am Montag, 24.09.2007 @ 17:27
Thank Thomas,
You are right, Freshtel has a different LCD. And yes, it's driver is not compatibile with yeaphone, so I'm going to buy a yealink one.
One more question:
Is it (and how) possible to make sip calls (sip:friend@server.com) using yeaphone?
e.g. to show contact sip addresses stored in linphone?
[30] Eingetragen von haowei am Sonntag, 4.11.2007 @ 18:03
Dear all,
I use Fedora Core 6
How can I install the yealink kernel module to Fedora Core 6
URL(http://www.devbase.at/voip/yealink-module.php)not found!!!
Thank a lot.
[31] Eingetragen von peter am Donnerstag, 22.11.2007 @ 01:34
Hi Thomas

Can you shed some light on the development of yealink support in linux?

After buying the P4K, this is what I have found so far:

As already described in earlier comments, not all features of the P4K are supported by the yealink driver present in the kernel.

I have found the yealink driver on savannah with P4K support, and after some small modifications, I was able to compile it for linux-2.6.18, and use it. Seems like everything is working. Adapting it to current kernels (2.6.23) is beyond my abilities, though, the interface of some callback functions has changed, and my attempted adaptations crashed the kernel.

Development of the driver on savannah seems to have stopped in 2006, and it has become out of sync with the current kernel interface. I wonder, why have the improvements of the savannah module not made their way into the kernel?

Today I discovered your site and see in your repository that development is ongoing. I have not tried the library yet. I believe a user-space driver makes sense if it is possible.

Antwort von Thomas: Hi Peter,
as you have noticed the development of the yealink kernel module has more or less been stopped. Some time ago I published a patch to get rid of the infamous 0xfd response (see yealink.patch at https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2214) but Henk (the original developer) does not seem to have the time for maintenance or development any more.

Besides that there are a few other projects related to Yealink devices:

* kb2kskype (http://sf.net/projects/kb2kskype) which supports the B2K and is an improved version of the original Skype driver. Still its implementation is a bit buggy.

* easyb2k (http://sf.net/projects/easyb2k) which connects the B2K & B3G to Skype and Ekiga.

* libyealink (http://www.devbase.at/svn/view.cgi/libyealink/?root=voip) which is a user-space driver and eventually should provide a generalized interface to a variety of Yealink models. It is very incomplete right now and will undergo complete restructuring. One goal is to use OpenUSB instead of libusb.

* There are also some phone models available at http://www.devbase.at/svn/view.cgi/phone-models/?root=experimental which I created for testing the drivers. They connect via USBIP.

Recently there were some thoughts about establishing a new project for an ultimate Yealink tool - see easyb2k's mailing list archive. It's still in a very early stage though.

My personal goal for the near furture will be to implement a useful user-space library for Yealink phones - as time permits (the reason for the slow development).

-Thomas

Update: The yealink driver and yeaphone (both from this site) are now fully supporting the P4K!
[32] Eingetragen von Ross am Donnerstag, 22.11.2007 @ 08:33
The link to the freshtel driver is now broken. It should be:
http://lekernel.net/scrapbook/freshtel.html
The code there needs tweaking to compile w/ 2.6.22, but I got the event-driver parts working (not the display yet, alas)
(for those interested the changes are SLAB_ATOMIC -> GFP_ATOMIC and comment out input_regs)
Antwort von Thomas: Thanks, I updated it above. From what you wrote I think it's definitely time for a user-space driver.
[33] Eingetragen von Anthony Rumble am Donnerstag, 6.12.2007 @ 03:17
Fedora Core 8
kernel 2.6.23.8-63.fc8
linphone 1.7.1-4.fc8
yeaphone-0.1-0

Could not find event link in directory /sys/bus/usb/drivers/yealink/2-1:1.3/!

dmesg doesn't show anything interesting..
usb 2-1: new full speed USB device using uhci_hcd and address 3
usb 2-1: configuration #1 chosen from 1 choice
input: Yealink usb-p1k as /class/input/input9
usbcore: registered new interface driver yealink
drivers/input/misc/yealink.c: Yealink phone driver:yld-20051230
(END)

This used to work on FC7... something changed somehwere... can't work out where..

Any ideas?
could they have re-named the event dev symlinks or something??

Anthony
[34] Eingetragen von Karoly am Dienstag, 8.01.2008 @ 22:19
I've just got a Fonaso P1K USB phone. I was planning to use it with the Slug, unfortunately it turned out to be actually a P1KH phone ("invalid playload size 8"...).
You mentioned that you were working on a library that would support this model. I know you pretty much stopped this project but I was wondering whether you've got a working kernel module.

Thanks, Karoly
[35] Eingetragen von Seb am Montag, 14.01.2008 @ 18:54
Hi Thomas,
thanks for your job.

I had a Debian on my Slug.
For Etch, linphone is in version 1.5 and for Lenny 2.0.
So i decide to compile a good version of linphone 1.7.1 and Yeaphone on my slug.

But when i type soundcard list in linphonec, nothing appear.

If anybody can help me, thanks in advance

DMESG :

usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
usbcore: registered new driver hiddev
hiddev96: USB HID v1.10 Device [Yealink Network Technology Ltd. VOIP USB Phone ] on usb-0000:00:01.2-1.4
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
Vendor: Sony Model: Storage Media Rev: 0100
Type: Direct-Access ANSI SCSI revision: 00
usb-storage: device scan complete
Vendor: WD Model: 5000AAJB Externa Rev: l108
Type: Direct-Access ANSI SCSI revision: 00
usb-storage: device scan complete



UNAME :
Linux slug 2.6.18-5-ixp4xx #1 Sun Dec 23 05:17:39 UTC 2007 armv5tel GNU/Linux

[36] Eingetragen von Mikko am Donnerstag, 28.02.2008 @ 17:27
Hi.

I have read devbase.at/voip/yeaphone and NSLU2-Linux instructions about setting up voip phone system on NSLU2. I have unslung 6.x flashed to NSLU2 and I have Yealink USB-P1K but I can't decide which is compatible set up for these. So can I ipkg update linphone and yeaphone to unslung or do I have to have SlugOS. Or should I use asterisk on unslung and configure linphone USB-P1K somehow.

What do You suggest?

much obliged!
[37] Eingetragen von David Wilson am Freitag, 7.03.2008 @ 10:09
Hi,

Yeaphone looks amazing ! Well done !
I've just installed linphone-2.1.1 and been trying yeaphone. Calls are working perfectly however I get a 'Reg failed' on the USB-P1K handset after I make a call.
This 'Reg failed' happens after each call I make from the handset via yeaphone.
To fix this I shutdown the phone by holding the red button on the handset. Once this is done the phone boots again and yealink initiates a register. I can then call again, but as soon as I hangup the call I get 'Reg failed' again and have to reboot the phone again.
Any ideas why ?

If I dial manually from linphonec without using yeaphone there is no problem with registeration after each call.

Kind regards
David Wilson
Antwort von Thomas: Hi David,
this behavior is new to me although I did not test with linphone versions > 1.7 yet. There was some rather infrequent issue with not registering any more after a failed registration. By your problem sounds a bit different. I will try with version 2.1.1 to see what's going on...
Regards,
-Thomas

Update (Jul 13, 2008):
This is indeed a problem with states provided by liblinphone. You can find a patch for linphone at http://download.devbase.at/voip/linphone-2.1.1.patch. To apply it go into the linphone directory and type:
Code:
patch -p1 < linphone-2.1.1.patch

I also submitted this patch to the linphone developer.
-Thomas
[38] Eingetragen von David Wilson am Mittwoch, 12.03.2008 @ 10:00
Thanks Tom !

Please shout if there's anything that I may do to assist from this side ?
-David
[39] Eingetragen von mmikel am Mittwoch, 12.03.2008 @ 10:15
Hi!

I was made some changes to savannah's yealink module.
Now it works fine with my SkypeMate P4K.
/dev/input/eventX and /sys/..../yealink interfaces both works fine with 2.6.22.17 (openSuse 10.3).

Next step is a desktop application )))
[40] Eingetragen von Davor Emard am Freitag, 28.03.2008 @ 11:38
HI

I have some attempts to make uinput driver
for a usb phone skype-at-phone EX-B
that looks like http://www.greatestsale.com/products/ex-b/ex-b.jpg
there are still some kernel uinput bugs 2.6.24.4
that prevent LCD from working together with ringer and the LED but I have reported that
and hope soon to work
Source is rought at the edges, I can send you source in case someone would like to convert
yeaphone to userspace driven or support other
phone models too

Best regards, Davor
[41] Eingetragen von Daniel am Dienstag, 1.04.2008 @ 22:30
I'm using the Freshtel FT-102 USB VOIP Phone. I installed yealink succefully. All the buttons are working but when launch 'launchphonec' and do 'soundcard list'. I don't have the option of VOIP USB PHONE.
Does anybody know how to fix this?
I'm Using Ubuntu Gutsy.

Regards

D.
[42] Eingetragen von Jatin am Samstag, 19.04.2008 @ 04:39
Hi Thomas,
I have installed linphonec on the Slug and have registered my number successfully. Thank you very much for the step by step instructions to do so. But there seems to be one problem. I can call numbers but the audio on the phone doesn't work. Whenever a call has been made, i keep getting messages like this continuously as long as the call is active :
ALSA lib pcm.c:2146:(snd_pcm_open_noupdate) Unknown PCM plughw:0,0
Please help me out with this. I tried a lot of things but nothing is working. I have used SLUGOS/BE 3.10b and my kernel version is 2.6.16.
Thanking you in advance.

Regards,
Jatin
Antwort von Thomas: For the record, we found out that Jatin's phone is a newer P1KH with the ID 6993:b700. I started modifying the original yealink kernel module and finally we got it fully working. The source code is available at http://www.devbase.at/svn/view.cgi/yealink-module/trunk/?root=voip
[43] Eingetragen von Johan am Freitag, 20.06.2008 @ 03:29
Having trouble with getting events similar to previous posts.
Code:
Could not find event link in directory /sys/bus/usb/drivers/yealink/1-2:1.3/!

running kernel 2.6.25-2-686 and checked for evdev running.
I get nothing found when I execute
Code:
ls -l `find /sys -name ringtone -printf %h`/input:event*

and I see event files in /dev/input .
I'm now quite stuck , any advice ?

Cheers, Johan
Antwort von Thomas: Seems like I have to implement a different algorithm soon as people are using newer kernel versions.
[44] Eingetragen von Johan am Sonntag, 22.06.2008 @ 21:22
Just a quick follow up, moved to an older 2.6.18 kernel and all is well , cheers for the great bit of software :)

Johan
Antwort von Thomas: There is an updated yeaphone available in the trunk of the SVN repository which should work also with newer kernel versions. If you want, check it out.
-Thomas
[45] Eingetragen von Pawel am Donnerstag, 26.06.2008 @ 11:00
Hi Thomas,

I have the same problem as Johan has. Yeaphone doesn't work with newer kernel release (2.6.25) and for the other reason I can't return to the older one. There is other file structure in /sys/bus/usb/drivers/yealink. Maybe it is possible to get newer version of Yeaphone from development repo? But I don't know how.

Thanking You in advance.

Regards,
Pawel
Antwort von Thomas: Pawel, unfortunately there is no update to yeaphone right now, but I will work on it in the next days. The source code can be viewed at http://www.devbase.at/svn/view.cgi/yeaphone/?root=voip where you can also find the instructions to directly access the svn repository.
-Thomas

Update (Jul 13, 2008):
The 'trunk' of yealink now supports recent kernel versions!
[46] Eingetragen von Paweł am Montag, 14.07.2008 @ 12:22
Thank to great help obtained from Thomas I was able to get run yeaphone on the recent kernel version. There is the new version of yeaphone in devel repo and it works faultless. There is also the new superior version of yealink kernel module in the devel repo which support my version of Yealink handset.

Great work Thomas!!!

I rest owe to You!!!

Regards,
Pawel
[47] ./configure doesn't work on FC9
Eingetragen von maxben am Mittwoch, 13.08.2008 @ 16:29
Hi Tomas,
(sorry for my little english....)

I try to compile yeaphone-0.1.5 on Fedora 9 (i386) with the follow package installed:
# rpm -qa | grep linphone
linphone-devel-2.1.1-1.fc9.i386
linphone-2.1.1-1.fc9.i386

When I launch "./configure" (before the compilation) it stops because don't finds the include-file.
:::::::::::::::::::::::::::::
checking for pthread.h... yes
checking linphone/linphonecore.h usability... no
checking linphone/linphonecore.h presence... no
checking for linphone/linphonecore.h... no

On my system the library are on /usr/include/linphone:
# ll /usr/include/linphone/
total 36
-rw-r--r-- 1 root root 4845 2008-02-15 04:53 config.h
-rw-r--r-- 1 root root 22847 2008-02-15 04:53 linphonecore.h
-rw-r--r-- 1 root root 1859 2008-02-15 04:53 lpconfig.h

Where I make a mistake?
Thanks in advance.

Max.
[48] help with b2k
Eingetragen von Federico am Montag, 1.09.2008 @ 01:13
Hi Thomas!

I'm testing yealink-module-r101 with b2k.

# echo -n PSTN > /sys/devices/pci0000:00/0000:00:1d.2/usb3/3-1/3-1:1.3/show_icon
# echo -n PSTN > /sys/devices/pci0000:00/0000:00:1d.2/usb3/3-1/3-1:1.3/hide_icon
# echo -n DIALTONE > /sys/devices/pci0000:00/0000:00:1d.2/usb3/3-1/3-1:1.3/show_icon

then If I press any keys on phone (I can be on bach or any form with cursor) I got it back but with loop, with key 5:
5555555555555555555555555555555555555555555555555555555555555555555555555555555
it stop only if I hangup or after turn of the DIALTONE flag.
is it normal?

I would like to write small C utility for catch an input phone-number and save it in a integer, but how to resolve the loop?

thanks for your work, best regard
Federico
[49] using P1k usb phone on ubuntu
Eingetragen von alfred am Mittwoch, 17.09.2008 @ 15:55
Hi, I am trying to use the P1k usb phone with linphone on ubuntu and I come across your website here. However, many of the instructions / comments listed here are very technical for me. Just wondering if you can give me directions on exactly what should I do or type, what and where to download, etc. Thanks in advance for your help.
Antwort von Thomas: Hi Alfred,
there are two main parts involved - 1. the yealink kernel mode driver for the handset, and 2. linphone + yeaphone.
yeaphone has to be compiled from source right now, there is no package for ubuntu available (yet). But the driver could be already installed on your system.
Can you confirm that when you plug in the phone and press a few buttons, these buttons result in eg. '1', '2', '3' ... being displayed in your active window (eg. a terminal)? If not check if the module yealink is loaded ("lsmod"). If not or if you see some error messages in the kernel log (type "dmesg"), then you also need to compile the kernel module from source.

As I do not use ubuntu on a regular basis, I will have to check what exact packages you need to install and get back to you in a few days via email.
Regards,
-Thomas
[50] Problem with P1K-H handset and yealink kernel module
Eingetragen von Paweł am Dienstag, 25.11.2008 @ 12:03
Hi Thomas once again,

I've a problem with my P1K-H handset and yealink kernel module downloaded from Your site (ver. yld-20080518) . My kernel version is 2.6.27. The handset is recognized by yealink module only occasionally, and usualy doesn't work.

Before, with previous version of kernel the handsed used to run with the same version of yealink module.

I can't write any more details because I'm not a kernel hacker.

Thanks You in advance,
Paweł
Antwort von Thomas: Hi Pawel,
I did not try version 2.6.27 of the kernel, but I will investigate what the problem is. As soon as I find out more I let you know.

---------

Hi Pawel,
sorry for the late response, I wanted to upgrade my system to 2.6.27 before looking into this problem.
What I am guessing your problem could be is, that the PID 0xb700 is still not registered in the USB HID quirks. Did you patch your previous kernel but forgot to do so for the new kernel? The file in question is drivers/hid/usbhid/hid-quirks.c where you find an entry for YEALINK devices and where another entry for the PID=0xb700 is neccessary.

A quick test to see whether the yealink driver works (even without the above patch) is to detach the hid driver before loading the yealink driver, i.e.
1. connect handset
2. run detach-yealink.sh (see [url]http://www.devbase.at/svn/view.cgi/yealink-tools/trunk/detach-yealink.sh?root=experimental&revision=43&content-type=text%2Fplain[/url])
3. remove yealink driver (if already loaded) by executing "rmmod yealink"
4. reload yealink driver ("insmod yealink.ko" or "modprobe yealink")

Does it work now?
Best regards.
[51] Error Message: Could not find the input:inputX!
Eingetragen von Felix am Donnerstag, 8.01.2009 @ 21:55
Hi Thomas,

I compiled and installed yeaphone 0.1.5 on Ubuntu Feisty, kernel 2.6.24-22-generic.
I used the phone (without display) with other software (ekiga, twinkle).
The phone is a Freshtel FT-102 VoIP USB Phone, dmesg says:

[957343.186450] /build/buildd/linux-2.6.24/drivers/input/misc/yealink.c: urb_irq_callback - urb status -108
[957343.186480] /build/buildd/linux-2.6.24/drivers/input/misc/yealink.c: urb_irq_callback - usb_submit_urb failed -19
[957365.014825] usb 4-2.1: new full speed USB device using uhci_hcd and address 10
[957365.143318] usb 4-2.1: configuration #1 chosen from 1 choice
[957365.210385] input: Yealink usb-p1k as /devices/pci0000:00/0000:00:13.1/0000:03:04.0/usb4/4-2/4-2.1/4-2.1:1.3/input/input18

yeaphone does not start:

# yeaphone
Could not find the input:inputX!
No appropriate handset found, exiting

Best regards
Felix
Antwort von Thomas: Hi Felix,
could you please try the 'trunk' version of yeaphone? It differs from 0.1.5 in exactly the area you describe, i.e. handling different variations of the sysfs directory layout. Looking at your dmesg output and my comments in the new code that version should work fine for you.

If it works for you I will create an official version 0.1.6 as other users may face the same problem.

Best regards,
-Thomas
[52] I got it to compile..now another thing google wont tell. EVIOCGRAB: DEVICE OR RE
Eingetragen von Noah P am Sonntag, 11.01.2009 @ 04:59
yeaphone finds my p4k, but aborts due to this error. Could you please help me?

watson540@localhost ~ $ yeaphone
path_sysfs = /sys/bus/usb/drivers/yealink/2-3:1.3/
path_event = /dev/input/event6
Detected handset Yealink USB-P4K
Ready
playback device = ALSA: plughw:1
EVIOCGRAB: Device or resource busy
Aborted
[53] I got it to compile..now another thing google wont tell. EVIOCGRAB: DEVICE OR RE
Eingetragen von Noah P am Sonntag, 11.01.2009 @ 05:14
I must be lucky because I sat there and grepped all your files for an instance of 'EVIOCGRAB' and found it in ylcontrol.h

so I took a look in there with nano and thank goodness for your good commenting practices I knew it may be a safe bet to try and comment that part out and try a recompile!!

wow it actually doesn't die now! I think I just need to sort some linphone auth stuff out and I
m good but thanks! jjjust thought you would want to know what I did, although unfortunately I cant tell you why it happens on my box..

Noah
[54] and the saga continues
Eingetragen von Noah P am Sonntag, 11.01.2009 @ 06:59
so i may have commented out the part i really needed now that i realize it. i got linphone to work and now the phone keys dont do anything but enter stuff in the console heh......


i'll keep cracking at it..mst figure out why the compile error occurs after all!
[55] the end
Eingetragen von Noah P am Sonntag, 11.01.2009 @ 07:14
as you can tell im nowhere near a programmer! but it was a nice ride..

i could hardly find clues about eviocgrab but i just came up with the idea the kill x and try since i knew that was something to do with it, plus a nslu2 wouldnt be running x!

so lo and behold it worked! im lucky enough to be able to run in in a virtual console as well with x on the other!

thanks for the software!
Antwort von Thomas: Hi Noah,
great that you got it running. After reading your first post I wanted to suggest what you eventually tried yourself - the X server grabs the event device itself and therefore yeaphone cannot take it over. Why your X server behaves like this in the first place I still don't know, on my machine this is not the case.
[56] questions regarding the phone ringing and backlight on p4k
Eingetragen von Noah P am Dienstag, 13.01.2009 @ 09:58
I'm sorry to bother you. I'm really enjoying the software. At first I tried using it with SipTheeSkype, because unfortunately it's still the cheapest voip around (in the us anyway). Unfortunately I don't think linphone quite works with it yet (or ever?). Only I tried for hours different configs, only to google about it later and see somewhere someone saying linphone wouldn't work with it. (the dev of SipTheeSkype I think)

So I got a voip.ms account. It's going well. Dial from handset works well

I realize that the p1k is your initial specialty and I doubt you even have a p4k. But for some reason I'm having problems getting a hearable ringtone out of the phone. When it does ring it rings out of both the internal handset speaker, and the speakerphone speaker.

I'm not sure which config takes precedence, linphones or yeaphones. Both have settings for ringtones. I ccan't get either to output the sound I want.

At first I tried a wav file, then I tried using your included .bin files instead.

Will the software play a wav?? does it need to be a certain bitrate?? does it matter what linphone is set to?? And can I just set it to ring from pc speaker instead??

Also, the backlight. I read (I think) thaaat you implemented the hook switch part of the p4k, but the backlight never comes on. It would be great to have it come on when the hook is lifted (is the backlight even in the sysfs interface? dont remember seeing it), or to at least have a button on the phone to turn it on and off. Which brings me to my next question.

Any way now or in the future to config the keys myself on the p4k??? most have no function for me.

Thanks for your time reading this and I apppreciate any reply
Noah
[57] Further investigation.
Eingetragen von Noah P am Dienstag, 13.01.2009 @ 19:58
Hello again.

Upon further investigating I've managed to answer most of my questions.

Basically the p4k is expiremental right now. No backlight functions in sysfs mean no backlight. And I suppose that since there is no usb speaker recognized by the yeaphone driver, then ringing on the phone itself is out of the question (actually though sound does come out my speakerphone speaker and handset, it's just the speakerphone is too low to hear)

So I guess the only important question would be, How can I make this a feasible solution? The only thing I need is to be able to hear the phone ring, everything else works great.

So I really wondered, is it possible for me to edit the sources to route the ringing to the computer speaker (or a different alsa channel)?

Could you give me a magic term to throw in somewhere?? I'm going to look into it anyway but given that I'm no coder it would be very difficult for me, though I have no problem editing source if I know what to look for, and recompiling.

Thanks
Antwort von Thomas: Hi Noah,
over time I added all of the functionality of the P4K to the yealink driver, so the trunk version in my svn repository should work for you. But I cannot guarantee for anything, i.e. no one of the kernel's USB gurus took a look at it, especially the whole mutex/semaphore stuff. Nevertheless my P1K works fine and a Russian guy reported 100% success with his P4K some time ago.
You will notice one more entry in the sysfs directory called model which tells you the type of handset attached. Your's should say "P4K".

Now for the yeaphone application. Some P4K features were already used in a basic way, but I just added some more stuff handling picking up and hanging up the phone and the sounding the dial tone. The user interaction might not be 100% perfect yet, and I did not really test it, because as you guessed right, I do not own the phone. And firing up my self-made phone model would be too big of a job right now.

So you could verify the basic functionality of the driver via sysfs and then just compile and test the trunk version of yeaphone. There should be at least some improvement.

BTW, for the P1K(H) yeaphone disables ringing via the phone's internal sound card, but for the P4K audio should be routed to the phone automatically. So ~/.linphonerc the entry "ringer_dev_id" is meaningless, but "ring_lev" should control the volume of the ringtone. For the P4K the ringtone is the wav-file specified with "local_ring", and I guess it may be any wav-file, eg. /usr/share/sounds/linphone/rings/oldphone.wav, which comes with linphone.

Hope you have some more success now.
Regards,
-Thomas

Update:
Yeaphone 0.1.6 now also supports the P4K model!
[58] yeaphone as daemon
Eingetragen von Felix am Samstag, 7.03.2009 @ 12:47
Hi Thomas,

I am using yeaphone quite a while now and it is really stable. But there is a minor annoyance:
I have to start yeaphone from the command line. I wrote a simple init script, but yeaphone is never executed at startup. I tried to monitor it using monit, but monit is also not able to bring up yeaphone. Executing the script in a shell works fine.

I think this is because of yeaphone does not fork like a daemon (http://www.itp.uzh.ch/~dpotter/howto/daemonize) but I am no expert. I tried to detach yeaphone (yeaphone &) and to exec it (exec 2>&1 yeaphone) but without success.

Did anyone write a working startup script (for debian/ubuntu?)

Regards
Felix
Antwort von Thomas: Hi Felix,
you might have to set the HOME environment variable in your startup script. Yeaphone and liblinphone look for their configuration files in that directory. So something like
Code:
HOME=/home/felix
export HOME

at the top of the script might help.
-Thomas
[59] Syslog is filling up FAST
Eingetragen von Noah P am Samstag, 23.05.2009 @ 19:11
Hi Thomas,

It's your old buddy Noah here :). Haven't talked in a while, so long I lost your email addy (I thought I had you saved as a contact)

I'm having a problem here, related to your program but more likely something I messed up in my kernel config is causing the problem. I was just hoping you may point me in the right direction here.

I've noticed lately, not sure when it started (but probably when I last recompiled the kernel) ..The logs are filling up with this:

[664534.807199] usb 2-6: ### URB IRQ: cmd=0x80, data0=0x16
[664534.807204] /home/watson540/voip/yealink-module/trunk/yealink.c: S: t=0,u=0,s=1,p=0
[664534.807208] /home/watson540/voip/yealink-module/trunk/yealink.c: t=0,u=0,s=0,p=0
[664534.807210] /home/watson540/voip/yealink-module/trunk/yealink.c: pausing updates

---over and over again..and it prints that a few times per second!! My /var/log/messages file was 8 gigs the other day!!.

I've been trying to get rid of this but have no iddea how. It starts as soon as I load the yealink module and quits as soon as I rmmod it.

Is there some sort of kernel option I need to omit? or maybe something I can plug into the makefile to kill this noise?! (I did look in the makefile and tried commenting out the line that had "debug" on it to no avail.

Thanks for your time Thomas as I know you're a busy important person, but any reply/help you can offer is..as always...MUCH APPRECIATED!

Thanks,
Noah
Antwort von Thomas: Seems like DEBUG is defined somehow. The debug options should be disabled in the checked in version of the Makefile anyway, like:
Code:
#EXTRA_CFLAGS += -DDEBUG -O0 -g -Wall
Maybe you compiled the whole kernel with debugging enabled and this enables debugging in the yealink module as well. You can try two things:
  • In yealink's Makefile set
    Code:
    EXTRA_CFLAGS += -UDEBUG
    which may undefine DEBUG.
  • In yealink.c redefine the dbg macro just in front of the definition of YEALINK_DBG_FLAGS with:
    Code:
    #define dbg(format, arg...) do {} while (0)
    which is what it should be without DEBUG being set anyway - see /usr/src/linux/include/linux/usb.h.

When I compile the yealink module for some 2.6.30-rc I will check for this issue because what you see definitely should not happen.

PS: Not so sure about the "important person" :-/
[60] compile question
Eingetragen von Felix am Freitag, 5.06.2009 @ 22:38
Hi Thomas,

I configured yeaphone with
./configure LINPHONE_CFLAGS="-I/usr/local/linphone/include" LINPHONE_LIBS="-I/usr/local/linphone/lib"

(linphone is a patched 2.1.1 --prefix /usr/local)

typing make it gives me

yeaphone-lpcontrol.o: In function `override_soundcards':
/usr/local/src/yeaphone-0.1.6/src/lpcontrol.c:251: undefined reference to `ms_snd_card_destroy'

and a couple of other undefined references (f.e. linphone_core_init). Seems like I am doing wrong with the configure options. I found out how to patch the sources, but this is to much for me.

Regards
Felix
Antwort von Thomas: Hi Felix,
the location of the required header and library files should be determined automatically via pkg-config. You should see the correct locations when typing
Code:
pkg-config --cflags --libs linphone

Maybe you need to set the directory prefix for pkg-config manually before running configure (or the above command), eg.
Code:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

Does it fix the problem?
-Thomas
[61] Any plans on linphone3 ?
Eingetragen von UserUnknown am Samstag, 8.08.2009 @ 13:08
Hello, do you have any plans to patch or modify yeaphone for compiling against linphone 3.x.x ?

It works with linphone 2.x.x perfectly but in gentoo this version was marked as obsolete and was removed from the repository tree.

P.S. Just wondering :-) Thanks for the great job!
Antwort von Thomas: Hi,
see my answer to the next posting, I will take a look at it in the next days/weeks.
[62] problem to compile yeaphone 0.1.6
Eingetragen von sebastian am Montag, 17.08.2009 @ 11:48
i can not compile yeaphone:

make[2]: Betrete Verzeichnis '/home/adyna/Desktop/yeaphone-0.1.6/src'
gcc -g -O2 -Wl,--rpath -Wl,/usr/local/lib -lpthread -o yeaphone yeaphone-lpcontrol.o yeaphone-yeaphone.o yeaphone-ylcontrol.o yeaphone-yldisp.o yeaphone-ypconfig.o yeaphone-ypmainloop.o yeaphone-ylsysfs.o -L/usr/local/lib -llinphone
yeaphone-ylcontrol.o: In function `stop_ylcontrol':
/home/adyna/Desktop/yeaphone-0.1.6/src/ylcontrol.c:859: undefined reference to `gstate_get_state'
yeaphone-ylcontrol.o: In function `lps_callback':
/home/adyna/Desktop/yeaphone-0.1.6/src/ylcontrol.c:578: undefined reference to `gstate_get_state'
/home/adyna/Desktop/yeaphone-0.1.6/src/ylcontrol.c:579: undefined reference to `gstate_get_state'
/home/adyna/Desktop/yeaphone-0.1.6/src/ylcontrol.c:580: undefined reference to `gstate_get_state'
yeaphone-ylcontrol.o: In function `handle_long_key':
/home/adyna/Desktop/yeaphone-0.1.6/src/ylcontrol.c:537: undefined reference to `gstate_get_state'
yeaphone-ylcontrol.o:/home/adyna/Desktop/yeaphone-0.1.6/src/ylcontrol.c:538: more undefined references to `gstate_get_state' follow
collect2: ld gab 1 als Ende-Status zurück
make[2]: *** [yeaphone] Fehler 1
make[2]: Verlasse Verzeichnis '/home/adyna/Desktop/yeaphone-0.1.6/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Verlasse Verzeichnis '/home/adyna/Desktop/yeaphone-0.1.6'
make: *** [all] Fehler 2
Antwort von Thomas: Hi Sebastian,
I guess you either do not have the linphone development files (header files, libtool library file) installed, or you more likely linphone >=3 is installed. The library functions in these versions changed a bit, eg. gstate_get_state now seems to be called linphone_core_get_state. It is actually the first time I take a look at the new functions.
As someone else also asked for supporting linphone >=3 I will try to adapt yeaphone to also work with the new versions. Cannot give you a timeframe yet.
[63] feature suggestion
Eingetragen von Felix am Donnerstag, 17.09.2009 @ 09:42
Hi Thomas!
Since I got the P1K to run (with your gentle help), I bought me a P4K (main reason was the longer cable).
I followed your instructions on this site (yealink driver) and finally got it working. Thank you for your excellent work.

Now I would like to have some more features (as always):

- is there a way to grab the button events from command line? Like event -> trigger or will I have to lay hand on your source (not preferred). Are there more buttons with underlying functionality?

- I heard that you managed to get sound out of the speaker. If I play sound to the phone (mpg123-alsa -aplug:hw:1 /home/homer/signale/tuerklingel.mp3) it comes out of the headset speaker. Is there a way to switch that on on demand (like "yeaphone switch speaker")? Could you please point me to a "configure-only" solution (like sth. with linphone like "linphone ring asound.mp3 now"?)

As I said, it works (like the PK1), so no need to get stressed.

Cheers
Felix
[64] Real problem
Eingetragen von Felix am Sonntag, 27.09.2009 @ 13:32
Hi Thomas,

now to a real problem (dials, I can hear my sipgate message, but no sound comes after connection to the other side, phone generally does not react to pickup of handset) (P4k, kernel 2.6.28-15-generic):
I compiled (twice) the yealink driver, it loads into the kernel: yealink: Yealink phone driver: 20080819 (C) Thomas Reitmayr, Henk Vergonet
I compiled yeaphone (twice) 0.16
syslog says
kernel: [759866.679944] yealink: Received packet with invalid checksum, dropping it
kernel: [759890.656791] yeaphone[19564]: segfault at b8bac0d1 ip b5bfd62b sp b63ff3cc error 6

What have I done wrong?
Cheers
Felix
[65] All ok
Eingetragen von Felix am Samstag, 3.10.2009 @ 10:48
Hi Thomas,
sorry for spamming you. New kernel, new compile and the error is gone.

yeaphone still does not recognize when I pickup/hangup the phone. I cannot end the call. And: I have now a microphone activated in my living room (ouch -> privacy)

Cheers
Felix
[66] linphone 3
Eingetragen von Igor am Samstag, 24.10.2009 @ 15:30
I wirte patch, now yeaphone can use linphone ver 3.
In a few days I try to test it and post here for public testing.
Antwort von Thomas: Wow, that would be great. I do not have the time to do that myself right now and distributions were switching to linphone 3 already, so your patch would be much appreciated!

You could post a link here or send me the patch and I will put it on this web-page (of course with acknowledging you as the source). Later, if it is ok for you, I would incorporate the patch + copyright notice in the code.
[67] linphone 3
Eingetragen von Igor am Sonntag, 1.11.2009 @ 10:54
Patch is very simple.
Only one function was changed gstate_get_state => linphone_core_get_state.
Now we need LinphoneCore in ylcontrol.c, so I add pointer to this structure to ylcontrol_data_t.
Code:
Index: src/lpcontrol.c
===================================================================
--- src/lpcontrol.c (revision 140)
+++ src/lpcontrol.c (working copy)
@@ -297,6 +297,7 @@
lpcontrol_timer_callback, &lpstates_data);
linphone_core_init(&(lpstates_data.core_state), lpstates_data.vtable,
lpstates_data.configfile_name, &lpstates_data);
+ setLinphoneCore(&(lpstates_data.core_state));
override_soundcards();
break;

Index: src/ylcontrol.c
===================================================================
--- src/ylcontrol.c (revision 140)
+++ src/ylcontrol.c (working copy)
@@ -72,12 +72,18 @@

int hard_shutdown;
int linphone_2_1_1_bug;
+
+ LinphoneCore* lc;
} ylcontrol_data_t;

ylcontrol_data_t ylcontrol_data;

/*****************************************************************/

+void setLinphoneCore(LinphoneCore* lc) {
+ ylcontrol_data.lc = lc;
+}
+
void display_dialnum(char *num) {
int len = (num) ? strlen(num) : 0;
if (len < 12) {
@@ -278,9 +284,9 @@
gstate_t lpstate_call;
gstate_t lpstate_reg;

- lpstate_power = gstate_get_state(GSTATE_GROUP_POWER);
- lpstate_call = gstate_get_state(GSTATE_GROUP_CALL);
- lpstate_reg = gstate_get_state(GSTATE_GROUP_REG);
+ lpstate_power = linphone_core_get_state(ylc_ptr->lc, GSTATE_GROUP_POWER);
+ lpstate_call = linphone_core_get_state(ylc_ptr->lc, GSTATE_GROUP_CALL);
+ lpstate_reg = linphone_core_get_state(ylc_ptr->lc, GSTATE_GROUP_REG);

/* preprocess the key codes */
switch (code) {
@@ -542,8 +548,8 @@
gstate_t lpstate_power;
gstate_t lpstate_call;

- lpstate_power = gstate_get_state(GSTATE_GROUP_POWER);
- lpstate_call = gstate_get_state(GSTATE_GROUP_CALL);
+ lpstate_power = linphone_core_get_state(ylc_ptr->lc, GSTATE_GROUP_POWER);
+ lpstate_call = linphone_core_get_state(ylc_ptr->lc, GSTATE_GROUP_CALL);

switch (code) {
case 14: /* C */
@@ -583,9 +589,9 @@
/* make sure this is the same thread as our main loop! */
assert(yp_ml_same_thread());

- lpstate_power = gstate_get_state(GSTATE_GROUP_POWER);
- lpstate_call = gstate_get_state(GSTATE_GROUP_CALL);
- lpstate_reg = gstate_get_state(GSTATE_GROUP_REG);
+ lpstate_power = linphone_core_get_state(lc, GSTATE_GROUP_POWER);
+ lpstate_call = linphone_core_get_state(lc, GSTATE_GROUP_CALL);
+ lpstate_reg = linphone_core_get_state(lc, GSTATE_GROUP_REG);

model = ylsysfs_get_model();

@@ -864,7 +870,7 @@

void stop_ylcontrol() {
ylcontrol_data.hard_shutdown = 1;
- if (gstate_get_state(GSTATE_GROUP_POWER) == GSTATE_POWER_OFF) {
+ if (linphone_core_get_state(ylcontrol_data.lc, GSTATE_GROUP_POWER) == GSTATE_POWER_OFF) {
/* already powered off */
yldisp_hide_all();
yp_ml_stop();
Index: src/ylcontrol.h
===================================================================
--- src/ylcontrol.h (revision 140)
+++ src/ylcontrol.h (working copy)
@@ -36,5 +36,6 @@
void wait_ylcontrol();
void stop_ylcontrol();

+void setLinphoneCore(LinphoneCore* lc);

#endif
[68] Igors patch
Eingetragen von Felix am Dienstag, 10.11.2009 @ 11:10
Hi Igor,
thank you for the patch. It compiles and linphone3 does not show the reg failed error. Good work
Felix
[69] reg failed error
Eingetragen von Felix am Samstag, 14.11.2009 @ 09:49
Hi!
The reg failed error now comes over night, not immediately after placing a call. The display shows "Reg failed", the phone is dead. The sip provider says that the phone is registered.
Felix
[70] Thanks..still going strong!
Eingetragen von Noah P am Dienstag, 19.01.2010 @ 03:34
Been using this app for over a year now and I love it..It never crashes..and acts JUST like any other phone.

I just upgraded to the latest linphone version and compiled the svn, and everything is still going well (except for the alsa errors, but thats linphones fault)

But I was playing around with linphone today after the upgrade, and was just reading things in debug mode..I noticed that my particular sip provider sends a "message waiting" info thingy through linphone as well as how many messages are in the mailbox..

Now..wouldn't this be so cool if we could take advantage of this? I'm thinking along the lines of making the LED blink (couldn't find it in the sysfs interface though)..so maybe more feasible, (and cool, for those of use with p4k's and that big blue backlight..controllable through sysfs) to make the backlight blink when you have messages?! Like, 1 blink for 1 message, 2 blinks for two messages..etc..

Not sure how this would affect the backlight coming on when the phone comes off hook though..best would be for it to just act normal in that instance, and resume blinking when you hang-up..

Is this do-able??
Or
Is it doable without source modification or your part?? like an app to watch a linphone logfile, if there is such a thing, and send the sysfs command to blink the backlight if there is a "message waiting"

Oh well, just fantasizing. You've been good to us so far.
THanks
Antwort von Thomas: Hi Noah,
good to hear the phone still works :-)
I tried linphone and linphonec with a VoIP provider supporting the SUBSCRIBE command for MWI. However linphone never subscribed to the "message-summary" event. There does not seem to be a setting for enabling this event subscription, or did you find one?
How does this look on your side? Do you actually receive something like:

================================
NOTIFY sip:alice@alice-phone.example.com SIP/2.0
To: <sip:alice@example.com>;tag=78923
From: <sip:alice@example.com>;tag=4442
Date: Mon, 10 Jul 2000 03:55:07 GMT
Call-Id: 1349882@alice-phone.example.com
CSeq: 20 NOTIFY
Contact: <sip:alice@vmail.example.com>
Event: message-summary
Subscription-State: active
Content-Type: application/simple-message-summary
Content-Length: 99

Messages-Waiting: yes
Message-Account: sip:alice@vmail.example.com
Voice-Message: 2/8 (0/2)
================================

Using PJSIP I actually see this kind of message with one of my VoIP accounts, but not using linphone.
-Thomas
[71] Reply
Eingetragen von Noah am Freitag, 12.02.2010 @ 13:52
Hey,
I just checked over here to see if you reponded. I didnt get and email like i used to but it seems since i iswitched dns providers a lot of places are having problems with no MX record for my domaion, though its clearly set in zoneedit.

Anyway, if I understand your question...Yes, here is a paste from linphonec -d6

NOTIFY sip:102378@192.168.1.64:5060;line=5b83eb177a4d8fb SIP/2.0
Via: SIP/2.0/UDP 74.63.41.218:5060;branch=z9hG4bK5afc52fa;rport
From: "Unknown" <sip:Unknown@74.63.41.218>;tag=as1ca35e07
To: <sip:102378@192.168.1.64:5060;line=5b83eb177a4d8fb>
Contact: <sip:Unknown@74.63.41.218>
Call-ID: 7ad79c7074b0a951115b877b75a684af@74.63.41.218
CSeq: 102 NOTIFY
User-Agent: VoIPMS/SERAST
Max-Forwards: 70
Event: message-summary
Content-Type: application/simple-message-summary
Content-Length: 93

Messages-Waiting: yes
Message-Account: sip:asterisk@74.63.41.218
Voice-Message: 1/1 (0/0)

:)
[72] yealink.ko does not load
Eingetragen von Felix am Donnerstag, 6.05.2010 @ 19:31
Hi!
Since a couple of kernel updates, I get
insmod: error inserting './yealink.ko': -1 Invalid module format
dmesg reports:
yealink: disagrees about version of symbol module_layout

I could not find a solution using google. Most threads recommend to compile the source local, what I did. Must be a stupid mistake.
Kernel is 2.6.31-21-generic

Felix
[73] Whats wrong?
Eingetragen von Sergey am Dienstag, 27.07.2010 @ 13:35
root@veo-desktop:/home/veo/Downloads/linphone-3.3.2# aptitude search linphone
p liblinphone-dev - linphone web phone's library (supporting the SIP protocol)
v liblinphone2-dev -
i A liblinphone3 - linphone's shared library part (supporting the SIP protocol)
p linphone - SIP softphone - graphical client
i A linphone-common - Shared components of the linphone SIP softphone
i linphone-nox - SIP softphone - console-only client
root@veo-desktop:/home/veo/Downloads/linphone-3.3.2# cd ..
root@veo-desktop:/home/veo/Downloads# cd yeaphone-0.1.8
root@veo-desktop:/home/veo/Downloads/yeaphone-0.1.8# ./configure
configure: yeaphone-0.1.8 A linphone frontend for external handset devices.
configure: licensed under the terms of the General Public License (GPL)
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LINPHONE... no
root@veo-desktop:/home/veo/Downloads/yeaphone-0.1.8#
Antwort von Thomas: Hi Sergey,
it looks like configure could not find the linphone installation via pkg-config. What does config.log say about it?

You can also manually see the error message by running
pkg-config --exists --print-errors "linphone >= 1.7.0"

There should be a file /usr/lib/pkgconfig/linphone.pc (or in a similar path) on your system after having installed linphone...

Ah, this might be the problem: You installed linphone via aptitude, but there is no liblinphone3-dev package available (which would contain some required files). As liblinphone2-dev won't make you happy (not patched to properly work with yeaphone) you could try to uninstall the linphone packages and compile & install version 3.3.2 from source. It looks like you downloaded them already anyway.

If you first want to try a local installation, then call configure with "--prefix=/home/veo/local" (for system-wide install you would usually say "--prefix=/usr"). After installing linphone that way you should be able to locate linphone.pc somewhere in /home/veo/local/lib/pkgconfig, therefore you should instruct pkg-config to also search this directory before running configure for yeaphone, i.e.
export PKG_CONFIG_PATH=/home/veo/local/lib/pkgconfig
This should get you a working yeaphone executable, I would guess (did not try all these steps here on an Ubuntu system, which yours probably is).

Hope this helps.
Best Regards.
[74] Whats wrong now?
Eingetragen von Sergey am Mittwoch, 28.07.2010 @ 09:29
Thx! I just install dev library and install yeapone. I have a new problem! )

veo@veo-desktop:~$ yeaphone
path_sysfs = /sys/bus/usb/drivers/yealink/2-2:1.3/
path_event = /dev/input/event7
/sys/bus/usb/drivers/yealink/2-2:1.3/model: Permission denied
Detected handset Yealink USB-P1K
/sys/bus/usb/drivers/yealink/2-2:1.3/line2: Permission denied
/sys/bus/usb/drivers/yealink/2-2:1.3/line1: Permission denied
/sys/bus/usb/drivers/yealink/2-2:1.3/line3: Permission denied
/sys/bus/usb/drivers/yealink/2-2:1.3/hide_icon: Permission denied
ALSA lib conf.c:4600:(snd_config_expand) Unknown parameters 0
ALSA lib control.c:902:(snd_ctl_open_noupdate) Invalid CTL default:0
ALSA lib conf.c:4600:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM default:0
ALSA lib conf.c:4600:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM default:0
ALSA lib conf.c:4600:(snd_config_expand) Unknown parameters 1
ALSA lib control.c:902:(snd_ctl_open_noupdate) Invalid CTL default:1
ALSA lib conf.c:4600:(snd_config_expand) Unknown parameters 1
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM default:1
ALSA lib conf.c:4600:(snd_config_expand) Unknown parameters 1
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM default:1
Warning: UDP port 5060 seems already in use ! Cannot initialize.
Ready
/sys/bus/usb/drivers/yealink/2-2:1.3/line3: Permission denied
ringer device = ALSA: plughw:1
playback device = ALSA: plughw:1
/dev/input/event7: Permission denied
Aborted
veo@veo-desktop:~$
[75] kernel 2.6.35
Eingetragen von Igor am Freitag, 13.08.2010 @ 19:00
In latest kernel there are two updates:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=0ede76fcec5415ef82a423a95120286895822e2d
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=997ea58eb92f9970b8af7aae48800d0ef43b9423
I add following path for testing:
Code:
Index: yealink-module/trunk/yealink.c
===================================================================
--- yealink-module/trunk/yealink.c (revision 146)
+++ yealink-module/trunk/yealink.c (working copy)
@@ -189,7 +189,6 @@
union yld_ctl_packet *ctl_data;
dma_addr_t ctl_dma;
struct usb_ctrlrequest *ctl_req;
- dma_addr_t ctl_req_dma;
struct urb *urb_ctl;

/* flags */
@@ -2038,13 +2037,12 @@
}

if (yld->ctl_req)
- usb_buffer_free(yld->udev, sizeof(*(yld->ctl_req)),
- yld->ctl_req, yld->ctl_req_dma);
+ kfree(yld->ctl_req);
if (yld->ctl_data)
- usb_buffer_free(yld->udev, USB_PKT_LEN(yld->model->protocol),
+ usb_free_coherent(yld->udev, USB_PKT_LEN(yld->model->protocol),
yld->ctl_data, yld->ctl_dma);
if (yld->irq_data)
- usb_buffer_free(yld->udev, USB_PKT_LEN(yld->model->protocol),
+ usb_free_coherent(yld->udev, USB_PKT_LEN(yld->model->protocol),
yld->irq_data, yld->irq_dma);

usb_free_urb(yld->urb_irq);
@@ -2168,18 +2166,17 @@
return usb_cleanup(yld, -ENOMEM);

/* allocate usb buffers */
- yld->irq_data = usb_buffer_alloc(udev, pkt_len,
+ yld->irq_data = usb_alloc_coherent(udev, pkt_len,
GFP_ATOMIC, &yld->irq_dma);
if (yld->irq_data == NULL)
return usb_cleanup(yld, -ENOMEM);

- yld->ctl_data = usb_buffer_alloc(udev, pkt_len,
+ yld->ctl_data = usb_alloc_coherent(udev, pkt_len,
GFP_ATOMIC, &yld->ctl_dma);
if (!yld->ctl_data)
return usb_cleanup(yld, -ENOMEM);

- yld->ctl_req = usb_buffer_alloc(udev, sizeof(*(yld->ctl_req)),
- GFP_ATOMIC, &yld->ctl_req_dma);
+ yld->ctl_req = kmalloc(sizeof(*(yld->ctl_req)), GFP_KERNEL);
if (yld->ctl_req == NULL)
return usb_cleanup(yld, -ENOMEM);

@@ -2212,10 +2209,8 @@
usb_fill_control_urb(yld->urb_ctl, udev, usb_sndctrlpipe(udev, 0),
(void *)yld->ctl_req, yld->ctl_data, pkt_len,
urb_ctl_callback, yld);
- yld->urb_ctl->setup_dma = yld->ctl_req_dma;
yld->urb_ctl->transfer_dma = yld->ctl_dma;
- yld->urb_ctl->transfer_flags |= URB_NO_SETUP_DMA_MAP |
- URB_NO_TRANSFER_DMA_MAP;
+ yld->urb_ctl->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
yld->urb_ctl->dev = udev;

/* set up the periodic scan/update timer */
Antwort von Thomas: Thanks a lot, Igor! I'll check the changes and incorporate them in the svn repository (mentioning you as the originator of course) as soon as I have the time.
[76] Error while compile
Eingetragen von dimasusl am Montag, 7.02.2011 @ 13:21
linphone-3.3.2
yeaphone-0.1.8 from svn (patch for ver>=3)

When i tried to perform 'make', there are some error(s):
lpcontrol.c:77: error: field ‘core_state’ has incomplete type
lpcontrol.c:117: warning: initialization from incompatible pointer type
lpcontrol.c: In function ‘override_soundcards’:
lpcontrol.c:266: warning: too few arguments for format

What's wrong?
[77] patch for linphone-3.3.2
Eingetragen von Anthony Baire am Sonntag, 20.02.2011 @ 23:10
Hi Thomas,

I've set up a box running yeaphone today. I had to hack a little to make it work with linphone 3.3.2 and I am sending the patch.

Most of the changes are clean, except the part in override_soundcards(). I did not find how to derive the alsa id from the output of ylsysfs_get_alsa_card() so I just hardcoded the name of the device for the moment. It should work fine except if there are multiple devices

Cheers

Anthony

Code:
diff --git a/yeaphone/trunk/src/lpcontrol.c b/yeaphone/trunk/src/lpcontrol.c
index 8429ed2..6417086 100644
--- a/yeaphone/trunk/src/lpcontrol.c
+++ b/yeaphone/trunk/src/lpcontrol.c
@@ -74,7 +74,7 @@ typedef struct lpcontrol_data_s {
GeneralStateChange callback;

LinphoneCoreVTable *vtable;
- LinphoneCore core_state;
+ LinphoneCore *core_state;

char configfile_name[PATH_MAX];

@@ -96,8 +96,7 @@ static void lpc_display_warning(LinphoneCore * lc, const char *something);
static void lpc_display_url(LinphoneCore * lc, const char *something, const char *url);
static void lpc_call_received(LinphoneCore *lc, const char *from);
static void lpc_prompt_for_auth(LinphoneCore *lc, const char *realm, const char *username);
-static void lpc_notify_received(LinphoneCore *lc,LinphoneFriend *fid,
- const char *from, const char *status, const char *img);
+static void lpc_notify_presence_received(LinphoneCore *lc, LinphoneFriend *fid);
static void lpc_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf,
const char *url);
static void lpc_bye_received(LinphoneCore *lc, const char *from);
@@ -114,7 +113,7 @@ LinphoneCoreVTable lpc_vtable = {
show: (ShowInterfaceCb) lpc_dummy,
inv_recv: lpc_call_received,
bye_recv: lpc_bye_received,
- notify_recv: lpc_notify_received,
+ notify_presence_recv: lpc_notify_presence_received,
new_unknown_subscriber: lpc_new_unknown_subscriber,
auth_info_requested: lpc_prompt_for_auth,
display_status: lpc_display_status,
@@ -122,8 +121,13 @@ LinphoneCoreVTable lpc_vtable = {
display_warning: lpc_display_warning,
display_url: lpc_display_url,
display_question: lpc_dummy,
+ call_log_updated: NULL,
text_received: lpc_text_received,
- general_state: NULL
+ general_state: NULL,
+ dtmf_received: NULL,
+ refer_received: NULL,
+ buddy_info_updated: NULL,
+ notify_recv: NULL
};


@@ -172,10 +176,9 @@ static void lpc_prompt_for_auth(LinphoneCore *lc, const char *realm, const char
}


-static void lpc_notify_received(LinphoneCore *lc,LinphoneFriend *fid,
- const char *from, const char *status, const char *img) {
- printf("Friend %s is %s\n", from, status);
- // todo: update Friend list state (unimplemented)
+static void lpc_notify_presence_received(LinphoneCore *lc, LinphoneFriend *fid) {
+ printf("Friend %s is %s\n", linphone_friend_get_info(fid)->displayname,
+ linphone_online_status_to_string(linphone_friend_get_status(fid)));
}


@@ -207,7 +210,7 @@ static void lpc_text_received(LinphoneCore *lc, LinphoneChatRoom *cr,
void lpcontrol_timer_callback(int id, int group, void *private_data) {
lpcontrol_data_t *lpd_ptr = private_data;

- linphone_core_iterate(&(lpd_ptr->core_state));
+ linphone_core_iterate(lpd_ptr->core_state);
}

/*****************************************************************/
@@ -254,31 +257,34 @@ void override_soundcards()

card = ylsysfs_get_alsa_card();
if (card >= 0) {
- snprintf(pcm_name, sizeof(pcm_name), "plughw:%d", card);
+ //FIXME: detect the device using the value of 'card'
+ //snprintf(pcm_name, sizeof(pcm_name), "plughw:%d", card);
+ strcpy (pcm_name, "ALSA: VOIP USB Phone");
+
lpstates_data.sndcard = ms_alsa_card_new_custom(pcm_name, pcm_name);

- lpstates_data.core_state.sound_conf.play_sndcard =
- lpstates_data.core_state.sound_conf.capt_sndcard = lpstates_data.sndcard;
+ linphone_core_set_playback_device (lpstates_data.core_state, ms_snd_card_get_name (lpstates_data.sndcard));
+ linphone_core_set_capture_device (lpstates_data.core_state, ms_snd_card_get_name (lpstates_data.sndcard));

if (ringer) {
- linphone_core_set_ringer_device(&(lpstates_data.core_state), ringer);
- if (!lpstates_data.core_state.sound_conf.ring_sndcard) {
- printf("Ringer device %s not found, falling back to handset's ringer\n");
- lpstates_data.core_state.sound_conf.ring_sndcard = lpstates_data.sndcard;
- }
+ linphone_core_set_ringer_device(lpstates_data.core_state, ringer);
+// if (!lpstates_data.core_state.sound_conf.ring_sndcard) {
+// printf("Ringer device %s not found, falling back to handset's ringer\n");
+// lpstates_data.core_state.sound_conf.ring_sndcard = lpstates_data.sndcard;
+// }
}
- else
- lpstates_data.core_state.sound_conf.ring_sndcard = lpstates_data.sndcard;
+// else
+// lpstates_data.core_state.sound_conf.ring_sndcard = lpstates_data.sndcard;

printf("ringer device = %s\n",
- linphone_core_get_ringer_device(&(lpstates_data.core_state)));
+ linphone_core_get_ringer_device(lpstates_data.core_state));
printf("playback device = %s\n",
- linphone_core_get_playback_device(&(lpstates_data.core_state)));
+ linphone_core_get_playback_device(lpstates_data.core_state));
}

if (!ringer && ((model == YL_MODEL_P1K) || (model == YL_MODEL_P1KH))) {
/* we use the ringer on the handset */
- linphone_core_set_ring(&(lpstates_data.core_state), "/dev/null");
+ linphone_core_set_ring(lpstates_data.core_state, "/dev/null");
}
}

@@ -295,24 +301,24 @@ void lpstates_submit_command(lpstates_command_t command, char *arg)
case LPCOMMAND_STARTUP:
yp_ml_schedule_periodic_timer(LPCONTROL_TIMER_ID, 200, 1,
lpcontrol_timer_callback, &lpstates_data);
- linphone_core_init(&(lpstates_data.core_state), lpstates_data.vtable,
- lpstates_data.configfile_name, &lpstates_data);
- setLinphoneCore(&(lpstates_data.core_state));
+ lpstates_data.core_state = linphone_core_new (lpstates_data.vtable,
+ lpstates_data.configfile_name, NULL, &lpstates_data);
+ setLinphoneCore(lpstates_data.core_state);
override_soundcards();
break;

case LPCOMMAND_SHUTDOWN:
- linphone_core_terminate_call(&(lpstates_data.core_state), NULL);
- linphone_core_uninit(&(lpstates_data.core_state));
+ linphone_core_terminate_call(lpstates_data.core_state, NULL);
+ linphone_core_destroy(lpstates_data.core_state);
break;

case LPCOMMAND_CALL:
- linphone_core_invite(&(lpstates_data.core_state), arg);
+ linphone_core_invite(lpstates_data.core_state, arg);
break;

case LPCOMMAND_DTMF:
while (isdigit(*cp) || *cp == '#' || *cp == '*') {
- linphone_core_send_dtmf(&(lpstates_data.core_state), *cp);
+ linphone_core_send_dtmf(lpstates_data.core_state, *cp);
cp++;
if (*cp)
usleep(200000);
@@ -320,43 +326,43 @@ void lpstates_submit_command(lpstates_command_t command, char *arg)
break;

case LPCOMMAND_PICKUP:
- linphone_core_accept_call(&(lpstates_data.core_state), NULL);
+ linphone_core_accept_call(lpstates_data.core_state, NULL);
break;

case LPCOMMAND_HANGUP:
- linphone_core_terminate_call(&(lpstates_data.core_state), NULL);
+ linphone_core_terminate_call(lpstates_data.core_state, NULL);
break;

case LPCOMMAND_RING_VOLUP:
/*
- level = linphone_core_get_ring_level(&(lpstates_data.core_state));
+ level = linphone_core_get_ring_level(lpstates_data.core_state);
level += RING_VOL_STEP;
if (level > 100) level = 100;
- linphone_core_set_ring_level(&(lpstates_data.core_state), level);
+ linphone_core_set_ring_level(lpstates_data.core_state, level);
*/
break;

case LPCOMMAND_RING_VOLDN:
/*
- level = linphone_core_get_ring_level(&(lpstates_data.core_state));
+ level = linphone_core_get_ring_level(lpstates_data.core_state);
level -= RING_VOL_STEP;
if (level < RING_VOL_MIN) level = RING_VOL_MIN;
- linphone_core_set_ring_level(&(lpstates_data.core_state), level);
+ linphone_core_set_ring_level(lpstates_data.core_state, level);
*/
break;

case LPCOMMAND_SPKR_VOLUP:
- level = linphone_core_get_play_level(&(lpstates_data.core_state));
+ level = linphone_core_get_play_level(lpstates_data.core_state);
level += SPKR_VOL_STEP;
if (level > 100) level = 100;
- linphone_core_set_play_level(&(lpstates_data.core_state), level);
+ linphone_core_set_play_level(lpstates_data.core_state, level);
break;

case LPCOMMAND_SPKR_VOLDN:
- level = linphone_core_get_play_level(&(lpstates_data.core_state));
+ level = linphone_core_get_play_level(lpstates_data.core_state);
level -= SPKR_VOL_STEP;
if (level < SPKR_VOL_MIN) level = SPKR_VOL_MIN;
- linphone_core_set_play_level(&(lpstates_data.core_state), level);
+ linphone_core_set_play_level(lpstates_data.core_state, level);
break;

default:
[78] 2.6.37
Eingetragen von Anthony Baire am Sonntag, 20.02.2011 @ 23:52
Also tried with linux 2.6.37. There is a trivial fix to make it compile.
Code:
--- a/yealink-module/trunk/yealink.c
+++ b/yealink-module/trunk/yealink.c
@@ -2150,7 +2150,7 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id)

spin_lock_init(&yld->flags_lock);
mutex_init(&yld->pm_mutex);
- init_MUTEX_LOCKED(&yld->usb_active_sem);
+ sema_init(&yld->usb_active_sem, 0);

yld->udev = udev;
yld->intf = intf;


However I could not make it work. I get the following errors when loading the module. Any idea?

[ 901.024314] yealink: Yealink phone driver: 20101214 (C) Thomas Reitmayr, Henk Vergonet
[ 901.032115] yealink: input_open - cannot autoresume, result -11
[ 901.064040] yealink: input_open - cannot autoresume, result -11
[ 901.080051] yealink: input_open - cannot autoresume, result -11
[79] patch
Eingetragen von giappo am Freitag, 11.03.2011 @ 20:09
Hello,

I have same problem (can't compile yeaphone with linphone-3.3.2) where can I download correct patch or debianized x86 package ?
[80] Can't make yeaphone
Eingetragen von SolarW am Mittwoch, 4.05.2011 @ 22:46
Hello.

My system:
Ubuntu 11.04
uname -a
Linux Ubuntu 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux
lsusb
Bus 002 Device 003: ID 6993:b700 Yealink Network Technology Co., Ltd.
linphone ver. 3.3.2-3ubuntu2
liblinphone-dev ver. 3.3.2-3ubuntu2

yealink module installed (from trunk) and work correctly

yeaphone (trunk ver) not build

root@Ubuntu:/usr/src/yeaphone/trunk# make
make all-recursive
make[1]: Вход в каталог `/usr/src/yeaphone/trunk'
Making all in src
make[2]: Вход в каталог `/usr/src/yeaphone/trunk/src'
gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -DORTP_INET6 -I/usr/include/linphone -g -O2 -MT yeaphone-lpcontrol.o -MD -MP -MF .deps/yeaphone-lpcontrol.Tpo -c -o yeaphone-lpcontrol.o `test -f 'lpcontrol.c' || echo './'`lpcontrol.c
lpcontrol.c:77:16: error: field ‘core_state’ has incomplete type
lpcontrol.c:117:3: warning: initialization from incompatible pointer type
lpcontrol.c: In function ‘override_soundcards’:
lpcontrol.c:266:9: warning: too few arguments for format
make[2]: *** [yeaphone-lpcontrol.o] Ошибка 1
make[2]: Выход из каталога `/usr/src/yeaphone/trunk/src'
make[1]: *** [all-recursive] Ошибка 1
make[1]: Выход из каталога `/usr/src/yeaphone/trunk'
make: *** [all] Ошибка 2

Patch from Anthony Baire apllied with errors and not build too..
[81] Can't make yeaphone
Eingetragen von SolarW am Mittwoch, 4.05.2011 @ 22:51
Error when i'm applied patch
root@Ubuntu:/usr/src/yeaphone/trunk/src# patch <my.patch
patching file lpcontrol.c
Hunk #1 FAILED at 74.
1 out of 1 hunk FAILED -- saving rejects to file lpcontrol.c.rej
[82] problem
Eingetragen von macht am Donnerstag, 5.05.2011 @ 13:45
dear Thomas.
What the problem?
make all-recursive
make[1]: Enter directory `/opt/yeaphone/trunk'
Making all in src
make[2]: Enter directory `/opt/yeaphone/trunk/src'
gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -DORTP_INET6 -I/usr/include/linphone -g -O2 -MT yeaphone-lpcontrol.o -MD -MP -MF .deps/yeaphone-lpcontrol.Tpo -c -o yeaphone-lpcontrol.o `test -f 'lpcontrol.c' || echo './'`lpcontrol.c
lpcontrol.c:77:16: error: field ‘core_state’ has incomplete type
lpcontrol.c:117:3: warning: initialization from incompatible pointer type
lpcontrol.c: In function ‘override_soundcards’:
lpcontrol.c:266:9: warning: too few arguments for format
make[2]: *** [yeaphone-lpcontrol.o] Ошибка 1
make[2]: Exit directory `/opt/yeaphone/trunk/src'
make[1]: *** [all-recursive] Error 1
make[1]: Exit directory `/opt/yeaphone/trunk'
make: *** [all] Error 2
my brain blown, please help me
[83] make yeaphone on 64bit system
Eingetragen von giappo am Mittwoch, 18.05.2011 @ 14:13
Hi, I can make yeaphone on normal 32 bit system without problem, but in 64bit system I get this build error:

..

gcc -g -O2 -Wl,--rpath -Wl,/usr/lib -lpthread -o yeaphone yeaphone-lpcontrol.o yeaphone-yeaphone.o yeaphone-ylcontrol.o yeaphone-yldisp.o yeaphone-ypconfig.o yeaphone-ypmainloop.o yeaphone-ylsysfs.o -llinphone -lmediastreamer -lortp -lpthread -lsrtp
/usr/bin/ld: yeaphone-ylcontrol.o: undefined reference to symbol 'osip_from_parse'
/usr/bin/ld: note: 'osip_from_parse' is defined in DSO /usr/lib/libosipparser2.so.4 so try adding it to the linker command line
/usr/lib/libosipparser2.so.4: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [yeaphone] Error 1
make[2]: Leaving directory `/home/alex/Documenti/mylog/informatica/programmazione/c/project/yeaphone/yeaphone-0.1.8/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/alex/Documenti/mylog/informatica/programmazione/c/project/yeaphone/yeaphone-0.1.8'
make: *** [all] Error 2

how can I solve this ?
[84] Yeaphone not compile
Eingetragen von AlexS am Dienstag, 22.11.2011 @ 09:18
Slackware 13.1, kernel 2.6.33
Linphone 3.4.3, yealink vs usbhid - solved
dmseg
>yealink: Detected Model USB-P1KH (Version 0x1012)
>yealink: Serial Number c70adb4a9296
>input: Yealink USB-P1KH as /devices/pci0000:00/0000:00:1d.1/usb6/6-2/6-2:1.3/input/input15
Yeaphone... conigure without errors/
make
lpcontrol.h:49: error: expected ‘)’ before ‘callback’
lpcontrol.h:50: error: expected ‘)’ before ‘callback’
lpcontrol.c:74: error: expected specifier-qualifier-list before ‘GeneralStateChange’
lpcontrol.c:115: error: unknown field ‘inv_recv’ in initialize
and so on..
Help please!
[85] yeaphone work
Eingetragen von Igor am Donnerstag, 19.01.2012 @ 13:25
My yeaphone work fine with linphone 3.2 and kernel 3.2. Later I'll post patch. SVN still broken? May be move project to sf.net or other hosting?
Antwort von Thomas: Sorry, forgot to restart my dyndns update script after having moved the sideboard, svn and web interface should be reachable again.
Patches sound promising, I had no time to adapt yeaphone to the new linphone. Could even give you write access...
-Thomas
[86] patch linphone 3.3
Eingetragen von Igor am Freitag, 13.04.2012 @ 22:09
This is patch to work with linphone 3.3+
Problem with sound card fixed.
Code:
Index: lpcontrol.c
===================================================================
--- lpcontrol.c (revision 151)
+++ lpcontrol.c (working copy)
@@ -74,7 +74,7 @@
GeneralStateChange callback;

LinphoneCoreVTable *vtable;
- LinphoneCore core_state;
+ LinphoneCore *core_state;

char configfile_name[PATH_MAX];

@@ -96,8 +96,7 @@
static void lpc_display_url(LinphoneCore * lc, const char *something, const char *url);
static void lpc_call_received(LinphoneCore *lc, const char *from);
static void lpc_prompt_for_auth(LinphoneCore *lc, const char *realm, const char *username);
-static void lpc_notify_received(LinphoneCore *lc,LinphoneFriend *fid,
- const char *from, const char *status, const char *img);
+static void lpc_notify_presence_received(LinphoneCore *lc,LinphoneFriend *fid);
static void lpc_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf,
const char *url);
static void lpc_bye_received(LinphoneCore *lc, const char *from);
@@ -111,10 +110,10 @@
***************************************************************************/

LinphoneCoreVTable lpc_vtable = {
- show: (ShowInterfaceCb) lpc_dummy,
+ show: lpc_dummy,
inv_recv: lpc_call_received,
bye_recv: lpc_bye_received,
- notify_recv: lpc_notify_received,
+ notify_presence_recv: lpc_notify_presence_received,
new_unknown_subscriber: lpc_new_unknown_subscriber,
auth_info_requested: lpc_prompt_for_auth,
display_status: lpc_display_status,
@@ -122,8 +121,13 @@
display_warning: lpc_display_warning,
display_url: lpc_display_url,
display_question: lpc_dummy,
+ call_log_updated: lpc_dummy,
text_received: lpc_text_received,
- general_state: NULL
+ general_state: NULL,
+ dtmf_received: NULL,
+ refer_received: NULL,
+ buddy_info_updated: NULL,
+ notify_recv: NULL
};


@@ -172,9 +176,8 @@
}


-static void lpc_notify_received(LinphoneCore *lc,LinphoneFriend *fid,
- const char *from, const char *status, const char *img) {
- printf("Friend %s is %s\n", from, status);
+static void lpc_notify_presence_received(LinphoneCore *lc,LinphoneFriend *fid) {
+ printf("Friend presence change\n");
// todo: update Friend list state (unimplemented)
}

@@ -207,7 +210,7 @@
void lpcontrol_timer_callback(int id, int group, void *private_data) {
lpcontrol_data_t *lpd_ptr = private_data;

- linphone_core_iterate(&(lpd_ptr->core_state));
+ linphone_core_iterate(lpd_ptr->core_state);
}

/*****************************************************************/
@@ -242,8 +245,9 @@
{
ylsysfs_model model;
int card;
- char pcm_name[15];
+ char *pcm_name = NULL;
char *ringer;
+ const char* devid;

model = ylsysfs_get_model();

@@ -254,31 +258,33 @@

card = ylsysfs_get_alsa_card();
if (card >= 0) {
- snprintf(pcm_name, sizeof(pcm_name), "plughw:%d", card);
+ // get ALSA sound card name
+ snd_card_get_name(card, &pcm_name);
lpstates_data.sndcard = ms_alsa_card_new_custom(pcm_name, pcm_name);
+ devid = ms_snd_card_get_string_id(lpstates_data.sndcard);

- lpstates_data.core_state.sound_conf.play_sndcard =
- lpstates_data.core_state.sound_conf.capt_sndcard = lpstates_data.sndcard;
+ linphone_core_set_playback_device(lpstates_data.core_state, devid);
+ linphone_core_set_capture_device(lpstates_data.core_state, devid);

if (ringer) {
- linphone_core_set_ringer_device(&(lpstates_data.core_state), ringer);
- if (!lpstates_data.core_state.sound_conf.ring_sndcard) {
- printf("Ringer device %s not found, falling back to handset's ringer\n");
- lpstates_data.core_state.sound_conf.ring_sndcard = lpstates_data.sndcard;
+ linphone_core_set_ringer_device(lpstates_data.core_state, ringer);
+ if (!linphone_core_get_ringer_device(lpstates_data.core_state)) {
+ printf("Ringer device %s not found, falling back to handset's ringer\n", ringer);
+ linphone_core_set_ringer_device(lpstates_data.core_state, devid);
}
}
else
- lpstates_data.core_state.sound_conf.ring_sndcard = lpstates_data.sndcard;
+ linphone_core_set_ringer_device(lpstates_data.core_state, devid);

printf("ringer device = %s\n",
- linphone_core_get_ringer_device(&(lpstates_data.core_state)));
+ linphone_core_get_ringer_device(lpstates_data.core_state));
printf("playback device = %s\n",
- linphone_core_get_playback_device(&(lpstates_data.core_state)));
+ linphone_core_get_playback_device(lpstates_data.core_state));
}

if (!ringer && ((model == YL_MODEL_P1K) || (model == YL_MODEL_P1KH))) {
/* we use the ringer on the handset */
- linphone_core_set_ring(&(lpstates_data.core_state), "/dev/null");
+ linphone_core_set_ring(lpstates_data.core_state, "/dev/null");
}
}

@@ -295,24 +301,24 @@
case LPCOMMAND_STARTUP:
yp_ml_schedule_periodic_timer(LPCONTROL_TIMER_ID, 200, 1,
lpcontrol_timer_callback, &lpstates_data);
- linphone_core_init(&(lpstates_data.core_state), lpstates_data.vtable,
- lpstates_data.configfile_name, &lpstates_data);
- setLinphoneCore(&(lpstates_data.core_state));
+ lpstates_data.core_state = linphone_core_new(lpstates_data.vtable,
+ lpstates_data.configfile_name, 0, &lpstates_data);
+ setLinphoneCore(lpstates_data.core_state);
override_soundcards();
break;

case LPCOMMAND_SHUTDOWN:
- linphone_core_terminate_call(&(lpstates_data.core_state), NULL);
- linphone_core_uninit(&(lpstates_data.core_state));
+ linphone_core_terminate_call(lpstates_data.core_state, NULL);
+ linphone_core_destroy(lpstates_data.core_state);
break;

case LPCOMMAND_CALL:
- linphone_core_invite(&(lpstates_data.core_state), arg);
+ linphone_core_invite(lpstates_data.core_state, arg);
break;

case LPCOMMAND_DTMF:
while (isdigit(*cp) || *cp == '#' || *cp == '*') {
- linphone_core_send_dtmf(&(lpstates_data.core_state), *cp);
+ linphone_core_send_dtmf(lpstates_data.core_state, *cp);
cp++;
if (*cp)
usleep(200000);
@@ -320,43 +326,43 @@
break;

case LPCOMMAND_PICKUP:
- linphone_core_accept_call(&(lpstates_data.core_state), NULL);
+ linphone_core_accept_call(lpstates_data.core_state, NULL);
break;

case LPCOMMAND_HANGUP:
- linphone_core_terminate_call(&(lpstates_data.core_state), NULL);
+ linphone_core_terminate_call(lpstates_data.core_state, NULL);
break;

case LPCOMMAND_RING_VOLUP:
/*
- level = linphone_core_get_ring_level(&(lpstates_data.core_state));
+ level = linphone_core_get_ring_level(lpstates_data.core_state);
level += RING_VOL_STEP;
if (level > 100) level = 100;
- linphone_core_set_ring_level(&(lpstates_data.core_state), level);
+ linphone_core_set_ring_level(lpstates_data.core_state, level);
*/
break;

case LPCOMMAND_RING_VOLDN:
/*
- level = linphone_core_get_ring_level(&(lpstates_data.core_state));
+ level = linphone_core_get_ring_level(lpstates_data.core_state);
level -= RING_VOL_STEP;
if (level < RING_VOL_MIN) level = RING_VOL_MIN;
- linphone_core_set_ring_level(&(lpstates_data.core_state), level);
+ linphone_core_set_ring_level(lpstates_data.core_state, level);
*/
break;

case LPCOMMAND_SPKR_VOLUP:
- level = linphone_core_get_play_level(&(lpstates_data.core_state));
+ level = linphone_core_get_play_level(lpstates_data.core_state);
level += SPKR_VOL_STEP;
if (level > 100) level = 100;
- linphone_core_set_play_level(&(lpstates_data.core_state), level);
+ linphone_core_set_play_level(lpstates_data.core_state, level);
break;

case LPCOMMAND_SPKR_VOLDN:
- level = linphone_core_get_play_level(&(lpstates_data.core_state));
+ level = linphone_core_get_play_level(lpstates_data.core_state);
level -= SPKR_VOL_STEP;
if (level < SPKR_VOL_MIN) level = SPKR_VOL_MIN;
- linphone_core_set_play_level(&(lpstates_data.core_state), level);
+ linphone_core_set_play_level(lpstates_data.core_state, level);
break;

default:
Index: ylcontrol.c
===================================================================
--- ylcontrol.c (revision 151)
+++ ylcontrol.c (working copy)
@@ -802,8 +802,8 @@
if (bytes < 0)
perror("Error reading from event device");
else
- fprintf(stderr, "%s: Expected %d bytes, got %d bytes\n", __FUNCTION__,
- sizeof(struct input_event), bytes);
+ fprintf(stderr, "%s: Expected %lu bytes, got %d bytes\n", __FUNCTION__,
+ (unsigned long) sizeof(struct input_event), bytes);
close(ylc_ptr->evfd);
/* remove myself and shut down */
yp_ml_remove_event(-1, YLCONTROL_IO_ID);
[87] SVN is not working
Eingetragen von MiBi am Montag, 21.05.2012 @ 12:51
Help please !
Antwort von Thomas: I am currently in the process of upgrading the server hardware and software, the SVN service will be up again in the next few days.
[88] prob wiht 0.1 version for old pc
Eingetragen von minime am Donnerstag, 24.05.2012 @ 07:03
/yeaphone-0.1$ ./configure
configure: yeaphone-0.1 A linphone frontend for external handset devices.
configure: licensed under the terms of the General Public License (GPL)
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking whether byte ordering is bigendian... no
checking whether closedir returns void... no
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking whether stat accepts an empty string... no
checking for select... yes
checking for strchr... yes
checking for strdup... yes
checking for strrchr... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands


josh@debian07:~/yeaphone-0.1$ make
make all-recursive
make[1]: Entering directory `/home/josh/yeaphone-0.1'
Making all in src
make[2]: Entering directory `/home/josh/yeaphone-0.1/src'
make[3]: Entering directory `/home/josh/yeaphone-0.1'
make[3]: Leaving directory `/home/josh/yeaphone-0.1'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT lpcontrol.o -MD -MP -MF ".deps/lpcontrol.Tpo" -c -o lpcontrol.o lpcontrol.c; \
then mv -f ".deps/lpcontrol.Tpo" ".deps/lpcontrol.Po"; else rm -f ".deps/lpcontrol.Tpo"; exit 1; fi
In file included from lpcontrol.c:45:
lpcontrol.h:31:35: error: linphone/linphonecore.h: No such file or directory
In file included from lpcontrol.c:45:
lpcontrol.h:48: error: expected ‘)’ before ‘callback’
lpcontrol.c:74: error: expected specifier-qualifier-list before ‘LinphoneCoreVTable’
lpcontrol.c:90: error: expected ‘)’ before ‘*’ token
lpcontrol.c:91: error: expected ‘)’ before ‘*’ token
lpcontrol.c:92: error: expected ‘)’ before ‘*’ token
lpcontrol.c:93: error: expected ‘)’ before ‘*’ token
lpcontrol.c:94: error: expected ‘)’ before ‘*’ token
lpcontrol.c:95: error: expected ‘)’ before ‘*’ token
lpcontrol.c:96: error: expected ‘)’ before ‘*’ token
lpcontrol.c:98: error: expected ‘)’ before ‘*’ token
lpcontrol.c:100: error: expected ‘)’ before ‘*’ token
lpcontrol.c:101: error: expected ‘)’ before ‘*’ token
lpcontrol.c:112: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lpc_vtable’
lpcontrol.c:138: error: expected ‘)’ before ‘*’ token
lpcontrol.c:143: error: expected ‘)’ before ‘*’ token
lpcontrol.c:148: error: expected ‘)’ before ‘*’ token




lpcontrol.c:153: error: expected ‘)’ before ‘*’ token
lpcontrol.c:158: error: expected ‘)’ before ‘*’ token
lpcontrol.c:163: error: expected ‘)’ before ‘*’ token
lpcontrol.c:168: error: expected ‘)’ before ‘*’ token
lpcontrol.c:175: error: expected ‘)’ before ‘*’ token
lpcontrol.c:184: error: expected ‘)’ before ‘*’ token
lpcontrol.c:189: error: expected ‘)’ before ‘*’ token
lpcontrol.c: In function ‘lpcontrol_thread’:
lpcontrol.c:205: error: ‘GSTATE_GROUP_POWER’ undeclared (first use in this function)
lpcontrol.c:205: error: (Each undeclared identifier is reported only once
lpcontrol.c:205: error: for each function it appears in.)
lpcontrol.c:205: error: ‘GSTATE_POWER_OFF’ undeclared (first use in this function)
lpcontrol.c:210: error: ‘lpcontrol_data_t’ has no member named ‘core_state’
lpcontrol.c: At top level:
lpcontrol.c:220: error: expected ‘)’ before ‘callback’
lpcontrol.c: In function ‘start_lpcontrol’:
lpcontrol.c:228: error: ‘lpcontrol_data_t’ has no member named ‘vtable’
lpcontrol.c:228: error: ‘lpc_vtable’ undeclared (first use in this function)
lpcontrol.c:233: error: ‘lpcontrol_data_t’ has no member named ‘configfile_name’
lpcontrol.c: In function ‘lpstates_submit_command’:
lpcontrol.c:252: error: ‘lpcontrol_data_t’ has no member named ‘core_state’
lpcontrol.c:252: error: ‘lpcontrol_data_t’ has no member named ‘vtable’
lpcontrol.c:253: error: ‘lpcontrol_data_t’ has no member named ‘configfile_name’
lpcontrol.c:257: error: ‘lpcontrol_data_t’ has no member named ‘core_state’
lpcontrol.c:258: error: ‘lpcontrol_data_t’ has no member named ‘core_state’
lpcontrol.c:262: error: ‘lpcontrol_data_t’ has no member named ‘core_state’
lpcontrol.c:267: error: ‘lpcontrol_data_t’ has no member named ‘core_state’
lpcontrol.c:275: error: ‘lpcontrol_data_t’ has no member named ‘core_state’
lpcontrol.c:279: error: ‘lpcontrol_data_t’ has no member named ‘core_state’
lpcontrol.c:301: error: ‘lpcontrol_data_t’ has no member named ‘core_state’
lpcontrol.c:304: error: ‘lpcontrol_data_t’ has no member named ‘core_state’
lpcontrol.c:308: error: ‘lpcontrol_data_t’ has no member named ‘core_state’
lpcontrol.c:311: error: ‘lpcontrol_data_t’ has no member named ‘core_state’
make[2]: *** [lpcontrol.o] Error 1


make[2]: *** [lpcontrol.o] Error 1
make[2]: Leaving directory `/home/josh/yeaphone-0.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/josh/yeaphone-0.1'
make: *** [all] Error 2



what to do ?
[89] Working on Mageia 1
Eingetragen von Observer am Samstag, 23.06.2012 @ 17:18
Use this patch on those files in /src:
[77] patch for linphone-3.3.2
Posted by Anthony Baire on Sunday, 02.20.2011 @ 11:10PM

then yeaphone "make" complete without errors.

Use the newer yealink driver from cvs (2010) and don't forget you need kernel sources to compile.

I found this:

echo -n 6-1:1.3 > unbind

you need to go here to see device number above (6-1:1.3) and change and unbind

/sys/bus/usb/drivers/usbhid/

then rmmod yealink and the modprobe yealink again

type dmesg and it will show the driver is loaded with:
yealink: Detected Model USB-P1KH (Version 0x1012)

start yeaphone and the phone display should have current date and time

Note about sound card:

I have to promote (move up) the USB VOIP card in systemsettings of KDE in first order to use if not the sound is thru laptop speakers and same for audio capture.

I have a simple bash script that works fine:
================================
echo -n 6-1:1.3 > unbind

rmmod yealink

modprobe yealink

yeaphone
====================================
and i am ready to place a call.

Hope this summary helps someone.
[90] error after applied patch
Eingetragen von Noah P am Sonntag, 5.08.2012 @ 09:34
I'm having an issue with libosip i believe and i cannot figure out how to fix it! I applied the above patch and got past that hurdle but what about thhis? Ive tried 3 diff. versions of libosip!

make all-recursive
make[1]: Entering directory `/home/watson540/Downloads/yeaphone/trunk'
Making all in src
make[2]: Entering directory `/home/watson540/Downloads/yeaphone/trunk/src'
gcc -g -O2 -Wl,--rpath -Wl,/usr/lib64 -lpthread -o yeaphone yeaphone-lpcontrol.o yeaphone-yeaphone.o yeaphone-ylcontrol.o yeaphone-yldisp.o yeaphone-ypconfig.o yeaphone-ypmainloop.o yeaphone-ylsysfs.o -llinphone -lmediastreamer -lortp -lpthread -lssl -lcrypto
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: yeaphone-ylcontrol.o: undefined reference to symbol 'osip_from_free'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'osip_from_free' is defined in DSO /usr/lib64/libosipparser2.so.6 so try adding it to the linker command line
/usr/lib64/libosipparser2.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [yeaphone] Error 1
make[2]: Leaving directory `/home/watson540/Downloads/yeaphone/trunk/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/watson540/Downloads/yeaphone/trunk'
make: *** [all] Error 2
[91] Fixed
Eingetragen von Noah P am Sonntag, 19.08.2012 @ 21:27
Okay regarding above. I got it to compile with these steps.
Downgrade linphone to 3.3.2
Apply the patch given in these comments above to yeaphone
use this to "configure it"
LIBS="/usr/lib64/libosipparser2.so.6 /usr/lib64/libasound.so.2" ./configure
then make, and make install

Hope this helps :)
[92] Linphone 3.5.2
Eingetragen von jfdarv am Sonntag, 12.01.2014 @ 03:39
Should it work with linphone 3.5.2?
[93] newer system
Eingetragen von tk am Montag, 19.01.2015 @ 14:02
Can is possible to compile yeaphone 0.1.8 on freebsd 10.1 system ?
Notice: A non well formed numeric value encountered in /home/.sites/8/site377/web/lib-php/comments_inc.php on line 158
Eigenen Kommentar verfassen
Name:
Email:
Betreff:
Kommentar:
 

Anmerkung: Die Email-Adresse ist optional und wird weder gespeichert noch veröffentlicht, kann aber zur Kontaktaufnahme angegeben werden. Bitte nur sachbezogene Kommentare verfassen, anstößiger Inhalt wird entfernt.

HTML-Code ist nicht erlaubt. Zeilenumbrüche werden automatisch erzeugt. URLs werden in Links umgewandelt. Zur Formatierung bitte BBCode verwenden. Beispiele:
[b]fett[/b] ... fett
[code]Quelltext[/code] ... Quelltext

Hinweis:
Die Verwendung dieser Software erfolgt auf eigene Gefahr, der Autor übernimmt keinerlei Haftung für allfällige Schäden oder negative Auswirkungen, die durch Installation oder Verwendung dieser Software entstehen.