s5vi's Motorola p2k phone page
February 09, 2012, 09:40:51 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 2 3 [4] 5 6   Go Down
  Print  
Author Topic: Some useful functions  (Read 27223 times)
0 Members and 1 Guest are viewing this topic.
napsack
VIP
Newbie
*****
Offline Offline

Posts: 22


« Reply #45 on: August 27, 2007, 01:42:34 am »

V3xx Successfully restarts with 'mode r'. Great job  Grin

USB_DEBUG log.
http://home.earthlink.net/~napsack1/logs/p2k-core-V_0.C.txt
Logged
s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« Reply #46 on: August 27, 2007, 09:37:23 am »

Uhhh, so sending command is ok.
There is a trouble on reading answer.
Now i need kernel log (echo 1 > /sys/module/usbcore/usbfs_snoop) to see reading sequence...
Logged

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

Posts: 56


rasputin007@hotmail.co.uk
WWW Email
« Reply #47 on: August 27, 2007, 03:17:03 pm »

I did not have the same effect on my Maxx with v.0.C.


I tried the echo 1 > /sys/module/usbcore/parameters/usbfs_snoop, but there was nothing in /var/log/message.
Logged

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

Posts: 769



WWW Email
« Reply #48 on: August 27, 2007, 06:20:50 pm »

Rasp, i dont know what went wrong,
but i used to enter that "echo 1 >...." command in separate terminal window as root
then i enter some command to p2k-core

did you mean your Max didnt restart after "mode r" ?
Logged

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

Posts: 56


rasputin007@hotmail.co.uk
WWW Email
« Reply #49 on: August 27, 2007, 08:57:04 pm »

I am logged in a normal user, but su in a terminal to "echo 0 > /sys/module/usbcore/parameters/usbfs_snoop" (but can not find any trace of that in /var/log/message), then use p2k-core as normal user butwhen "info a" quits p2k-core, I run "echo 1 > /sys/module/usbcore/parameters/usbfs_snoop" (which left 5 lines in /var/log/message and none of them was informative).
And yes, "mode r", "info a" and "file l a" all quit p2k-core with Segmentation Fault.
I'll try again tonight, see if it is any different.
OK, I have done it again, now the following screenshots are messages I got when I did "make" of p2k-core V.0.C ( I never got them with any previous versions!)



The funny thing is that "mode r" actually restarted my Maxx.

To be sure I ran the same on Debian64, same "make" messages, but would just not do any "./p2k-core -v", it quit straight with segmentation fault.
Here is the /var/log/message bit after "echo 1 > /sys/module/usbcore/parameters/usbfs_snoop" in Debian64.
Aug 27 21:12:06 linux2 kernel: usb 1-1: new full speed USB device using ohci_hcd and address 7
Aug 27 21:12:06 linux2 kernel: usb 1-1: configuration #1 chosen from 1 choice
Aug 27 21:12:06 linux2 kernel: cdc_acm 1-1:1.0: ttyACM0: USB ACM device
Aug 27 21:12:06 linux2 kernel: usbcore: registered new driver cdc_acm
Aug 27 21:12:06 linux2 kernel: drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters
Aug 27 21:12:49 linux2 kernel: usb 1-1: USB disconnect, address 7
Aug 27 21:12:57 linux2 kernel: usb 1-1: new full speed USB device using ohci_hcd and address 8
Aug 27 21:12:57 linux2 kernel: usb 1-1: configuration #1 chosen from 1 choice
Aug 27 21:12:57 linux2 kernel: cdc_acm 1-1:1.0: ttyACM0: USB ACM device
Aug 27 21:13:13 linux2 kernel: usb 1-1: USB disconnect, address 8
Aug 27 21:13:51 linux2 kernel: usb 1-1: new full speed USB device using ohci_hcd and address 9
Aug 27 21:13:51 linux2 kernel: usb 1-1: configuration #1 chosen from 1 choice
Aug 27 21:13:51 linux2 kernel: cdc_acm 1-1:1.0: ttyACM0: USB ACM device
Aug 27 21:14:13 linux2 kernel: p2k-core[7060]: segfault at 0000000000000004 rip 0000000000401a86 rsp 00007fffa1f5ac00 error 4
Aug 27 21:14:29 linux2 kernel: p2k-core[7061]: segfault at 0000000000000004 rip 0000000000401a86 rsp 00007fff5f387020 error 4

