tuhiproject / tuhi

An application to access Wacom SmartPad devices
GNU General Public License v2.0
153 stars 32 forks source link

Exception: DeviceError.AUTHORIZATION_ERROR #266

Open jkd2016 opened 4 years ago

jkd2016 commented 4 years ago

I have a Wacom Bamboo Slate. Tuhi was working fine for a few days in both normal and live mode.

Now suddenly it has stopped working. I've reinstalled Tuhi from scratch and removed and re-paired the tablet.

Here is the last few lines of the log from tuhi.server:

10:23:18 DEBUG: tuhi.dbus: Live mode started on Bamboo Slate for :1.94
10:23:18 DEBUG: tuhi.ble.E0:46:6C:7E:FE:F4: Connecting
10:23:33 DEBUG: tuhi.ble.E0:46:6C:7E:FE:F4: Connection established
10:23:34 DEBUG: tuhi: E0:46:6C:7E:FE:F4: connected for DeviceMode.LIVE
10:23:34 DEBUG: tuhi.wacom: Bamboo Slate is using protocol SLATE
10:23:34 DEBUG: tuhi.wacom: E0:46:6C:7E:FE:F4: starting for mode LIVE
10:23:34 DEBUG: tuhi.fw: command: GET_WIDTH
10:23:34 DEBUG: tuhi.fw: E0:46:6C:7E:FE:F4: TX NORDIC --> ea / 02 / 03 00
10:23:34 DEBUG: tuhi.fw: sessionid: f60fd95751d54baaaddfd2b2a1734ac6-1
10:23:34 DEBUG: tuhi.fw: E0:46:6C:7E:FE:F4: RX NORDIC <-- eb 06 03 00 60 54 00 00
10:23:34 DEBUG: tuhi.fw: command: GET_HEIGHT
10:23:34 DEBUG: tuhi.fw: E0:46:6C:7E:FE:F4: TX NORDIC --> ea / 02 / 04 00
10:23:34 DEBUG: tuhi.fw: E0:46:6C:7E:FE:F4: RX NORDIC <-- eb 06 04 00 d0 39 00 00
10:23:34 INFO: tuhi.wacom: dimensions: 21600x14800, point size 10µm
10:23:34 DEBUG: tuhi.fw: command: CONNECT
10:23:34 DEBUG: tuhi.fw: E0:46:6C:7E:FE:F4: TX NORDIC --> e6 / 06 / b9 0a 36 b3 93 6f
10:23:34 DEBUG: tuhi.fw: E0:46:6C:7E:FE:F4: RX NORDIC <-- b3 01 07
10:23:34 ERROR: tuhi.wacom: **** Exception: DeviceError.AUTHORIZATION_ERROR ****
10:23:34 DEBUG: tuhi.ble.E0:46:6C:7E:FE:F4: Disconnected
10:23:34 DEBUG: tuhi: E0:46:6C:7E:FE:F4: disconnected
10:25:10 DEBUG: tuhi.ble: Object added: /org/bluez/hci0/dev_4C_69_8C_B8_F8_4F
10:25:10 DEBUG: tuhi.ble.4C:69:8C:B8:F8:4F: Device /org/bluez/hci0/dev_4C_69_8C_B8_F8_4F - UNKNOWN

The problem appears to be to do with "Exception: DeviceError.AUTHORIZATION_ERROR" which I wasn't seeing before.

The tablet works fine with Tuhi on my colleague's laptop in live mode, so I don't think the problem is with the tablet itself.

Thanks, John.

valexz commented 3 years ago

Hi @jkd2016

Did you connect your smartpad to another device i.e Android tablet?

I didn't figure out where exactly it store device but you may try to do the next: rm -rf /home/$USER/.local/share/tuhi rm -rf /home/$USER/.cache/tuhi

PS: I am using live mode with flatpack install. After that run tuhi live: ./tuhi-live.py --flatpak-compatibility-mode

Works fine! Even pressure works (Tested in GIMP and Krita)

whot commented 3 years ago

e6 / 06 / b9 0a 36 b3 93 6f is the command that sends the uuid to the device for authorization. If that fails it's usually because the device has since changed the UUID (usually by being paired with some other host). Tuhi should detect this and prompt you to re-pair but it doesn't seem to work reliably.

I didn't figure out where exactly it store device but you may try to do the next:

$HOME/.local/share/tuhi/12:34:56:AB:DC:EF/settings.ini - removing that file should be enough.

jkd2016 commented 3 years ago

Thanks Alexander and Peter!

Actually I figured out a few months ago that removing the tuhi configuration files resolved the issue.

Nice work in reverse engineering the tablet protocol by the way. The tablet is indispensable with 'live mode' in combination with MyPaint for writing equations during online discussions with colleagues.

Regards, John.

jkd2016 commented 3 years ago

Hello again,

I'm have a new problem with the 'live' tool.

The application 'tuhi.devel' works fine. However when I run 'tuhi.live' I get:

dropping privileges
No-one is handling org.freedesktop.tuhi1, attempting to start a daemon
INFO: Connected to the Tuhi daemon
10:54:51 INFO: tuhi: E0:46:6C:7E:FE:F4: device without config, must be registered first

I've tried rebooting and removing the tuhi configuration files but nothing seems to work. It worked fine in the past and nothing obvious has changed since the last session.

Regards, John.

whot commented 3 years ago

10:54:51 INFO: tuhi: E0:46:6C:7E:FE:F4: device without config, must be registered first

That just means that the tool cannot find the configuration files for the device. If you registered as user but you're running as root, that may be the issue?