freshtel driver
This driver allows you to use the keypad, the LCD and the buzzer (for ringtones) of the Doro 225ipc VoIP phone.The driver is named "freshtel" because the device pops up as "Freshtel FT-102" - so I bet it should work with all phones that use the same chipset (no, I don't have any info about it, this driver was made with usbsnoop).
It supports the USB IDs 6993:b001 - those are the same as the yealink driver (included in kernel tree). Although the supported phones use a protocol close to that of Yealink ones, they are not compatible. Moreover, the LCD interface is different between those two phone models - Freshtel phones have a graphic LCD, whereas Yealink phones have a 7-segment display.
The driver reuses bits of code from yealink, though.
> Download v 1.0 (instructions included)
applications
This software is only the driver, to be able to really use your phone you need end user applications (ie. plugins for softphones).They are being developed :p
API
This example code should be self explanatory.#include "freshtel_ioctl.h"
#include "test.xpm"
int main()
{
int ftfd;
struct freshtel_screensize ss;
long int screensize;
char *fbp;
int x, y;
ftfd = open("/dev/freshtel0", O_RDWR);
if(ftfd == -1) {
perror("Cannot open freshtel device");
return 1;
}
printf("The freshtel device was opened successfully.\n");
/* Get the screen resolution, in pixels. */
ioctl(ftfd, FRESHTEL_SCREENSIZE, &ss);
printf("Screen is %dx%d\n", ss.w, ss.h);
/* Turn on backlight. If we wanted to turn it off, the ioctl argument would be 0 instead of 1. */
ioctl(ftfd, FRESHTEL_IOCSBACKLIGHT, 1);
/* Ring three times */
ioctl(ftfd, FRESHTEL_IOCRING, 3);
/* Map the screen pixels to memory */
/* Using read() and write() also works, but is not handy */
screensize = (ss.w*ss.h)/8;
fbp = (char *)mmap(0, screensize, PROT_READ|PROT_WRITE, MAP_SHARED, ftfd, 0);
if ((int)fbp == -1) {
perror("Failed to map framebuffer device to memory");
return 2;
}
printf("The framebuffer device was successfully mapped to memory.\n");
/* Display a picture by writing to the memory-mapped pixels */
memset(fbp, 0, screensize);
for(y=0;y<ss.h;y++)
for(x=0;x<ss.w;x++)
if(test_xpm[y+3][x] == ' ')
fbp[(y*ss.w+x)/8] |= (0x80 >> (x % 8));
/* don't forget to update the device's screen, the driver doesn't do this automatically
to save bandwidth */
ioctl(ftfd, FRESHTEL_IOCUPDATE, NULL);
munmap(fbp, screensize);
close(ftfd);
return 0;
}