Advertising (This ad goes away for registered users. You can Login or Register)

OpenCMA/libVitaMTP 2.0: CMA on Linux and Windows

Open discussions on programming specifically for the PS Vita.
Forum rules
Forum rule Nº 15 is strictly enforced in this subforum.
Locked
wth
HBL Developer
Posts: 834
Joined: Wed Aug 31, 2011 4:44 pm
Contact:

Re: OpenCMA/libVitaMTP 2.0: CMA on Linux and Windows

Post by wth »

+#define VITAMTP_PROTOCOL_FW_2_60 1600010
Advertising
codestation
Big Beholder
Posts: 1660
Joined: Wed Jan 19, 2011 3:45 pm
Location: /dev/negi

Re: OpenCMA/libVitaMTP 2.0: CMA on Linux and Windows

Post by codestation »

Made a quick wireshark dissector for the vitamtp protocol and thought that it can be useful for somebody instead of leaving the code on my hdd. Useful for some debugging, i guess:

Image

https://gist.github.com/codestation/6303185
Advertising
Plugin list
Working on: QPSNProxy, QCMA - Open source content manager for the PS Vita
Playing: Error: ENOTIME
Repositories: github, google code
Just feel the code..
yifanlu
Guru
Posts: 760
Joined: Sun Mar 11, 2012 6:42 am
Contact:

Re: OpenCMA/libVitaMTP 2.0: CMA on Linux and Windows

Post by yifanlu »

Nice job! I have some code I can push upstream, but not at this moment for security reasons.
PS3Y2kvirus
Posts: 88
Joined: Fri Nov 23, 2012 10:37 pm

Re: OpenCMA/libVitaMTP 2.0: CMA on Linux and Windows

Post by PS3Y2kvirus »

Would you be able to post simple directions on terminal commands Yifan Lu?
PS VITA 3.01
PS3 CECHA01
Ball-N-Cup CFW-RETRO
SMOKE
Retired Mod
Posts: 3673
Joined: Tue Apr 17, 2012 10:00 pm
Location: USA
Contact:

Re: OpenCMA/libVitaMTP 2.0: CMA on Linux and Windows

Post by SMOKE »

PS3Y2kvirus wrote:Would you be able to post simple directions on terminal commands Yifan Lu?
Here:

Code: Select all

smoke@smoke:~$ opencma --help
usage: opencma [wireless|usb] paths [options]
   mode
       wireless    Listen for Wifi connection
       usb         Listen for USB connection (default)
   paths
       -p path     Path to photos
       -v path     Path to videos
       -m path     Path to music
       -a path     Path to apps
   options
       -u path     Path to local URL mappings
       -l level    logging level, number 1-4.
                   1 = error, 2 = info, 3 = verbose, 4 = debug
       -h          Show this help text

additional information:

   All paths must be specified. Please note that having larger
   directories means that OpenCMA will run slower and use more memory.
   This is because OpenCMA doesn't have an external database and builds
   (and keeps) its database in memory. If you try to run OpenCMA with
   paths that contains lots of files and directories it may quickly run
   out of memory. Also beware that using the same path for multiple data
   types (photos and videos, for example) is undefined behavior. It can
   result in files not showing up without a manual database refresh
   (CTRL+Z). Modifying the directory as OpenCMA is running may also
   result in the same behavior.

   URL mappings allow you to redirect Vita's URL download requests to
   some file locally. This can be used to, for example, change the file
   for firmware upgrading when you choose to update the Vita via USB. The
   Vita may request http://example.com/PSP2UPDAT.PUP and if you use the
   option '-u /path/to/fw' then OpenCMA will send
   /path/to/fw/PSP2UPDAT.PUP to the Vita. You do NOT need to do this for
   psp2-updatelist.xml to bypass the update prompt because that file is
   built in to OpenCMA for your convenience. If you do wish to  send a
   custom psp2-updatelist.xml, you can.

   There are four logging levels that you can select with the '-l'
   option. '-l 1' is the default and will only show critical error
   messages. '-l 2' will allow you to see more of the behind-the-scenes
   process such as what file is being sent and so on. '-l 3' will, in
   addition, display advanced information like what event the Vita is
   sending over, and is for the curious minded. '-l 4' will log
   EVERYTHING including the raw USB traffic to and from the device.
   PLEASE use this option when you are filing a bug report and attach the
   output so the issue can be resolved quickly. Please note that more
   logging means OpenCMA will run slower.

smoke@smoke:~$ 
PS3Y2kvirus
Posts: 88
Joined: Fri Nov 23, 2012 10:37 pm

Re: OpenCMA/libVitaMTP 2.0: CMA on Linux and Windows

Post by PS3Y2kvirus »

Okay so i would type in the terminal opencma usb -p home/photo/pic.jpg i kind of get lost around there, not sure where i would specify where to send the pic to on the vita or if thats how it works?
PS VITA 3.01
PS3 CECHA01
Ball-N-Cup CFW-RETRO
SMOKE
Retired Mod
Posts: 3673
Joined: Tue Apr 17, 2012 10:00 pm
Location: USA
Contact:

Re: OpenCMA/libVitaMTP 2.0: CMA on Linux and Windows

Post by SMOKE »

