LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-04-2006, 10:04 PM   #1
VectorThorn
LQ Newbie
 
Registered: Nov 2006
Location: Hell's Gate
Distribution: Fc10
Posts: 19

Rep: Reputation: 0
Angry js_x, KB Gear jam studio / Pablo graphix tablet drivers...


I'm really stuck on this one, and i've been for days on google now, only to run in circles
I have a graphix tablet that i can't find drivers for linux for it. The company who made it went out of business before they even made win2000 drivers, and wine won't even install the 95/98 drivers. There are people who have made XP/2000/2003 drivers, but wine will not install them either.

From alllllllllllllll the info i've gathered so far, XORG makes a ftp.x.org/pub/X11R6.9.0/doc/html/js_x.4.html 'js_x' driver for it, but the article doesn't say how to USE it. I've also been to the Linux Wacom project on SF and that didn't work either. Some guy wrote an article that i came across on google, and he talked about how he checked the packets from the device, and wrote a driver to handle them. The problem is, i don't know what the hell to DO with the files! I'm just too new still . I have also come across a looooottt of diff files posted on the net for it, but again, it might as well be Arabic to me.

Here are the contents of the two files that guy wrote:
tablet.c
Code:
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
#include <fcntl.h>
#include "tablet.h"

#define BUFLEN 100


int tablet_fd = -1;
int tablet_x = 0, tablet_y = 0;
int tablet_button = 0, tablet_touch = 0, tablet_pressure = 0;

static void (*callback_func)(void) = NULL;


/* returns 1 for success */
int
tablet_init(void)
{
	int fd;
	struct termios t;

	fd=open(TABLET_FILE,O_RDWR);

	if (fd<0)
		return perror(TABLET_FILE),0;

	tcgetattr(fd,&t);
	t.c_cflag|=CLOCAL|CS8;
	t.c_cflag&=~CRTSCTS;
	t.c_iflag&=~IGNPAR;
	t.c_oflag&=~ONLCR;
	t.c_lflag&=~(ECHOE|ECHOK|ECHOKE|ECHOCTL);
	cfsetospeed(&t,B9600);
	t.c_cc[VTIME]=1;
	tcsetattr(fd,TCSANOW,&t);

	tablet_fd = fd;
	return 1;
}


static void
got_packet(unsigned char *s, int len)
{
	if ((len == 1) && ((s[0] & 0x0F) == 0x08)) {
		/* so far as I can tell this is just a pen-in-range
		 * notification.  big deal. */
	} else if (len == 6) {
/* the packets look like this (second line is bit significance):
 *  1??? 00bt 0xxx xxxx 0xx0 0xxx 0yyy yyyy 0y00 yyyy 00pp pppp
 *             876 5432  10   ba9  765 4321  0   ba98   54 3210
 * so 12-bits of X, 12-bits of Y, button, touch, 6-bits of pressure,
 * and 3 mystery bits */
		tablet_button = (s[0] & 0x02) ? 1 : 0;
		tablet_touch = (s[0] & 0x01) ? 1 : 0;
		tablet_x = (s[2] >> 5) | ((s[1] & 0x7F) << 2) | ((s[2] & 0x07) << 9);
		tablet_y = (s[4] >> 6) | ((s[3] & 0x7F) << 1) | ((s[4] & 0x0F) << 8);
		tablet_pressure = s[5] & 0x3F;

		if (callback_func)
			callback_func();
	} else {
		/* craziness */
	}
}

/* returns the number of complete packets read */
int
tablet_read(void)
{
	static unsigned char buf[BUFLEN];
	static int buflen = 0;
	unsigned char s[BUFLEN];
	int i,j;
	int ret = 0;

	i = read(tablet_fd, s, BUFLEN);

	if (i <= 0)
		return 0;

	for (j = 0; j < i; j++) {
		if (s[j] & 0x80) {
			if (buflen) {
				got_packet(buf, buflen);
				ret++;
			}
			buflen = 0;
		}
		buf[buflen++] = s[j];
		if (buflen >= BUFLEN) {
			buflen = 0;
			printf("overflow in tablet packetizing\n");
		}
	}

	return ret;
}

void
tablet_register(void (*func)(void))
{
	callback_func = func;
}

void
tablet_close(void)
{
	close(tablet_fd);
	tablet_fd = -1;
}
tablet.h
Code:
#ifndef TABLET_H
#define TABLET_H

#define TABLET_FILE "/dev/ttyS0"

extern int tablet_fd;
extern int tablet_x, tablet_y;
extern int tablet_button, tablet_touch, tablet_pressure;

	/* open the tablet, returns 1 for success */
int tablet_init(void);
	/* perform one read() on the tablet, returns num packets read */
int tablet_read(void);
	/* register a callback that is called when tablet_* vars update */
void tablet_register(void (*func)(void));
	/* close the tablet */
void tablet_close(void);

#endif /* TABLET_H */
I was thinking that if anyone might know a way to get the touchpad on a laptop to sense something OTHER than your fingers, i could use THAT as a drawing pad. I hate to post a thread over something that most would call a 'toy', but this would speed up my development time significantly. Right now, the only thing it's significantly doing, is WASTING my time.

Thanx
 
Old 11-04-2006, 10:06 PM   #2
VectorThorn
LQ Newbie
 
Registered: Nov 2006
Location: Hell's Gate
Distribution: Fc10
Posts: 19

Original Poster
Rep: Reputation: 0
This person said they got it working, but i don't understand all their directions, as he doesn't explain how and where he did everything.

Also, while plugging and unplugging it in the different usb ports, dmesg gave this:
Code:
usb 2-1: USB disconnect, address 3
usb 2-1: new low speed USB device using uhci_hcd and address 4
usb 2-1: configuration #1 chosen from 1 choice
hiddev96: USB HID v1.00 Device [KBGear USB Tablet] on usb-0000:00:1d.1-1
usb 2-1: USB disconnect, address 4
usb 2-1: new low speed USB device using uhci_hcd and address 5
usb 2-1: configuration #1 chosen from 1 choice
hiddev96: USB HID v1.00 Device [KBGear USB Tablet] on usb-0000:00:1d.1-1
usb 2-1: USB disconnect, address 5
usb 1-1: new low speed USB device using uhci_hcd and address 2
usb 1-1: configuration #1 chosen from 1 choice
hiddev96: USB HID v1.00 Device [KBGear USB Tablet] on usb-0000:00:1d.0-1
usb 1-1: USB disconnect, address 2
usb 1-2: new low speed USB device using uhci_hcd and address 3
usb 1-2: configuration #1 chosen from 1 choice
hiddev96: USB HID v1.00 Device [KBGear USB Tablet] on usb-0000:00:1d.0-2
 
Old 11-04-2006, 10:07 PM   #3
VectorThorn
LQ Newbie
 
Registered: Nov 2006
Location: Hell's Gate
Distribution: Fc10
Posts: 19

Original Poster
Rep: Reputation: 0
I seen where someone was posting a bunch of gibberish about files that made no sense. After digging around, i found the same files. I know i need to edit them or use them, but i don't know how?
/usr/src/kernels/2.6.18-1.2798.fc6-i686/drivers/usb/input

That's where 'Kconfig' is, but i don't know what to DO with it, but the option IS IN THERE to include a module for my graphix tablet. Can someone please tell me what to do with that file? Do i recompile the kernel with i
 
Old 11-04-2006, 10:09 PM   #4
VectorThorn
LQ Newbie
 
Registered: Nov 2006
Location: Hell's Gate
Distribution: Fc10
Posts: 19

Original Poster
Rep: Reputation: 0
This also looks promising, but i don't know how to get to the page that it's showing from MAN.
Using Firefox, if you click the link, hit <ctrl><f> and type USB_WACOM and it will take you to the spot that i'm referring to:
http://kernelfr.traduc.org/ftp/2.6.1.../input/Kconfig

Here is the product page for the device as well:
http://www.amazon.com/Pablo-6x8-Grap.../dp/B00004SZK1


Here's another page with a possable solution, that i still don't understand what to do with:
http://webcvs.freedesktop.org/xorg/d...16&view=markup


Also, i found an srpm for Xorg's js_x driver, but i don't know what to do with a srpm...:
http://www.altlinux.com/index.php?mo...-drv-jamstudio
 
Old 11-04-2006, 10:10 PM   #5
VectorThorn
LQ Newbie
 
Registered: Nov 2006
Location: Hell's Gate
Distribution: Fc10
Posts: 19

Original Poster
Rep: Reputation: 0
I was looking at this article:
http://www.cs.helsinki.fi/linux/linu...3-09/1062.html
and read this section here:
Code:
 [PATCH] USB: add KB Gear USB Tablet Driver

drivers/usb/Config.in | 1
drivers/usb/Makefile | 1
drivers/usb/hid-core.c | 4 +
drivers/usb/kbtab.c | 179 +++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 185 insertions(+)
Now, if i can find that directory, am i not able to try to recompile those files? Or do i even NEEd to? Or will it mess things up? If not, then how to i do it so that there's a module created for my device?
 
Old 11-07-2006, 04:58 AM   #6
VectorThorn
LQ Newbie
 
Registered: Nov 2006
Location: Hell's Gate
Distribution: Fc10
Posts: 19

Original Poster
Rep: Reputation: 0
Does ANYONe know what to do with the file:
/usr/src/kernels/2.6.18-1.2798.fc6-i686/drivers/usb/input/Kconfig

I see that it is supposed to be run by something OTHER than the terminal, because it's text is interpreted, and when it's supposed to run, it will ask me if i wan't support for my tablet. This is good... but how do i get it to RUN!?
Thanx
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pablo Tablet: GIMP iXneonXi Linux - Software 4 11-08-2006 06:50 PM
Configuring a Wacom Graphire Tablet to track like a tablet (not like a mouse) anlace Debian 2 11-07-2006 05:20 AM
linux display 32 bit graphix kidd Linux - General 2 08-04-2003 11:13 AM
GraphiX Programming NGraphiX Linux - General 0 08-23-2002 03:41 AM
graphix screwup justin19fl Linux - Newbie 8 06-13-2001 11:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 05:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration