[Linuxwacom-devel] Bamboo wireless support on Ubuntu 12.04

2012-04-25 Thread Thierry Munoz
Hi,
I have tested the driver here 
(https://sourceforge.net/mailarchive/message.php?msg_id=28634134) on 
Ubuntu Precise Pangolin 12.04 and it doesn't work. This driver was 
working under Ubuntu 11.10 (version from I updated).
My tablet is a CTH-470K that's working when it's wired on USB.
Regards,

Thierry

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] Bamboo wireless support on Ubuntu 12.04

2012-04-25 Thread Chris Bagwell
What kernel version does 12.04 use?

The wireless support has been queued up for kernel 3.4 so once its released
and put in 12.04, it will work.

I hope to submit to input-wacom soon so people can follow instructions on
wacom wiki to get working.

Chris

On Wed, Apr 25, 2012 at 1:21 AM, Thierry Munoz thierry.mu...@free.frwrote:

 Hi,
 I have tested the driver here
 (https://sourceforge.net/mailarchive/message.php?msg_id=28634134) on
 Ubuntu Precise Pangolin 12.04 and it doesn't work. This driver was
 working under Ubuntu 11.10 (version from I updated).
 My tablet is a CTH-470K that's working when it's wired on USB.
 Regards,

 Thierry


 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Linuxwacom-devel mailing list
 Linuxwacom-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] Bamboo wireless support on Ubuntu 12.04

2012-04-25 Thread Favux ...
Hi Chris,

Precise Pangolin (12.04) uses the 3.2 kernel.  It's a LTS release,
support is for 5 years.  It will always have the 3.2 kernel, Ubuntu
doesn't change kernel versions.  A PPA for the 3.4 kernel might become
available at some point though.  So an input-wacom backport is needed.

Dave

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] Bamboo wireless support on Ubuntu 12.04

2012-04-25 Thread Thierry Munoz
Le 25/04/2012 17:14, Favux ... a écrit :
 Hi Chris,

 Precise Pangolin (12.04) uses the 3.2 kernel.  It's a LTS release,
 support is for 5 years.  It will always have the 3.2 kernel, Ubuntu
 doesn't change kernel versions.  A PPA for the 3.4 kernel might become
 available at some point though.  So an input-wacom backport is needed.

 Dave
Hi Chris and Dave,
Thanks for your help.
Dave answered quickly and precisely. Nothing else to add.
Regards,

Thierry

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH libwacom 3/7] tools: try the system-installed database if the local one fails

2012-04-25 Thread Peter Hutterer
On Tue, Apr 24, 2012 at 03:48:17PM +0100, Bastien Nocera wrote:
 On Tue, 2012-04-24 at 15:02 +1000, Peter Hutterer wrote:
  Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
 
 Is this wise? The tool isn't supposed to be installed, or is it? If it
 is, then we shouldn't be starting with trying to read the DB from the
 local source tree.

The tool is installed as libwacom-list-local-devices. I know the approach
isn't ideal, but this is the closest I found to having both the local
database work as well as the installed one.

The database searchpath is defined through TOPSRCDIR and unless we can
somehow change this on install, we'd otherwise have to go for either always
using the system database or always the local one.

Cheers,
  Peter

 
  ---
   tools/list-local-devices.c |2 ++
   1 file changed, 2 insertions(+)
  
  diff --git a/tools/list-local-devices.c b/tools/list-local-devices.c
  index 3dbba3d..1702790 100644
  --- a/tools/list-local-devices.c
  +++ b/tools/list-local-devices.c
  @@ -47,6 +47,8 @@ int main(int argc, char **argv)
  struct dirent **namelist = NULL;
   
  db = libwacom_database_new_for_path(TOPSRCDIR/data);
  +   if (!db)
  +   db = libwacom_database_new();
  if (!db) {
  fprintf(stderr, Failed to initialize device database\n);
  return 1;
 
 

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


[Linuxwacom-devel] [PATCH libwacom v2 5/7] lib: check the grandparent's subsystem for the bus string

2012-04-25 Thread Peter Hutterer
The device and its parent have input, but the grandparent has the
actual subsystem this device is connected through.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
---
Changes to v1:
- remove superfluous () around g_strcmp0
- get parent from old_parent (no functional change)
- strdup the bus string, the original string is not valid after
  g_object_unref(parent)


 libwacom/libwacom.c |   53 ---
 1 file changed, 33 insertions(+), 20 deletions(-)

diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c
index accb941..1aeadcd 100644
--- a/libwacom/libwacom.c
+++ b/libwacom/libwacom.c
@@ -47,6 +47,34 @@ is_tablet_or_touchpad (GUdevDevice *device)
g_udev_device_get_property_as_boolean (device, 
ID_INPUT_TOUCHPAD);
 }
 
