Welcome! Log In Create A New Profile

Advanced

Usb Connect error - Failed to claim usb device!

Posted by rotceh_dnih 
Usb Connect error - Failed to claim usb device!
February 25, 2013 08:17AM
hey guys ive got a few little xg4241 picture frames from dicksmiths here in aus heres a link


and heres my addon for flashlib.ini
[m25p80]
; ×éÖ¯
Capacity = 0x100000
Sector-Type = Simple
Max-Sector-Size = 0x10000
Min-Sector-Size = 0x1000
Page-Size = 0x100
; ID
ID-9F = 0x20201400
ID-9F-MASK = 0xFFFFFF00

; ÃüÁî
Write-Enable = 0x06
Write-Disable = 0x04
Read-Status-Register = 0x05
Write-Status-Register = 0x01
Word-Program = 0x02
Read = 0x03
Fast-Read = 0x0B
Page-Program = 0x02
Erase-4K = 0x20
Erase-64K = 0xD8
Erase-Chip = 0xC7

after playing with the offical sdk from appotech but not getting my screen working i had alook around and found this site and after trying many firmware's i found it works with the 27893 fw .

now my issue is i can not get it to connect to anything i have compiled everythign in the dpf-ax svn "after sdcc2.9 and libhid ect.. where installed :p" but when i try lcd4linux for example i get this

user@ubuntu:~/dpf-ax/trunk/lcd4linux$ ./lcd4linux -F -v -f dpf.conf
LCD4Linux 0.11.0-SVN-1092 starting
Found AX206 DPF
Error: Failed to claim usb device!
Possibly you have to detach the device from hid.
Use hiddetach from the fw folder: 'sudo fw/hiddetach'
                       or libhid: 'sudo libhid-detach-device 1908:3318'
dpf: cannot open dpf device usb0
Error initializing driver DPF: Exit!

ive tried the hiddetach script but it tells me theres no dpf in bootloader mode witch it isnt its just on the screen with the eyes , i also tried ax206term but it complanes about the same kinda thing finds the frame but cannot attach.

im on ubuntu 12.04 LTS

and heres my dump i dont think its needed but there might be something differnt

also dam great support @superelchi your makeing wins :)



Edited 1 time(s). Last edit at 02/25/2013 08:18AM by rotceh_dnih.
Attachments:
open | download - dpf_dump.rar (239.9 KB)
Re: Usb Connect error - Failed to claim usb device!
February 25, 2013 09:50AM
You need to be root to access the port or add an udev rule to allow access from user(s).

Example:
/etc/udev/rules.d/70-dpf.rules:
ATTRS{idVendor}=="1908", ATTRS{idProduct}=="0102", GROUP="users", MODE="0660"

superelchi
Re: Usb Connect error - Failed to claim usb device!
February 25, 2013 07:33PM
Thanks man running it as su worked :) i had to chmod 600 and another command i dont remember somethign about root/root and then it worked

i couldnt make a new udev rule though , i tried vi /etc/udev/rules.d/70-dpf.rules and that got me to where i write it so i pasted in your text but couldnt save it , anyways it works as su so meh.

i have afew more questions if you dont mind , have you looked at the offical appotech sdk ? im trying to add my lcd and spent afew hours trying to decompile my fw before i found this but now i have and know theres a lcd init i can use im very keen to move it over to the sdk mainly for two reasons , one i want to play with the sdk and the games like snake and pacman they have included and also i think i can convert the lcd init asm from the sdk to c code for atmel ic's as it seems pritty straight however when i look at the dpf-ax code for my lcd im left really confused and couldnt follow the lcd pharse code as the MASK_CMD stuff confused me i think coz of things like CMD_SEQCMD being 0x70 but all i could see in my _custom_initseq is 0x71 so any hints on getting the lcd code for the 27893 into the offical sdk format for lcds would be really great as im feeling lost and alone in this right now lol



Edited 1 time(s). Last edit at 02/25/2013 07:34PM by rotceh_dnih.
Re: Usb Connect error - Failed to claim usb device!
February 26, 2013 01:59AM
The lcd parse code is nearly the same as in the sdk (redone in c). The _custom_initseq in lcdinit.s and the code in lcdblit.s are more or less copies of the ones in the buildwin fw (extracted by identify.py). Have a look at the sdk files lcd/../LcdInitTbl.asm and lcd/../OpenWin.asm. You will find the assembler InitTbl parsing code in parse/parse.asm and the macros corresponding to the CMD_.. defines in parse/LcdMacro.inc.

superelchi
Re: Usb Connect error - Failed to claim usb device!
June 28, 2013 06:02AM
thanks for the reply.
I had the same suspicion, but accoroding to the list of installed packages, "gettext-base" was installed.
Or is there a difference between "gettext" and "gettext-base"?



pimsleur-review http://pimsleur-review.com
learn-language learn language
learnspanishonline www.learnspanishonline.ws
learn-french http://www.learn-french.us
learn-language learn language

Kaiyara



Edited 1 time(s). Last edit at 07/19/2013 11:59PM by lilylara.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: