s5vi's Motorola p2k phone page
February 10, 2012, 10:32:28 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]   Go Down
  Print  
Author Topic: p2kc aka P2kCommander for linux (a p2k-core GUI frontend) released  (Read 9412 times)
0 Members and 1 Guest are viewing this topic.
s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« on: November 20, 2007, 10:44:07 pm »

http://www.el-co.hu/dl/p2kc/p2kc-V_0.3.zip

Getting info, filelist and file download work very well and fast.
Simply plug phone , start app,and select "p2k:/a" from dropdown list
Compiling: unzip, cd p2k-core, make, cd .., make

this is appereance of classic filemanager:




This is drive selector:




This is my phone filelist:




A very special feature, in gui you can enter p2k-core commands:
eg: "mode a"  to switch AT mode (my phone batt is charging in this mode)




Now i entered a p2k-core command to shorten filelist
info a/*.mp3 this will get only mp3 files from phone:




Result here: (only 6 filenames) press "copy" button for downloading...




File downloaded to p2kc default folder:


« Last Edit: November 21, 2007, 08:18:25 am by s5vi » Logged

zman0900
Newbie
*
Offline Offline

Posts: 5

zman0900
« Reply #1 on: November 21, 2007, 04:40:22 am »

This is great that you are developing this for linux also Grin  Will it support P2K05 yet?  I have tried it with my V3xx, but it can't find it.  I am using Ubuntu, and the device manager can find it, so I know its there to be found.  If P2K05 is not supported, do you plan to add it eventually?  It would be great if you do, right now connecting to my phone is one of the few reasons I have to start windows anymore. 

Edit: I did a little looking around in the source, and I found that it seems to support p2k05, but I can't get my phone connected.  From what I see in the source, it seems that the program looks for the devices by their names, but when I do lsusb, my phone does not use any of those names.  I have a US new AT&T V3XX.  When it is connected in data mode, lsusb gives:
Code:
Bus 001 Device 006: ID 22b8:6402 Motorola PCS
In Mem Card mode:
Code:
Bus 001 Device 007: ID 22b8:6410 Motorola PCS
And in USB printing mode:
Code:
Bus 001 Device 008: ID 22b8:6411 Motorola PCS
In all of these modes, the output when I run the program is:
Code:
:~/Desktop/p2kc/p2k-core$ ./p2k-core -v
V_1.2 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:>

Is there anything that I am doing wrong to connect my phone?  If not, is there anything that can be done?
« Last Edit: November 21, 2007, 05:54:35 am by zman0900 » Logged
s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« Reply #2 on: November 21, 2007, 08:16:57 am »

lsusb gives you only device names
pls do "lsusb -v" to see interface names
Maybe AT&T firmware uses different interface names?
pls list them for me.
Anyway you can use p2k-core in cdcacm modem mode:
"p2k-core -m"
this will use cdcacm modem device (autodetecting), something like this /dev/ttyACM0
or "p2k-core -m /dev/ttyACM0" to specify certain modemdevice
I have reports that V3xx works fine....
If this will be good in p2kc source you can mod calling of "p2k-core -s" to "p2k-core -m -s"
Good luck
Logged

zman0900
Newbie
*
Offline Offline

Posts: 5

zman0900
« Reply #3 on: November 21, 2007, 09:21:42 am »

Here is the output of the lsusb -v:
Code:
Bus 001 Device 012: ID 22b8:6402 Motorola PCS
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            2 Communications
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x22b8 Motorola PCS
  idProduct          0x6402
  bcdDevice            0.02
  iManufacturer           1
  iProduct                2
  iSerial                 3
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           67
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          4
    bmAttributes         0xc0
      Self Powered
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              5
      CDC Header:
        bcdCDC               1.01
      CDC Call Management:
        bmCapabilities       0x03
          call management
          use DataInterface
        bDataInterface          1
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      CDC ACM:
        bmCapabilities       0x02
          line coding and serial state
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              10
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface              6
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
cannot read device status, Operation not permitted (1)
This was when the phone was in data mode, which was what I always needed to use to connect with your program in windows.

I have also already tried using the -m option, but it didn't work either. 
Logged
s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« Reply #4 on: November 21, 2007, 10:28:35 am »

Thanks....
pls do "lsusb -v" as root
and what is your acm device ?
pls do
ls /dev | grep ACM
Logged

zman0900
Newbie
*
Offline Offline

Posts: 5

zman0900
« Reply #5 on: November 21, 2007, 11:04:36 am »

sudo lsusb -v
Code:
Bus 001 Device 013: ID 22b8:6402 Motorola PCS
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            2 Communications
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x22b8 Motorola PCS
  idProduct          0x6402
  bcdDevice            0.02
  iManufacturer           1 Motorola Inc.
  iProduct                2 Motorola Phone (RAZRV3xx)
  iSerial                 3 515144B608040B
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           67
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          4 Motorola Communication Class
    bmAttributes         0xc0
      Self Powered
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              5 Motorola Communication Interface
      CDC Header:
        bcdCDC               1.01
      CDC Call Management:
        bmCapabilities       0x03
          call management
          use DataInterface
        bDataInterface          1
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      CDC ACM:
        bmCapabilities       0x02
          line coding and serial state
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              10
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface              6 Motorola Data Interface
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0000
  (Bus Powered)

ls /dev | grep ACM
Code:
ttyACM0

EDIT:
Wow, I feel stupid now.  Your post about running lsusb as root gave me the brilliant idea to run the program as root, and now it connects.  The graphical program connects too.  The console program seems to work fine, at least for listing files and downloading.  The graphical program lists files fine, but it seg faults when I try to copy a file with the copy button.  I tried using the view button instead, but nothing happened. 
« Last Edit: November 21, 2007, 11:19:34 am by zman0900 » Logged
s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« Reply #6 on: November 21, 2007, 11:18:26 am »

That should work.
Code:
/*---------------------------------------------------------------------------
 *
 * name: Find_AT_device
 * @param
 * @return device handle or 0 if not found
 */
usb_dev_handle *Find_AT_device ()
{
usb_dev_handle *dev=NULL;  /* the device handle */
if(!(dev = open_dev("Motorola Data Interface"))) {
if(!(dev = open_dev("Motorola Communication Interface"))) {
//fprintf(stderr,"!error: not found!\n");
return 0;
}
}
i cannot try it my device is "Motorola Data Interface"

p2k-core -m /dev/ttyACM0
also should work

is libusb ok? Moto4lin uses libusb also.

pls do
p2k-core -m /dev/ttyACM0 -v

Logged

zman0900
Newbie
*
Offline Offline

Posts: 5

zman0900
« Reply #7 on: November 21, 2007, 11:21:30 am »

It seems you replied while I was editing.  Please see my edit above -^
Logged
s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« Reply #8 on: November 21, 2007, 11:24:50 am »

Ya i noticed....
p2k-core is fully functional
enter "help" command

gui is in early state
only file listing and file downloading tested. (i will doublecheck)
on the left panel i select a phone file, and press Copy button

hint:
you can enter p2k-core commands in gui log window, and p2k-core wil execute them
or siply use p2k-core in a terminal
Logged

zman0900
Newbie
*
Offline Offline

Posts: 5

zman0900
« Reply #9 on: November 21, 2007, 05:05:05 pm »

Ah, I see.  Actually, the downloading of files with the gui is what was not working for me...  I can just use p2k-core for now, but I'll be sure to keep checking for new versions of the gui.  It looks like its going to be a very good program, so keep up the good work.
Logged
tenpin
Newbie
*
Offline Offline

Posts: 1


« Reply #10 on: November 30, 2007, 04:29:34 am »

Having issues with a Motorola USCellular W385 and Fedora 7 (32 bit)

lsusb
Bus 005 Device 002: ID 0dda:2001 Integrated Circuit Solution, Inc.
Bus 005 Device 001: ID 0000:0000 
Bus 004 Device 001: ID 0000:0000 
Bus 003 Device 004: ID 046d:c01b Logitech, Inc. MX310 Optical Mouse
Bus 003 Device 003: ID 413c:2010 Dell Computer Corp.
Bus 003 Device 002: ID 413c:1003 Dell Computer Corp.
Bus 003 Device 001: ID 0000:0000 
Bus 002 Device 001: ID 0000:0000 
Bus 001 Device 003: ID 22b8:2b44 Motorola PCS
Bus 001 Device 002: ID 03f0:5511 Hewlett-Packard
Bus 001 Device 001: ID 0000:0000

 ./p2k-core       (as root)
V_1.2 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.
 Found Interface: Motorola Communication Interface
 Inteface number: 00, Endpoints: 81 82
 Switching to P2kmode (cca. 2-3 sec)
!error: bulk write failed
P2k:> conn
 Search for Motorola Test Command.
 Search for Motorola Data Interface.
 Found Interface: Motorola Communication Interface
 Inteface number: 00, Endpoints: 81 82
 Switching to P2kmode (cca. 2-3 sec)
!error: bulk write failed
P2k:>

also the gui dies starts but dies (segmentation fault) after about 5 seconds...

Thanks!
Logged
s5vi
Administrator
Hero Member
*****
Offline Offline

Posts: 769



WWW Email
« Reply #11 on: November 30, 2007, 08:04:34 am »

you can try  modem mode:
p2k-core -m
Logged

bahathir
Newbie
*
Offline Offline

Posts: 9


« Reply #12 on: December 02, 2007, 08:31:41 am »

p2k-core is getting better and better. I did not need to use option [-m] anymore Smiley, with this latest version of p2k-core. It will wonderful if you can implement filename completion for phone's filesystem too.
TQ.
Logged
Pages: [1]   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 27, 2012, 05:09:30 pm