PS3Y2kvirus wrote:Okay so i would type in the terminal opencma usb -p home/photo/pic.jpg i kind of get lost around there, not sure where i would specify where to send the pic to on the vita or if thats how it works?
Heres an example with what mine is:

Code: Select all

opencma usb -p /home/smoke/Pictures/ -v /home/smoke/Videos/ -m /home/smoke/Music/ -a /home/smoke/VitaMTP/ -u /home/smoke/VitaMTP/
Also, use the following xml for this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<update_data_list>
<region id="au">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
<region id="eu">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
<region id="jp">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
<region id="kr">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
<region id="mx">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
<region id="ru">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
<region id="tw">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
<region id="uk">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
<region id="us">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
</update_data_list>
Name it psp2-updatelist.xml
PS3Y2kvirus
Posts: 88
Joined: Fri Nov 23, 2012 10:37 pm

Re: OpenCMA/libVitaMTP 2.0: CMA on Linux and Windows

Post by PS3Y2kvirus »

Heres an example with what mine(smoke) is:

Code: Select all

opencma usb -p /home/smoke/Pictures/ -v /home/smoke/Videos/ -m /home/smoke/Music/ -a /home/smoke/VitaMTP/ -u /home/smoke/VitaMTP/
so the above code tells opencma the location(directories) of all media for transfor on the pc.

Code: Select all

opencma usb -p /home/psvita/Pictures/ -v /home/psvita/Videos/ -m /home/psvita/Music/ -a /home/psvita/VitaMTP/ -u /home/psvita/VitaMTP/
main: Cannot find path: /home/psvita/VitaMTP/
Made the VitaMTP folder for ps vita app but does not want to find it.

Also, use the following xml for this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<update_data_list>
<region id="au">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
<region id="eu">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
<region id="jp">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
<region id="kr">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
<region id="mx">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
<region id="ru">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
<region id="tw">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
<region id="uk">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
<region id="us">
<np level0_system_version="00.000.000" level1_system_version="00.000.000" level2_system_version="00.000.000" map="00.000.000" />
<version system_version="00.000.000" label="0.00">
</version>
</region>
</update_data_list>
Name it psp2-updatelist.xml[/quote]

type or copy and past all this code into a word document with stated name and save as Microsoft word 2003 XML format. correct? and put that file in the VitaMTP folder.
PS VITA 3.01
PS3 CECHA01
Ball-N-Cup CFW-RETRO
Xian Nox
Retired Mod
Posts: 2744
Joined: Fri Nov 05, 2010 5:27 pm
Location: Over the hills and far away

Re: OpenCMA/libVitaMTP 2.0: CMA on Linux and Windows

Post by Xian Nox »

PS3Y2kvirus wrote:

Code: Select all

opencma usb -p /home/psvita/Pictures/ -v /home/psvita/Videos/ -m /home/psvita/Music/ -a /home/psvita/VitaMTP/ -u /home/psvita/VitaMTP/
main: Cannot find path: /home/psvita/VitaMTP/
Made the VitaMTP folder for ps vita app but does not want to find it.
Your folder paths are invalid unless your username is psvita. If as I suspect you have a psvita folder in your home folder, and it has all these folders, try this:

Code: Select all

opencma usb -p ~/psvita/Pictures/ -v ~/psvita/Videos/ -m ~/psvita/Music -a ~/psvita/VitaMTP/ -u ~/psvita/VitaMTP/
Your folder structure will look like this:

Code: Select all

/
+-home/
  +-<username>/
    +-psvita/
      +-Pictures/
      +-Videos/
      +-Music/
      +-VitaMTP/
PS3Y2kvirus
Posts: 88
Joined: Fri Nov 23, 2012 10:37 pm

Re: OpenCMA/libVitaMTP 2.0: CMA on Linux and Windows

Post by PS3Y2kvirus »

[/code]
Made the VitaMTP folder for ps vita app but does not want to find it. [/quote]
Your folder paths are invalid unless your username is psvita. If as I suspect you have a psvita folder in your home folder, and it has all these folders, try this:

Code: Select all

opencma usb -p ~/psvita/Pictures/ -v ~/psvita/Videos/ -m ~/psvita/Music -a ~/psvita/VitaMTP/ -u ~/psvita/VitaMTP/
Your folder structure will look like this:

Code: Select all

/
+-home/
  +-<username>/
    +-psvita/
      +-Pictures/
      +-Videos/
      +-Music/
      +-VitaMTP/
[/quote]

Yeah It was the name of the folder Thanks It worked but it did not connect to ps vita and opencma crashed

Code: Select all

virus@virus-VAIO:~$ opencma usb -p ~/psvita/Pictures/ -v ~/psvita/Videos/ -m ~/psvita/Music -a ~/psvita/VitaMTP/ -u ~/psvita/VitaMTP/
OpenCMA 1.1 Beta
libVitaMTP Version: 2.1
Protocol Max Version: 01700010
Once connected, send SIGTSTP (usually Ctrl+Z) to refresh the database.
main: Waiting for Vita to connect...
Segmentation fault (core dumped)
virus@virus-VAIO:~$ 
PS VITA 3.01
PS3 CECHA01
Ball-N-Cup CFW-RETRO
Locked

Return to “Programming and Security”