Personal: Difference between revisions

From Lundman Wiki
No edit summary
No edit summary
Line 1: Line 1:
== Pioneer ==
Welcome to the FXP.One project.


My old amp (home cinema audio system) died, so this gave me a chance to buy a new set.


I bought the Pioneer MCS-434 - mainly as it was in the rough price bracket I was willing to
Before you start, this is not just another FTP/FXP client. It does not
pay for. (Ie, not too much).
work that way.


This appear to share firmware file with these models:


MCS-838
FXP.One consists of an engine, and
MCS-737
you would need (at least) one GUI to control it.
MCS-434
MCS-333
MCS-FS131
MCS-FS232


and the file itself is named BD-HTS5_Vxxx


==FXP.One engine==


I don't care that it has a bluray player in it (but had no models without in the store) but
The idea was to put all the hard code into an engine that is really
that it could do UPNP Media devices was a nice surprise.
easy to interface with. This has worked surprisingly well, in that you
can FTP/FXP entirely by using "telnet". This means writing a client,
which is essentially just a Display Shell, quite trivial. This
includes people who wants to just script clients, like by using perl,
python and so on.


I found it working rather well with llink. Some minor troubles.
This also means you do NOT have to run the engine on the same machine that you run the GUI client(s).  


* trickplay, ie, fast-forward and chapter skip did not work. llink was not sending the full DLNA flags required.
For example, if you had a stable host, perhaps even with a static IP
* ObjID has a maximum length of 64 chars. Even though the spec has no limit, clearly the Pioneer does. Use shorter paths.
making the credentials for authentication easier, you could run the
* Refreshing (adding, or removing contents from a directory) does not work right.  
engine there. Then connect to it by the client of your choice.


The last issue is the only one I was unable to fix. The Pioneer subscribes to events in UPNP to be notified when
You can disconnect this client (the engine will keep working if you do
ContainerID has been updated. llink informs it of that, and the Pioneer re-issues a listing, as you would expect.
not tell it to stop) and start a new (and possibly different) client
elsewhere, and resume control of your previous work.


But what it asks for in the listing is only 1 item. Ie, '''StartingIndex=1, RequestedCount=1'''. And no sorting.
But you can run the engine and client at the same time, and quitting
After that, it just stops. It is confusing as to what it expects to get here. I have sent a whole new record,
at the same time, making it appear like a normal FTP/FXP client.
as well as updated timestamps etc. But it also fails to refresh against Windows Media Center, so I think it
is just plain broken.  


I have attempted to contact Pioneer, and the developer of '''IPI/1.0 UPnP/1.0 DLNADOC/1.50''' but I have had no replies.


So, attempting to gain access myself.
'''If you are looking for a Windows binary, please download the bundle from the latest [[UFxp]] client'''


==Compiling and Install the engine==
  % git clone https://github.com/lundman/FXP.One
  % cd FXP.One/
  % ./autogen.sh    # In cygwin, if you have newline errors, try setting "set -o igncr"
  % ./configure
  % make
  % make install


=== Firmware ===
Now create your SSL keys


The first file of the firmware is quite straight forward:
  % openssl req -new -x509 -nodes -out lion.pem -keyout lion.pem


# binwalk MCS838_V00.38.bin
 
Create your .FXP.One folder and copy lion.pem into it
DECIMAL        HEX            DESCRIPTION
 
-------------------------------------------------------------------------------------------------------
  % mkdir .FXP.One && cp lion.pem .FXP.One/ 
66580          0x10414        Mediatek bootloader
 
119052          0x1D10C        Mediatek bootloader
Start the FXP.One engine
425000          0x67C28        U-Boot boot loader reference{
 
521792          0x7F640        uImage header, header size: 64 bytes, header CRC: 0xAC601819, created: Mon Oct 7 01:20:36 2013, image size: 1815444 bytes, Data Address: 0x3A00000, Entry Point: 0x3A00000, data CRC: 0xAD70A84B, OS: LinuxCPU: ARM, image type: OS Kernel Image, compression type: none, image name: ""
  % FXP.One
  539189          0x83A35        gzip compressed data, maximum compression, from Unix, last modified: Mon Oct  7 01:17:17 2013{file-epoch:1381076237}
 
(Please use gnuMake; which might be called make, gmake, gnumake etc on your system)
4265104        0x411490        Squashfs filesystem, little endian, version 4.0, compression:gzip, size: 65376434 bytes, {file-size:65376434} 1189 inodes, blocksize: 65536 bytes, created: Mon Oct  7 01:46:24 2013 {
 
  69772432        0x428A490      PNG image, 1920 x 1080, 8-bit/color RGB, non-interlaced
This should always compile the '''FXP.One engine'''. If ''configure'' can find the correct '''CDK''' library and '''ncurses''' on your system it will also compile the '''ncurses''' client '''FXP.cOne'''. Otherwise it will skip compiling this client.
69810320        0x4293890      PNG image, 720 x 480, 8-bit/color RGB, non-interlaced
 
69834368        0x4299680      U-Boot boot loader reference{
'''Openssl-devel'''If you see a error like this:  
  ''checking whether we need extra options to link OpenSSL... configure: error: Found linkable OpenSSL in , but it doesn't run, even with -R. Maybe specify another using --with-ssl-dir?''
 
You will need to openssl-devel for your system. On most Red Hat Variants it can be done with yum.
 
  yum -y install openssl-devel
 
 
If you want to run '''clomps-irc''' you will need libpcre and headers, so most likely the -dv version if there is one:
 
  apt-get install libpcre3-dev
 
 
 
 
'''''SSL Issues'''''
 
If your trying to connect from your client and get errors about ssl it probably means that they versions of ssl you have on your engine and your client are not compatible.
 
For example on the client end we have ssl version OpenSSL 0.9.8e-fips-rhel5 and on the server and OpenSSL 09.8k on another. There are many reasons why this will not work and many more why it should. In this case you will need to compile OpenSSL 0.9.8K on the server you wish to use FXP.Oned on and build FXP.Oned against that version of ssl. It the example below we will build openssl-0.9.8k in a local directory and compile FXP.Oned to use it.
 
To do this go to the openssl.org downloads page and download the version you want to use.
   
   
http://openssl.org/source/
wget http://openssl.org/source/openssl-0.9.8k.tar.gz
tar -xvzf openssl-1.0.0g.tar.gz
cd openssl-1.0.0g
./config -shared
make
Now go back to your FXP.Oned directory,
make clean
./configure LIBS=-ldl --with-ssl-dir=/home/erin/srcs/openssl-1.0.0g
make
make install
==Running the engine==
'''You will most likely need to create an SSL certificate for the engine since the default is only to accept secure connections.'''


Unpacking the squashfs, the bulk of the GUI code appears to be in;
Since the engine will be saving your remote FTP site information, as
well as any User/Passwords you chose on disk, you should consider
encrypting these files.


-rwxr-xr-x  1 lundman  admin  20197340 Oct  7 01:45 usr/local/bin/bdpprog
FXP.One engine will do this for you. When you start the engine, it
will as for a "Key". This is the Key that it will use to encrypt all
its data files. If you do not want encryption, just press return.


and it would appear that it has some sort of secret code, based on;
For the first time you run FXP.One, just make up whatever Key you
want.


g_onekey_secret_input
When you start the engine in future, you have to specify the correct
g_onekey_load_secret_input
Key or it will not be able to read your data files. (And you will not
g_onekey_sysinfo_secret_input
be able to login).
open_telnet
telnetd invoked ok
telnetd invoked failed


But IDA has not revealed anything that works. My best guess was
To start again, you need to delete all .FXP.One files, and the engine
will create these again.


g_onekey_load_secret_input DCD 0x20103
When the user file does not exist, the FXP.One engine will
automatically create a login as "admin" with password "admin".


Ie, 0 2 1 3, at the place where it prints the mcu and dsp versions. But that alone does not appear to work. Also checks for 0x03010200


I could roll my own firmware file, with telnetd running, and figure out whatever checksums they might have, but not that much time.
NOTE: If you edit .FXP.One.settings file, you can change the option
"ssl=1". By default it will only allow SSL connections. If you change
it to "ssl=0" you make it optional. This allows you to telnet to the
engine should you wish to check it out. Please read the
"engine/API.txt" for more information on the FXP.One protocol.


Preferably, Pioneer fixes the last issue and I don't have to do any of this :)
NOTE: Please be aware that all skiplist, movefirstlist and passlists
are separated by the "/" character.
That is, "fmovefirst=*.sfv/*.nfo".

Revision as of 00:11, 22 May 2015

Welcome to the FXP.One project.


Before you start, this is not just another FTP/FXP client. It does not work that way.


FXP.One consists of an engine, and you would need (at least) one GUI to control it.


FXP.One engine

The idea was to put all the hard code into an engine that is really easy to interface with. This has worked surprisingly well, in that you can FTP/FXP entirely by using "telnet". This means writing a client, which is essentially just a Display Shell, quite trivial. This includes people who wants to just script clients, like by using perl, python and so on.

This also means you do NOT have to run the engine on the same machine that you run the GUI client(s).

For example, if you had a stable host, perhaps even with a static IP making the credentials for authentication easier, you could run the engine there. Then connect to it by the client of your choice.

You can disconnect this client (the engine will keep working if you do not tell it to stop) and start a new (and possibly different) client elsewhere, and resume control of your previous work.

But you can run the engine and client at the same time, and quitting at the same time, making it appear like a normal FTP/FXP client.


If you are looking for a Windows binary, please download the bundle from the latest UFxp client

Compiling and Install the engine

 % git clone https://github.com/lundman/FXP.One
 % cd FXP.One/
 % ./autogen.sh    # In cygwin, if you have newline errors, try setting "set -o igncr"
 % ./configure
 % make 
 % make install

Now create your SSL keys

 % openssl req -new -x509 -nodes -out lion.pem -keyout lion.pem


Create your .FXP.One folder and copy lion.pem into it

 % mkdir .FXP.One && cp lion.pem .FXP.One/   

Start the FXP.One engine

  % FXP.One 

(Please use gnuMake; which might be called make, gmake, gnumake etc on your system)

This should always compile the FXP.One engine. If configure can find the correct CDK library and ncurses on your system it will also compile the ncurses client FXP.cOne. Otherwise it will skip compiling this client.

Openssl-develIf you see a error like this:

checking whether we need extra options to link OpenSSL... configure: error: Found linkable OpenSSL in , but it doesn't run, even with -R.  Maybe specify another using --with-ssl-dir? 

You will need to openssl-devel for your system. On most Red Hat Variants it can be done with yum.

yum -y install openssl-devel


If you want to run clomps-irc you will need libpcre and headers, so most likely the -dv version if there is one:

apt-get install libpcre3-dev



SSL Issues

If your trying to connect from your client and get errors about ssl it probably means that they versions of ssl you have on your engine and your client are not compatible.

For example on the client end we have ssl version OpenSSL 0.9.8e-fips-rhel5 and on the server and OpenSSL 09.8k on another. There are many reasons why this will not work and many more why it should. In this case you will need to compile OpenSSL 0.9.8K on the server you wish to use FXP.Oned on and build FXP.Oned against that version of ssl. It the example below we will build openssl-0.9.8k in a local directory and compile FXP.Oned to use it.

To do this go to the openssl.org downloads page and download the version you want to use.

http://openssl.org/source/
wget http://openssl.org/source/openssl-0.9.8k.tar.gz
tar -xvzf openssl-1.0.0g.tar.gz 
cd openssl-1.0.0g 
./config -shared
make 

Now go back to your FXP.Oned directory,

make clean 
./configure LIBS=-ldl --with-ssl-dir=/home/erin/srcs/openssl-1.0.0g
make 
make install

Running the engine

You will most likely need to create an SSL certificate for the engine since the default is only to accept secure connections.


Since the engine will be saving your remote FTP site information, as well as any User/Passwords you chose on disk, you should consider encrypting these files.

FXP.One engine will do this for you. When you start the engine, it will as for a "Key". This is the Key that it will use to encrypt all its data files. If you do not want encryption, just press return.

For the first time you run FXP.One, just make up whatever Key you want.

When you start the engine in future, you have to specify the correct Key or it will not be able to read your data files. (And you will not be able to login).

To start again, you need to delete all .FXP.One files, and the engine will create these again.

When the user file does not exist, the FXP.One engine will automatically create a login as "admin" with password "admin".


NOTE: If you edit .FXP.One.settings file, you can change the option "ssl=1". By default it will only allow SSL connections. If you change it to "ssl=0" you make it optional. This allows you to telnet to the engine should you wish to check it out. Please read the "engine/API.txt" for more information on the FXP.One protocol.

NOTE: Please be aware that all skiplist, movefirstlist and passlists are separated by the "/" character. That is, "fmovefirst=*.sfv/*.nfo".