+static char *
+get_bus (GUdevDevice *device)
+{
+   const char *subsystem;
+   char *bus_str;
+   GUdevDevice *parent;
+
+   subsystem = g_udev_device_get_subsystem (device);
+   parent = g_object_ref (device);
+
+   while (parent  g_strcmp0 (subsystem, input) == 0) {
+   GUdevDevice *old_parent = parent;
+   parent = g_udev_device_get_parent (old_parent);
+   subsystem = g_udev_device_get_subsystem (parent);
+   g_object_unref (old_parent);
+   }
+
+   if (g_strcmp0 (subsystem, tty) == 0 || g_strcmp0 (subsystem, serio) 
== 0)
+   bus_str = g_strdup (serial);
+   else
+   bus_str = g_strdup (subsystem);
+
+   if (parent)
+   g_object_unref (parent);
+
+   return bus_str;
+}
+
 static gboolean
 get_device_info (const char   *path,
 int  *vendor_id,
@@ -60,7 +88,7 @@ get_device_info (const char   *path,
GUdevDevice *device;
const char * const subsystems[] = { input, NULL };
gboolean retval;
-   const char *bus_str;
+   char *bus_str;
const char *devname;
 
g_type_init();
@@ -68,6 +96,7 @@ get_device_info (const char   *path,
retval = FALSE;
*builtin = IS_BUILTIN_UNSET;
*name = NULL;
+   bus_str = NULL;
client = g_udev_client_new (subsystems);
device = g_udev_client_query_by_device_file (client, path);
if (device == NULL) {
@@ -88,25 +117,7 @@ get_device_info (const char   *path,
g_object_unref (parent);
}
 
-   /* FIXME: ID_BUS on the device is usb even for bluetooth devices,
-* but ID_BUS on the parent is NULL.
-*/
-   bus_str = g_udev_device_get_property (device, ID_BUS);
-   /* Serial devices are weird */
-   if (bus_str == NULL) {
-   if (g_strcmp0 (g_udev_device_get_subsystem (device), tty) == 
0)
-   bus_str = serial;
-   }
-   /* Poke the parent device for Bluetooth models */
-   if (bus_str == NULL) {
-   GUdevDevice *parent;
-
-   parent = g_udev_device_get_parent (device);
-
-   g_object_unref (device);
-   device = parent;
-   bus_str = bluetooth;
-   }
+   bus_str = get_bus (device);
 
/* Is the device builtin? */
devname = g_udev_device_get_name (device);
@@ -179,6 +190,8 @@ get_device_info (const char   *path,
retval = TRUE;
 
 bail:
+   if (bus_str != NULL)
+   g_free (bus_str);
if (retval == FALSE)
g_free (*name);
if (device != NULL)
-- 
1.7.10


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


[Linuxwacom-devel] [PATCH libwacom v2 6/7] lib: run up the parent to find the PRODUCT

2012-04-25 Thread Peter Hutterer
For bluetooth devices, the PRODUCT is set on the event device. For
inputattached serial devices, the PRODUCT Is on the parent instead.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
---
Changes to v1:
- don't unref the parent while we're still using product_str
- get parent from old_parent (no functional change)
- gheck for parent != NULL before fetching product. If parent is NULL, this
  will just move the segfault down to the assert(product_str)

 libwacom/libwacom.c |   21 +++--
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c
index 1aeadcd..b966280 100644
--- a/libwacom/libwacom.c
+++ b/libwacom/libwacom.c
@@ -156,7 +156,8 @@ get_device_info (const char   *path,
 
*vendor_id = strtol (vendor_str, NULL, 16);
*product_id = strtol (product_str, NULL, 16);
-   } else if (*bus == WBUSTYPE_BLUETOOTH) {
+   } else if (*bus == WBUSTYPE_BLUETOOTH || *bus == WBUSTYPE_SERIAL) {
+   GUdevDevice *parent;
const char *product_str;
int garbage;
 
@@ -165,17 +166,25 @@ get_device_info (const char   *path,
 * into:
 * vendor 0x56a
 * product 0x81 */
+   parent = g_object_ref (device);
product_str = g_udev_device_get_property (device, PRODUCT);
+
+   while (!product_str  parent) {
+   GUdevDevice *old_parent = parent;
+   parent = g_udev_device_get_parent (old_parent);
+   if (parent)
+   product_str = g_udev_device_get_property 
(parent, PRODUCT);
+   g_object_unref (old_parent);
+   }
+
g_assert (product_str);
if (sscanf(product_str, %d/%x/%x/%d, garbage, vendor_id, 
product_id, garbage) != 4) {
libwacom_error_set(error, WERROR_UNKNOWN_MODEL, 
Unimplemented serial bus);
+   g_object_unref(parent);
goto bail;
}
-   } else if (*bus == WBUSTYPE_SERIAL) {
-   /* FIXME This matches the declaration in serial-wacf004.tablet
-* Might not be good enough though */
-   *vendor_id = 0;
-   *product_id = 0;
+   if (parent)
+   g_object_unref (parent);
} else {
libwacom_error_set(error, WERROR_UNKNOWN_MODEL, Unsupported 
bus '%s', bus_str);
goto bail;
-- 
1.7.10


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel