Click here to go to the forum index Click here for the home page
 
Author Message

<  Computer connections  ~  ftpd-topfield 0.7.7n

Page 4 of 4
Goto page Previous  1, 2, 3, 4
mstombs
Posted: Fri Mar 25, 2011 12:49 am Reply with quote
Frequent contributor Joined: 31 Dec 2006 Posts: 938
I compiled 0.7.7p on my nslu2 as before - had to first compile libusb.a and patch config.mak etc.

It runs, I can connect and get directory listings

Code:
23:23:33   Status:   Connecting to 192.168.0.3:2121...
23:23:33   Status:   Connection established, waiting for welcome message...
23:23:33   Response:   220 SLUG FTP server (Topfield ftpd 0.7.7p) ready.
23:23:33   Command:   USER anon
23:23:33   Response:   331 Guest login ok, type your name as password.
23:23:33   Command:   PASS ****
23:23:33   Response:   230 Guest login ok, access restrictions apply.
23:23:33   Command:   SYST
23:23:33   Response:   215 UNIX Type: L8 Version: Linux 2.4.22-xfs
23:23:33   Command:   FEAT
23:23:33   Response:   500 'FEAT': command not understood.
23:23:33   Status:   Connected
23:23:33   Status:   Retrieving directory listing...
23:23:33   Command:   PWD
23:23:33   Response:   257 "/" is current directory.
23:23:33   Command:   TYPE I
23:23:33   Response:   200 Type set to I.
23:23:33   Command:   PASV
23:23:33   Response:   227 Entering Passive Mode (192,168,0,3,17,95)
23:23:33   Command:   LIST
23:23:33   Response:   150 Opening BINARY mode data connection for 'file list'.
23:23:33   Response:   226 Transfer complete.
23:23:33   Status:   Directory listing successful
23:23:36   Status:   Retrieving directory listing...
23:23:36   Command:   CWD ProgramFiles
23:23:36   Response:   250 CWD command successful.
23:23:36   Command:   PWD
23:23:36   Response:   257 "/ProgramFiles" is current directory.
23:23:36   Command:   PASV
23:23:36   Response:   227 Entering Passive Mode (192,168,0,3,17,96)
23:23:36   Command:   LIST
23:23:36   Response:   150 Opening BINARY mode data connection for 'file list'.
23:23:36   Response:   226 Transfer complete.
23:23:36   Status:   Directory listing successful
23:24:21   Status:   Retrieving directory listing...
23:24:21   Command:   CWD /DataFiles
23:24:21   Response:   250 CWD command successful.
23:24:21   Command:   PWD
23:24:21   Response:   257 "/DataFiles" is current directory.
23:24:21   Command:   PASV
23:24:21   Response:   227 Entering Passive Mode (192,168,0,3,17,97)
23:24:21   Command:   LIST
23:24:21   Response:   150 Opening BINARY mode data connection for 'file list'.
23:24:21   Response:   226 Transfer complete.
23:24:21   Status:   Directory listing successful


but, I think this is the same as before, I can't transfer files:-

Code:
23:24:36   Status:   Connecting to 192.168.0.3:2121...
23:24:36   Status:   Connection established, waiting for welcome message...
23:24:36   Response:   220 SLUG FTP server (Topfield ftpd 0.7.7p) ready.
23:24:36   Command:   USER anon
23:24:36   Response:   331 Guest login ok, type your name as password.
23:24:36   Command:   PASS ****
23:24:36   Response:   230 Guest login ok, access restrictions apply.
23:24:36   Status:   Connected
23:24:36   Status:   Starting download of /DataFiles/Engineering Ancient Egypt.rec
23:24:36   Command:   CWD /DataFiles
23:24:36   Response:   550 Failed to connect to Topfield PVR
23:24:36   Command:   SIZE /DataFiles/Engineering Ancient Egypt.rec
23:24:36   Response:   550 Failed to connect to Topfield PVR
23:24:36   Command:   MDTM /DataFiles/Engineering Ancient Egypt.rec
23:24:36   Response:   550 Failed to connect to Topfield PVR
23:24:36   Command:   TYPE I
23:24:36   Response:   200 Type set to I.
23:24:36   Command:   PASV
23:24:36   Response:   227 Entering Passive Mode (192,168,0,3,17,98)
23:24:36   Command:   RETR /DataFiles/Engineering Ancient Egypt.rec
23:24:36   Response:   550 Failed to connect to Topfield PVR
23:24:36   Error:   Critical file transfer error


So I think this is the bulk mode not working. 0.7.7 from ipkg doesn't use libusb and does work fine - with one Toppy!

Will hook up OpenWRT nslu2 or Tomato RT-N16 to try different Linux versions incase that is the issue.

[PROGRESS UPDATE]

No need to compile libusb.a, 0.7.7p compiles cleanly on nslu2 with this:-

Code:
export CC=gcc
export FORCELIBUSBLOC=1
export LIBUSBLOC=/opt
make
strip -s ftpd


and this seems to work fine ...

unslung slug doesn't have ldd, but this does same:-

Code:
# /lib/ld-linux.so.2 --list ./ftpd
        libusb-0.1.so.4 => /opt/lib/libusb-0.1.so.4 (0x40001000)
        libc.so.6 => /lib/libc.so.6 (0x40010000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)
# ls -laF ftpd
-rwx------    1 root     root        69716 Mar 25 00:38 ftpd*


Yes unslung slug uses libc, not uclibc
View user's profile Send private message TF5800
birdman
Posted: Fri Mar 25, 2011 2:54 am Reply with quote
Frequent contributor Joined: 13 Dec 2006 Posts: 1765 Location: Hitchin, HERTS Tx: Sandy Heath
mstombs wrote:
I compiled 0.7.7p on my nslu2 as before - had to first compile libusb.a and patch config.mak etc.
Why did you need to edit config.mak?
Quote:
but, I think this is the same as before, I can't transfer files:-
Odd, as...
Quote:
So I think this is the bulk mode not working. 0.7.7 from ipkg doesn't use libusb and does work fine - with one Toppy!
...0.7.7p only uses libusb to actually scan the USB bus - the transfer code is unchanged (except that some potential symbol clashes have been resolved).
Quote:

No need to compile libusb.a, 0.7.7p compiles cleanly on nslu2 with this:-

Code:
export CC=gcc
export FORCELIBUSBLOC=1
export LIBUSBLOC=/opt
make
strip -s ftpd


and this seems to work fine ...
So using a dynamic libusb works, but using a static version of it fails to do transfers - despite the fact that the transfer code is the same for both.
Which version do you have installed, and which version did you compile the static libusb.a from?

Also, FORCELIBUSBLOC is meant to be the location that you want to set in the resultant executable for where to look (first) for a dynamic libusb - it's not a flag. This allows you to build against an as-yet uninstalled libusb.
So if you ever run ftpd-topfield from a location that has a sub-directory named "1" containing either a libusb-0.1.so.4 or libc.so.6 file you might have a problem. You don't need to use it if your libusb is in a standard system location (which yours is).

_________________

Toppy: TF5800PVR/250 - Black, now 1TB WD10EURX
F/W: MS6 Recommended F/W 12/9/2009 -FmVrXp+BmC0CbFsIPsUUuWfZXl,
Loader: C5.14, Hardware: 1.01
TAPs: SecCache (UK) v0.4; EPG2MEI v0.96; FontManager 1.0d; QuickJump 1.71; MhegOnOff(Now1) A3; EIT Sub v0.6; MyStuff 6.6
USB connected: SheevaPlug with Debian wheezy
Sig mostly from MyInfo on 26/10/09
View user's profile Send private message
mstombs
Posted: Fri Mar 25, 2011 9:58 am Reply with quote
Frequent contributor Joined: 31 Dec 2006 Posts: 938
I was just using config.mak as a way to set those vars, thinking it could be updated with nslu2 detection as per system "Darwin", but nslu2 just identifies as "Linux" so that's not a very useful test! I was using the FORCELIBUSBLOC just to set the rpath, but you are right this isn't needed, so all that is really needed on an unslung slug is

Code:
make CC=gcc LIBUSBLOC=/opt


I was compiling libusb-0.1.12 which is same version I think from nslu2 sources, but presumably got some flag wrong...

LIBUSBLOC is needed else it doesn't find libusb.so, I don't know why "-L/opt/lib" isn't set by default on my system...

While the dynamic linked binary runs and now works manually with Filezilla, it does not behave the same when called recursively from php scripts (the MWI archive function downloads 1k of all recs to be able to read the header - lots of 550 responses I guess. Need to investigate further, must be todo with change of usb locks, or time to re-establish a connection? May be my apps i.e. rt2mei (which still uses old puppy?) or auto archive function jumping in - need to investigate further.
View user's profile Send private message TF5800
birdman
Posted: Sat Mar 26, 2011 10:36 pm Reply with quote
Frequent contributor Joined: 13 Dec 2006 Posts: 1765 Location: Hitchin, HERTS Tx: Sandy Heath
mstombs wrote:
While the dynamic linked binary runs and now works manually with Filezilla, it does not behave the same when called recursively from php scripts
Do you mean recursively, or repeatedly? Recursively could be a problem, as you might still have one open when you make the second call - and that won't work. It would/might have worked with the previous version that created a puppy "lock" file, but given that it should always be possible to fix the client not to make a call when it already has one open I removed this, as it can't work as is for multiple toppies.

_________________

Toppy: TF5800PVR/250 - Black, now 1TB WD10EURX
F/W: MS6 Recommended F/W 12/9/2009 -FmVrXp+BmC0CbFsIPsUUuWfZXl,
Loader: C5.14, Hardware: 1.01
TAPs: SecCache (UK) v0.4; EPG2MEI v0.96; FontManager 1.0d; QuickJump 1.71; MhegOnOff(Now1) A3; EIT Sub v0.6; MyStuff 6.6
USB connected: SheevaPlug with Debian wheezy
Sig mostly from MyInfo on 26/10/09
View user's profile Send private message
mstombs
Posted: Sun Mar 27, 2011 11:25 am Reply with quote
Frequent contributor Joined: 31 Dec 2006 Posts: 938
It should be repeatedly, but maybe it is recursively, and that is the problem, in fact I don't see why it worked before!.

The php code uses php function ftp_rawlist to get the directory contents, then uses fopen repeatedly with an ftp:// file address. I'll try inserting an ftp_close inbetween.

Update:- the "p" binaries for 64-bit Linux work fine (except in debug mode - get the getpeername error as per http://forum.toppy.org.uk/forum/viewtopic.php?p=141067) - also compiles easily - using libusb installed via the package manager synaptic on Ubuntu. The old dev scan version does not connect to Toppy - but maybe that's due to the old problems discussed above - anyhow not a problem with the libusb versions.

Have same issue as with slug with recursive code - needs a rewrite to separate php ftp requests and OS fopen - wasn't as easy as I thought!
View user's profile Send private message TF5800
Fraser67
Posted: Thu Mar 31, 2011 8:37 pm Reply with quote
Regular contributor Joined: 02 Sep 2005 Posts: 42
I have uclibc-opt - 0.9.28-13 - micro C library for embedded Linux systems
installed. Is that the correct version? However the statical build ftpd version still throws the following error

Toppy-DD-WRT FTP server (Topfield ftpd 0.7.7p) ready.
ftpd-topfield[16881]: command: USER anonymous
ftpd-topfield: can't resolve symbol '__ctype_b_loc'

_________________
TF5800, IA On, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPePfUUuUx
TAPs: TAP Commander 1.31; MyStuff 6.3; EPG2MEI v0.96; Extend v1.7; Font Manager 1.0d; SecCache (UK) v0.4; EIT Sub (Game) v0.6; MyInfo B5.5; Jukebox 2.1d;
Sig generated by MyInfo on 2/2/11
View user's profile Send private message
birdman
Posted: Fri Apr 01, 2011 12:38 am Reply with quote
Frequent contributor Joined: 13 Dec 2006 Posts: 1765 Location: Hitchin, HERTS Tx: Sandy Heath
Fraser67 wrote:
I have uclibc-opt - 0.9.28-13 - micro C library for embedded Linux systems
installed. Is that the correct version?
Well - it's the version which is on the system on which it was built
Quote:
However the statical build ftpd version still throws the following error
There is now a full-static version there, which shouldn't have this problem.

_________________

Toppy: TF5800PVR/250 - Black, now 1TB WD10EURX
F/W: MS6 Recommended F/W 12/9/2009 -FmVrXp+BmC0CbFsIPsUUuWfZXl,
Loader: C5.14, Hardware: 1.01
TAPs: SecCache (UK) v0.4; EPG2MEI v0.96; FontManager 1.0d; QuickJump 1.71; MhegOnOff(Now1) A3; EIT Sub v0.6; MyStuff 6.6
USB connected: SheevaPlug with Debian wheezy
Sig mostly from MyInfo on 26/10/09
View user's profile Send private message
Fraser67
Posted: Fri Apr 01, 2011 8:53 pm Reply with quote
Regular contributor Joined: 02 Sep 2005 Posts: 42
The full static version does work on my Asus Wl500W with DD-WRT. Thanks.

_________________
TF5800, IA On, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPePfUUuUx
TAPs: TAP Commander 1.31; MyStuff 6.3; EPG2MEI v0.96; Extend v1.7; Font Manager 1.0d; SecCache (UK) v0.4; EIT Sub (Game) v0.6; MyInfo B5.5; Jukebox 2.1d;
Sig generated by MyInfo on 2/2/11
View user's profile Send private message

Display posts from previous:  

All times are GMT + 1 Hour
Page 4 of 4
Goto page Previous  1, 2, 3, 4

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum