s5vi's Motorola p2k phone page
February 10, 2012, 09:15:09 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Over 30000 member ! Under heavy spammer attack ! Cleaning in progress !
V-6.0.0 with CDMA support is available now.
To become VIP: you can do it via PayPal: http://www.el-co.hu/p2k05/paypal.html
 
   Home   Help Login Register  
Pages: 1 ... 3 4 [5] 6   Go Down
  Print  
Author Topic: Some useful functions  (Read 27236 times)
0 Members and 2 Guests are viewing this topic.
napsack
VIP
Newbie
*****
Offline Offline

Posts: 22


« Reply #60 on: August 31, 2007, 05:17:08 am »

I'm waiting for the V8 here too. The phone looks too sweet to pass.
Here's my log if useful at all. The first time mode r didn't restart my phone. I waited about a minute. The second time it was a couple of seconds.
http://home.earthlink.net/~napsack1/logs/log.txt
Logged
s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« Reply #61 on: August 31, 2007, 06:13:42 am »

Thanks for log , we can see received answer bytes , but bus error occured at the end. (i think due to libusb operates different than win32 native)
Logged

rasputin007
VIP
Jr. Member
*****
Offline Offline

Posts: 56


rasputin007@hotmail.co.uk
WWW Email
« Reply #62 on: August 31, 2007, 10:03:05 pm »

WOW!
p2k-core v.0E and Maxx work, not perfect, but it never quit once.
"mode r" worked perfect.
"seem d 4a 1" produced a seem file in the p2k-core directory.



The downloaded seem file is only 23 Bytes long but the original is 1024 Bytes long. Anyway the first 23 Bytes are identical.
I have put both (p2k-core downloaded and original seem) here.

Then I went on with "info e/icon", but it listed all files in a/


Next I tried "info a"


Followed by just plain "info" (I used the VL Maxx which has no g/!)




I also tried "file d /a/mobile/picture/wp_purple_girl.jpg" (wallpaper), but the lines of send and received data were racing along the screen, eventually after 5 minutes or so I canceled with Crt+C.

I thought I could copy and paste the /var/log/message parts for you cos I did the "echo 1 > /sys/module/usbcore/parameters/usbfs_snoop" as su before starting p2k-core, but to my surprise it had changed from 1MB (yesterday) to a 406 MB !!!!! I still have it, but I will not keep it that big, so if you want it let me know.
« Last Edit: August 31, 2007, 10:06:23 pm by rasputin007 » Logged

Nothing is impossible, only miracles take a bit longer!
s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« Reply #63 on: September 01, 2007, 11:10:41 am »

Thanks for lists Rasputin,

to shoreten the kernel message log:
you can  use -d 22b8 arg.
this makes p2k-core to deal only devices with VendorId(22b8 is Motorola)
Anyway i will consider to make it default and introduce "-d all" and "-d xxxx" arguments if user want to search all or other device.
the lenhgt of kernel log ofcourse depends which operations will you start (file and seem operation as long as file or seem)
so for kernel log testing i suggest short files or info cmd
about info cmd syntax:
if ou use wildcard you must specify .* at the end (moto restriction)
so the folder only is bad

Proximity to release V_1.0 . i want this release handle p2k05 correctly
i must analyze answer bytes....
download seem answer is 1k (with header is x40c) saved file is smaller ?  will fix easily i think....
filelist: owner,attriv and filenames arte shifted some bytes......
info cmds are perfect as i see
file download is seriously bad....i will fix them soon......
Logged

s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« Reply #64 on: September 03, 2007, 07:32:16 am »

here is V_0.F with some p2k05 fix, and "-d 22b8" is the default
if you want to scan all usb devices you must run with "-d all" argument.
http://www.el-co.hu/dl/p2k-core-V_0.F.zip
if filelist is bad pls post log with "-v"
« Last Edit: September 03, 2007, 09:08:31 am by s5vi » Logged

rasputin007
VIP
Jr. Member
*****
Offline Offline

Posts: 56


rasputin007@hotmail.co.uk
WWW Email
« Reply #65 on: September 07, 2007, 10:01:31 pm »

Sorry, it took so long.
I tried p2k-core v.0.F with my Maxx and nearly everything went OK.
"mode r" works perfect.
"info" works perfect.
"list l /e/icon" still lists the whole e/.
"seem d 4a 1" downloads the seem completly, 100% match!
"file d /e/icon/mefmef_ani.gif" downloads the animated gif file perfect.
"fold c /a/mobile/skins/Test" did not seem to have worked cos I checked with Windows and P2K Commander, but could not find the folder.
I'll try again and get a screenshot of the send data and recevied data.
OK, here are 2 screenshots.
The first shows what happens at "fold c /a/mobile/skins/test"


when I then try "file l /a/mobile/skins" I get all files listed in a/, but no /a/mobile/skins/test.
Then I tried "file u Blue.jpg /a/mobile/pictures" and this is the result

Works perfect cos I have it now as a wallpaper.

So, the only not fully working cmds are "file l /some dirctory" cos they just display the whole partition and the "fold c /somewhere/NewDirectory" does not create any folders.
« Last Edit: September 07, 2007, 10:33:13 pm by rasputin007 » Logged

Nothing is impossible, only miracles take a bit longer!
s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« Reply #66 on: September 08, 2007, 02:27:24 pm »

Thanks Rasp,
You described 2 things are not failures:

if you create a folder, the new folder will not shown because it is empty
you must upload there at least one file, after folder creation
fold c /a/mobile/skins/test
file u test.ski /a/mobile/skins/test
this works as i described due to p2k filesystem shows only files with path, not folders

Second: the filters use with info cmd must be "*.xxx" at the end
sorry this is also p2k feature
wildcards NOT works as like DOS or other cmdline
afaik you cannot get a folder content even if try to /a/mobile/*.*
so you use this only if you spceify *.gif or *.jpg or *.xxx

Thanks for testing.....Next step: the gui app.
Best Regards....
Logged

rasputin007
VIP
Jr. Member
*****
Offline Offline

Posts: 56


rasputin007@hotmail.co.uk
WWW Email
« Reply #67 on: September 08, 2007, 09:04:06 pm »

Cheers s5vi, just learned something new! Wink
Logged

Nothing is impossible, only miracles take a bit longer!
napsack
VIP
Newbie
*****
Offline Offline

Posts: 22


« Reply #68 on: September 09, 2007, 01:58:02 am »

Its currently not so successful for me file l works fine it gives me a segmentation fault at times, but downloading files gives me a bus error. I'll post a log of usb_debug if you'd like.
Logged
xtravar
Newbie
*
Offline Offline

Posts: 3


« Reply #69 on: September 14, 2007, 04:26:33 am »

Hey, thanks again for your development on p2k stuff.  Here's some pointers I've figured out from your p2k_core and my own coding/testing...

1. For open_dev you want your code something similar to this:
 if(!dev->config) i=usb_fetch_and_parse_descriptors(curr_dev); else i = 1;
Since, at least for my version of libusb and linux, it returns an error if dev->config is already set.

2. For the V325 I had, the interface is called "Motorola Communication Interface" rather than "Motorola Data Interface" and p2k commands don't work on it at all.  Unfortunately, I had to give the device back to work so I can't do any more testing on it.

Also, with my V3xx, after the program ends the phone repeatedly re-sets the ring style until I unplug the USB cord.  I think this has to do with my drivers or something.
Logged
s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« Reply #70 on: September 14, 2007, 07:41:06 am »

Thanks for testing,
I call usb_fetch_and_parse_descriptors due to mac osx cannot got descriptors automatically just like in linux
I will do your suggestion, also with modem dev name for V325....
Logged

motojono
Newbie
*
Offline Offline

Posts: 3


« Reply #71 on: October 15, 2007, 10:12:20 am »

# ./p2k-core -d 22b8 -v
V_0.F Commands: exit,conn,info,seem,file,fold,mode,help,list
Shell commands and command history (up/down arrows) also works.
---------------------------------------------------------------
 Search for Motorola Test Command.
_Found: Motorola Phone (RAZRV3x)
 Search for Motorola Data Interface.
_Found: Motorola Phone (RAZRV3x)
 Found Interface: Motorola Data Interface
 Inteface number: 01, Endpoints: 86 05
 Switching to P2kmode (cca. 2-3 sec)
_Sent  Data  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
    000000: 41 54 2b 4d 4f 44 45 3d 38 0d 0a
!error: bulk write failed
P2k:> info
 Search for Motorola Test Command.
_Found: Motorola Phone (RAZRV3x)
 Search for Motorola Data Interface.
_Found: Motorola Phone (RAZRV3x)
 Found Interface: Motorola Data Interface
 Inteface number: 01, Endpoints: 86 05
 Switching to P2kmode (cca. 2-3 sec)
_Sent  Data  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
    000000: 41 54 2b 4d 4f 44 45 3d 38 0d 0a
!error: bulk write failed
P2k:> 
Logged
s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« Reply #72 on: October 15, 2007, 02:20:50 pm »

I see strange endpoint config (86 05)
pls post kernel log from /var/log/messages
To switch usb kernel log pls do:
echo 1 > /sys/module/usbcore/usbfs_snoop
this command fills /var/log/message file with usb log data
echo 0 > /sys/module/usbcore/usbfs_snoop
this will cancel usb logging

« Last Edit: October 15, 2007, 02:30:47 pm by s5vi » Logged

motojono
Newbie
*
Offline Offline

Posts: 3


« Reply #73 on: October 16, 2007, 12:34:39 am »

You won't believe it, its just started working by itself.
I have been away from the machine for approx 18 hours, is the only difference (phone taken away, then plugged back in).

Oct 16 09:30:27 jonh kernel: usb 4-1: new full speed USB device using uhci_hcd and address 11
Oct 16 09:30:27 jonh kernel: usb 4-1: configuration #1 chosen from 1 choice
Oct 16 09:30:27 jonh kernel: cdc_acm 4-1:1.0: ttyACM0: USB ACM device
Oct 16 09:30:27 jonh kernel: usbcore: registered new interface driver cdc_acm
Oct 16 09:30:27 jonh kernel: drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters
Oct 16 09:30:37 jonh kernel: usb 4-1: USB disconnect, address 11
Oct 16 09:30:40 jonh kernel: usb 4-1: new full speed USB device using uhci_hcd and address 12
Oct 16 09:30:40 jonh kernel: usb 4-1: config 1 has an invalid interface number: 5 but max is 2
Oct 16 09:30:40 jonh kernel: usb 4-1: config 1 has an invalid interface number: 6 but max is 2
Oct 16 09:30:40 jonh kernel: usb 4-1: config 1 has an invalid interface number: 8 but max is 2
Oct 16 09:30:40 jonh kernel: usb 4-1: config 1 has no interface number 0
Oct 16 09:30:40 jonh kernel: usb 4-1: config 1 has no interface number 1
Oct 16 09:30:40 jonh kernel: usb 4-1: config 1 has no interface number 2
Oct 16 09:30:40 jonh kernel: usb 4-1: configuration #1 chosen from 1 choice

Logged
motojono
Newbie
*
Offline Offline

Posts: 3


« Reply #74 on: October 16, 2007, 12:40:32 am »

echo 1 > /sys/module/usbcore/parameters/usbfs_snoop
(Note path slightly different on Fedora).

..................
Oct 16 09:35:03 jonh kernel: usb usb2: usbdev_ioctl: IOCTL
Oct 16 09:35:03 jonh kernel: usb 2-1: usbdev_ioctl: IOCTL
Oct 16 09:35:04 jonh kernel: usb 4-1: new full speed USB device using uhci_hcd and address 13
Oct 16 09:35:04 jonh kernel: usb 4-1: configuration #1 chosen from 1 choice
Oct 16 09:35:04 jonh kernel: cdc_acm 4-1:1.0: ttyACM0: USB ACM device
Oct 16 09:35:04 jonh kernel: usb usb1: usbdev_ioctl: CONNECTINFO
Oct 16 09:35:04 jonh kernel: usb usb1: usbdev_ioctl: IOCTL
........................
Oct 16 09:35:09 jonh kernel: usb 2-1: usbdev_ioctl: IOCTL
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CONTROL
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: bRequest=06 bRrequestType=80 wValue=0200 wIndex=0000 wLength=0008
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: data 09 02 43 00 02 01 04 80
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CONTROL
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: bRequest=06 bRrequestType=80 wValue=0200 wIndex=0000 wLength=0043
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: data 09 02 43 00 02 01 04 80 fa 09 04 00 00 01 02 02 01 05 05 24 00 01 01 05 24 01 03 01 05 24 06 00 01
04 24 02 02 07 05 8b 03 10 00 0a 09 04 01 00 02 0a 00 00 10 07 05 05 02 40 00 00 07 05 86 02 40 00 00
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CONTROL
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: bRequest=06 bRrequestType=80 wValue=0300 wIndex=0000 wLength=00ff
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: data 04 03 09 04
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CONTROL
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: bRequest=06 bRrequestType=80 wValue=0302 wIndex=0409 wLength=00ff
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: data 32 03 4d 00 6f 00 74 00 6f 00 72 00 6f 00 6c 00 61 00 20 00 50 00 68 00 6f 00 6e 00 65 00 20 00 28
00 52 00 41 00 5a 00 52 00 56 00 33 00 78 00 29 00
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CONTROL
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: bRequest=06 bRrequestType=80 wValue=0300 wIndex=0000 wLength=00ff
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: data 04 03 09 04
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CONTROL
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: bRequest=06 bRrequestType=80 wValue=0305 wIndex=0409 wLength=00ff
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: data 42 03 4d 00 6f 00 74 00 6f 00 72 00 6f 00 6c 00 61 00 20 00 43 00 6f 00 6d 00 6d 00 75 00 6e 00 69
00 63 00 61 00 74 00 69 00 6f 00 6e 00 20 00 49 00 6e 00 74 00 65 00 72 00 66 00 61 00 63 00 65 00
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CONTROL
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: bRequest=06 bRrequestType=80 wValue=0300 wIndex=0000 wLength=00ff
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: data 04 03 09 04
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CONTROL
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: bRequest=06 bRrequestType=80 wValue=0310 wIndex=0409 wLength=00ff
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: data 30 03 4d 00 6f 00 74 00 6f 00 72 00 6f 00 6c 00 61 00 20 00 44 00 61 00 74 00 61 00 20 00 49 00 6e
00 74 00 65 00 72 00 66 00 61 00 63 00 65 00
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CONTROL
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: bRequest=06 bRrequestType=80 wValue=0200 wIndex=0000 wLength=0008
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: data 09 02 43 00 02 01 04 80
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CONTROL
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: bRequest=06 bRrequestType=80 wValue=0200 wIndex=0000 wLength=0043
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: data 09 02 43 00 02 01 04 80 fa 09 04 00 00 01 02 02 01 05 05 24 00 01 01 05 24 01 03 01 05 24 06 00 01
04 24 02 02 07 05 8b 03 10 00 0a 09 04 01 00 02 0a 00 00 10 07 05 05 02 40 00 00 07 05 86 02 40 00 00
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CONTROL
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: bRequest=06 bRrequestType=80 wValue=0300 wIndex=0000 wLength=00ff
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: data 04 03 09 04
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CONTROL
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: bRequest=06 bRrequestType=80 wValue=0302 wIndex=0409 wLength=00ff
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: data 32 03 4d 00 6f 00 74 00 6f 00 72 00 6f 00 6c 00 61 00 20 00 50 00 68 00 6f 00 6e 00 65 00 20 00 28
00 52 00 41 00 5a 00 52 00 56 00 33 00 78 00 29 00
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CONTROL
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: bRequest=06 bRrequestType=80 wValue=0300 wIndex=0000 wLength=00ff
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: data 04 03 09 04
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CONTROL
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: bRequest=06 bRrequestType=80 wValue=0305 wIndex=0409 wLength=00ff
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: data 42 03 4d 00 6f 00 74 00 6f 00 72 00 6f 00 6c 00 61 00 20 00 43 00 6f 00 6d 00 6d 00 75 00 6e 00 69
00 63 00 61 00 74 00 69 00 6f 00 6e 00 20 00 49 00 6e 00 74 00 65 00 72 00 66 00 61 00 63 00 65 00
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CONTROL
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: bRequest=06 bRrequestType=80 wValue=0300 wIndex=0000 wLength=00ff
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: data 04 03 09 04
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CONTROL
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: bRequest=06 bRrequestType=80 wValue=0310 wIndex=0409 wLength=00ff
Oct 16 09:35:09 jonh kernel: usb 4-1: control read: data 30 03 4d 00 6f 00 74 00 6f 00 72 00 6f 00 6c 00 61 00 20 00 44 00 61 00 74 00 61 00 20 00 49 00 6e
00 74 00 65 00 72 00 66 00 61 00 63 00 65 00
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: GETDRIVER
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: IOCTL
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: GETDRIVER
Oct 16 09:35:09 jonh last message repeated 18 times
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: CLAIMINTERFACE
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: SUBMITURB
Oct 16 09:35:09 jonh kernel: usb 4-1: bulk urb
Oct 16 09:35:09 jonh kernel: usb 4-1: submit urb
Oct 16 09:35:09 jonh kernel: usb 4-1: direction=OUT
Oct 16 09:35:09 jonh kernel: usb 4-1: userurb=bff310b4
Oct 16 09:35:09 jonh kernel: usb 4-1: transfer_buffer_length=11
Oct 16 09:35:09 jonh kernel: usb 4-1: actual_length=0
Oct 16 09:35:09 jonh kernel: usb 4-1: data: 41 54 2b 4d 4f 44 45 3d 38 0d 0a
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: REAPURBDELAY
Oct 16 09:35:09 jonh kernel: usb 4-1: urb complete
Oct 16 09:35:09 jonh kernel: usb 4-1: direction=OUT
Oct 16 09:35:09 jonh kernel: usb 4-1: userurb=bff310b4
Oct 16 09:35:09 jonh kernel: usb 4-1: transfer_buffer_length=11
Oct 16 09:35:09 jonh kernel: usb 4-1: actual_length=11
Oct 16 09:35:09 jonh kernel: usb 4-1: data: 41 54 2b 4d 4f 44 45 3d 38 0d 0a
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: REAPURBDELAY
Oct 16 09:35:09 jonh kernel: usb 4-1: usbdev_ioctl: RELEASEINTERFACE
Oct 16 09:35:10 jonh kernel: usb 4-1: USB disconnect, address 13
Oct 16 09:35:10 jonh kernel: usb usb1: usbdev_ioctl: CONNECTINFO
Oct 16 09:35:10 jonh kernel: usb usb1: usbdev_ioctl: IOCTL
Oct 16 09:35:10 jonh kernel: usb usb3: usbdev_ioctl: CONNECTINFO
Oct 16 09:35:10 jonh kernel: usb usb3: usbdev_ioctl: IOCTL
Oct 16 09:35:10 jonh kernel: usb usb5: usbdev_ioctl: CONNECTINFO
Oct 16 09:35:10 jonh kernel: usb usb5: usbdev_ioctl: IOCTL
Oct 16 09:35:10 jonh kernel: usb 4-2: usbdev_ioctl: CONNECTINFO
Oct 16 09:35:10 jonh kernel: usb usb4: usbdev_ioctl: CONNECTINFO
Oct 16 09:35:10 jonh kernel: usb 4-2: usbdev_ioctl: IOCTL
..................................
etc

But since this is now a working case I dont know how much use that log is to you?

If/when it fails again, I'll capture the log then and you can take a look.

Thanks!

Logged
Pages: 1 ... 3 4 [5] 6   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!

Bad Behavior has blocked 120 access attempts in the last 7 days.



Google visited last this page January 17, 2012, 01:37:55 pm