I did the same with Mandrivia and here are those enteries
Aug 27 21:41:01 linux2 kernel: usb 1-1: USB disconnect, address 2
Aug 27 21:41:04 linux2 kernel: usb 1-1: new full speed USB device using ohci_hcd and address 8
Aug 27 21:41:04 linux2 kernel: usb 1-1: configuration #1 chosen from 1 choice
Aug 27 21:41:27 linux2 kernel: usb 1-1: USB disconnect, address 8
Aug 27 21:41:34 linux2 kernel: usb 1-1: new full speed USB device using ohci_hcd and address 9
Aug 27 21:41:34 linux2 kernel: usb 1-1: configuration #1 chosen from 1 choice
Aug 27 21:41:34 linux2 kernel: cdc_acm 1-1:1.0: ttyACM0: USB ACM device
Aug 27 21:42:06 linux2 kernel: usb 1-1: USB disconnect, address 9
Aug 27 21:42:10 linux2 kernel: usb 1-1: new full speed USB device using ohci_hcd and address 10
Aug 27 21:42:10 linux2 kernel: usb 1-1: configuration #1 chosen from 1 choice
Aug 27 21:42:21 linux2 kernel: usb 1-1: USB disconnect, address 10
Aug 27 21:42:29 linux2 kernel: usb 1-1: new full speed USB device using ohci_hcd and address 11
Aug 27 21:42:29 linux2 kernel: usb 1-1: configuration #1 chosen from 1 choice
Aug 27 21:42:29 linux2 kernel: cdc_acm 1-1:1.0: ttyACM0: USB ACM device
Aug 27 21:43:00 linux2 kernel: usb 1-1: USB disconnect, address 11
Aug 27 21:43:03 linux2 kernel: usb 1-1: new full speed USB device using ohci_hcd and address 12
Aug 27 21:43:03 linux2 kernel: usb 1-1: configuration #1 chosen from 1 choice

I hope that can now shed some more light on what is going on.
« Last Edit: August 27, 2007, 10:16:02 pm by rasputin007 » Logged

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

Posts: 769



WWW Email
« Reply #50 on: August 28, 2007, 07:25:39 am »

Warning on compilation are due to new Makefile. I set up "-Wall" argument, which is means: pls display me all Warnings" . You can safely ignore them.

Maxx restarted after "mode r" - this is good news.
You and Rapsnack (Max OSX) also reported that.
This is a special command which no need to read answer, and we can see if sending of command was successful, or not.
Now it seems , sending of command was good.
Other commands (eg: info a)  failed, i think the method reading answer is bad.
So we need other kernel log, while enter commands into p2k-core.

Pls note: "echo 1>..." will switch logging ON.
After testing i suggest to enter "echo 0 >..." command to restore unlogged status, or your messages file will be blown up.
The proper sequence is:
su
echo 1 >.....
p2k-core
info a
exit (from p2k-core)
echo 0 >....
exit (from su)

Your last rar file contains kernel log was VERY informative, thanks and waiting your next one.

Debian64: this error code (4) PF_USER
page fault in userspace (ofcourse libusb run in userspce, no kernel code at all)
I think this is libusb problem on 64 bit systems
You can try: in V_0.C i introduce  a new argument "-d" (device)
You can specify a certain device and p2k-core search only that device
eg: p2k-core -v -d 22b8
this command will not search all usb devices only 22b8 (this is Motorola Vendor Id)

Best Regards.....

ps: i just found a 64bit patch for Moto4lin
It announced to run on 64 bit systems. (need libusb64) did you try Moto4lin on your Debian64?
With or without this patch?: http://www.entheos-technologies.com/Home/moto4lin/moto4lin.html
« Last Edit: August 28, 2007, 07:31:37 am by s5vi » Logged

marsmissions
Newbie
*
Offline Offline

Posts: 5


Email
« Reply #51 on: August 28, 2007, 10:13:23 am »

My rizr won't switch from memory card to data connection properly...unless im doing something wrong.


Code:
sudo ./p2k-core
V_0.C 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.
 Search for Motorola Data Interface.
 Search for Motorola Mass Storage Interface.
!error: device not found.
P2k:> conn
 Search for Motorola Test Command.
 Search for Motorola Data Interface.
 Search for Motorola Mass Storage Interface.
 Found Interface: Motorola Mass Storage Interface
 Interface 00 is claimed by kernel driver: usb-storage
 Interface 00 is detached from kernel driver: usb-storage
 Inteface number: 00, Endpoints: 82 01
 Switching to P2kmode (cca. 2-3 sec)
!error: bulk read failed
*** glibc detected *** ./p2k-core: double free or corruption (fasttop): 0x08065d80 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7e517cd]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7e54e30]
/lib/libusb-0.1.so.4(usb_close+0x29)[0xb7de23ba]
./p2k-core[0x804a507]
./p2k-core[0x804cb57]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc)[0xb7dffebc]
./p2k-core[0x8048f11]
======= Memory map: ========
08048000-0804f000 r-xp 00000000 03:01 3375631    /home/stephen/Desktop/p2k0c/p2k-core
0804f000-08050000 rw-p 00007000 03:01 3375631    /home/stephen/Desktop/p2k0c/p2k-core
08050000-08075000 rw-p 08050000 00:00 0          [heap]
b7c00000-b7c21000 rw-p b7c00000 00:00 0
b7c21000-b7d00000 ---p b7c21000 00:00 0
b7d11000-b7d1c000 r-xp 00000000 03:01 3588160    /lib/libgcc_s.so.1
b7d1c000-b7d1d000 rw-p 0000a000 03:01 3588160    /lib/libgcc_s.so.1
b7d2d000-b7d68000 r--p 00000000 03:01 2737169    /usr/lib/locale/en_US.utf8/LC_CTYPE
b7d68000-b7d69000 rw-p b7d68000 00:00 0
b7d69000-b7d6b000 r-xp 00000000 03:01 3622152    /lib/tls/i686/cmov/libdl-2.5.so
b7d6b000-b7d6d000 rw-p 00001000 03:01 3622152    /lib/tls/i686/cmov/libdl-2.5.so
b7d6d000-b7da7000 r-xp 00000000 03:01 3588170    /lib/libncurses.so.5.5
b7da7000-b7db0000 rw-p 00039000 03:01 3588170    /lib/libncurses.so.5.5
b7db0000-b7ddc000 r-xp 00000000 03:01 3588208    /lib/libreadline.so.5.2
b7ddc000-b7de0000 rw-p 0002c000 03:01 3588208    /lib/libreadline.so.5.2
b7de0000-b7de1000 rw-p b7de0000 00:00 0
b7de1000-b7de7000 r-xp 00000000 03:01 3588224    /lib/libusb-0.1.so.4.4.4
b7de7000-b7de9000 rw-p 00005000 03:01 3588224    /lib/libusb-0.1.so.4.4.4
b7de9000-b7dea000 rw-p b7de9000 00:00 0
b7dea000-b7f25000 r-xp 00000000 03:01 3622146    /lib/tls/i686/cmov/libc-2.5.so
b7f25000-b7f26000 r--p 0013b000 03:01 3622146    /lib/tls/i686/cmov/libc-2.5.so
b7f26000-b7f28000 rw-p 0013c000 03:01 3622146    /lib/tls/i686/cmov/libc-2.5.so
b7f28000-b7f2b000 rw-p b7f28000 00:00 0
b7f2b000-b7f50000 r-xp 00000000 03:01 3622154    /lib/tls/i686/cmov/libm-2.5.so
b7f50000-b7f52000 rw-p 00024000 03:01 3622154    /lib/tls/i686/cmov/libm-2.5.so
b7f5a000-b7f5b000 rw-p b7f5a000 00:00 0
b7f5b000-b7f62000 r--s 00000000 03:01 2704557    /usr/lib/gconv/gconv-modules.cache
b7f62000-b7f64000 rw-p b7f62000 00:00 0
b7f64000-b7f7d000 r-xp 00000000 03:01 3588117    /lib/ld-2.5.so
b7f7d000-b7f7f000 rw-p 00019000 03:01 3588117    /lib/ld-2.5.so
bfeb2000-bfec8000 rw-p bfeb2000 00:00 0          [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
Aborted (core dumped)
Logged
s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« Reply #52 on: August 28, 2007, 08:26:01 pm »

@Mars
it was my fault...fixed now (my e398 can answer, but others cannot, i remove waiting answer)
moreover you can switch ANY combination of modes now (see help command)
mode a (AT)
mode m (MEM)
mode p (P2k)

for example:
a->m->p->a->p->m

http://www.el-co.hu/dl/p2k-core-V_0.D.zip

still waiting for p2k05 linux kernel log.......

hint: you can write a script containing p2k-core commands and
p2k-core < script_file

example:
conn
seem d 117 1
seem d 4a 1
file d /a/mobile/audio/madonna.mp3
exit
« Last Edit: August 28, 2007, 08:28:43 pm by s5vi » Logged

s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« Reply #53 on: August 30, 2007, 07:58:23 am »

« Last Edit: August 30, 2007, 08:00:21 am by s5vi » Logged

napsack
VIP
Newbie
*****
Offline Offline

Posts: 22


« Reply #54 on: August 30, 2007, 02:06:38 pm »

doesn't matter what distro of linux? Maybe I can get one a run it via virtual pc. I have ydl 5 on my playstation, but I think that's running a 64 bit kernel. Most likely I'll run into the libusb issue rasp is having.
Logged
s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« Reply #55 on: August 30, 2007, 02:25:14 pm »

On 64 bit p2k-core need some mod , i will do it.
I think libusb will run on 64 bit.
Logged

napsack
VIP
Newbie
*****
Offline Offline

Posts: 22


« Reply #56 on: August 30, 2007, 02:47:32 pm »

it's not absolutely necessary at the moment. I decided to get debian x86 in an attempt to try and log it under vpc. I'll post back soon if I get any results.
Logged
rasputin007
VIP
Jr. Member
*****
Offline Offline

Posts: 56


rasputin007@hotmail.co.uk
WWW Email
« Reply #57 on: August 30, 2007, 07:33:17 pm »

Here is my update on p2k-core v.0.D with Maxx on Mandrivia.
"mode r" stopped working, I get "Error in P2K05 answer" and then "segmentation fault" and p2k-core quits. Same with "file l a", but "info a" quits only with segmentation fault.
I have coppied the relevant part of the /var/log/message, which includes all USB devices, but usb 1-1 is the Maxx.
Mandriva-log-2.rar
I have stopped testing on using Debian64 cos it does not work with "normal" libusb, but "apt-get install libusb64" will not have it and dselect also refuses to install the libusb64. I had that with other packages before. Debian decides that changing one lib for another one would cause to much of an upset to lots of dependencies. With some more time and digging, prehaps a new install I will get it to work. But at the moment I have the squashfs module loaded into the kernel (just can not do it with Mandrivia) because the V8 (which I hopefully get soon) has MOTOMAGX with squashfs, but this is another story!

@s5vi From what I have seen in the var/log/message file there might be some very interesting things for you.
Logged

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

Posts: 769



WWW Email
« Reply #58 on: August 30, 2007, 07:49:27 pm »

At first look on Rasp's log
YESSSS, there are p2k05 answer info very similar to win32 logs.....
Just analyze and release code soon......

answer to get phone model:
Aug 30 18:52:26 linux2 kernel: usb 1-1: direction=IN
Aug 30 18:52:26 linux2 kernel: usb 1-1: userurb=bff00d84
Aug 30 18:52:26 linux2 kernel: usb 1-1: transfer_buffer_length=4096
Aug 30 18:52:26 linux2 kernel: usb 1-1: actual_length=47
Aug 30 18:52:26 linux2 kernel: usb 1-1: data: 82 01 00 20 00 06 00 00 00 00 00 23 00 00 52 00 41 00 5a 00 52 00 56 00 36

This is ascii: RAZRV6
« Last Edit: August 30, 2007, 07:53:41 pm by s5vi » Logged

s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« Reply #59 on: August 30, 2007, 08:11:45 pm »

Just a fast p2k05 answer read fix, pls try it
http://www.el-co.hu/dl/p2k-core-V_0.E.zip
Logged

Pages: 1 2 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 118 access attempts in the last 7 days.



Google visited last this page January 07, 2012, 09:13:27 pm