Marcos - 2007-09-23

Hi!

I am using Yealink's USB-B3G  and, just at it seems to happen with USB-B2K, we can not get the dialed numbers, but the first one. Although I  am still trying to figure that out, here is a patch to the usbb2k-api-mod with the following changes:

a) changed the DEFINES to ENUMs on the structure of the USBB2k-API.H
b) added two new URBs: URB_LED_LINE_ON ,URB_LED_LINE_OFF: they control the LINE/PSTN led on the USB-B3G

c) modified usbb2k_switch_mode so that either the USB_LED of the PSTN_LED are lit, just like on the Windows version

d) added a usb_talk function, that sends and receive the USB messages, making the code much cleaner
e) added some debug functons: Usb_talk, api_debug and mega_debug
f) removed all the warnings

Ahh, by the way I realized that the USB-B3G (and probably USB-B2K) sends the URB_HOOKPRESS when the user gets in the USB_MODE, by pressing "*".

Since I modified the almost all the functions because of  usb_talk, I will send the original files, instead of patches:

http://www.linux.ime.usp.br/~mdiez/usbb2k-api.h
http://www.linux.ime.usp.br/~mdiez/usbb2k-main.c

I hope you like my changes!

Marcos