LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-09-2011, 08:55 AM   #1
thosecars82
LQ Newbie
 
Registered: Feb 2011
Posts: 13

Rep: Reputation: 0
send file with FTP from small Linux version


Hello
I have this problem.
I need to do this:
I got a small version of Linux installed in some small devices. These devices come from the provider with this small version of Linux installed.

This devices should send data to some other machine in the internet. I have tested wput for this purpose with a PC which has an Ubuntu version 10 and it works fine. However, when I try wput in the small device, I get an error. It seems that the wput might need some libraries to work with the small version of Linux installed in the small device.

The fact of using wput or not is optional. I just need being able to send files through ftp with this small version of Linux.

The thing is that to be able to run wput in this small version of Linux, it seems that many of the needed libraries were missing. So what I did was just install all the needed libraries. But still the wput program fails in its first line.

Could please anyone help me with any idea?

Thanks

Last edited by thosecars82; 04-06-2011 at 09:53 AM.
 
Old 02-09-2011, 03:54 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
It would be a lot more helpful if you posted a copy of the exact error message(s), as well as a copy of the command(s) you used to generate the error(s). Without at least that much information, we could really only guess at what the problem might be.

--- rod.
 
Old 02-11-2011, 02:15 AM   #3
thosecars82
LQ Newbie
 
Registered: Feb 2011
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by theNbomr View Post
It would be a lot more helpful if you posted a copy of the exact error message(s), as well as a copy of the command(s) you used to generate the error(s). Without at least that much information, we could really only guess at what the problem might be.

--- rod.
$ wput –h

/usr/bin/wput: line 1: syntax error: "(" unexpected

Last edited by thosecars82; 04-06-2011 at 09:53 AM.
 
Old 02-11-2011, 02:18 AM   #4
thosecars82
LQ Newbie
 
Registered: Feb 2011
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by theNbomr View Post
It would be a lot more helpful if you posted a copy of the exact error message(s), as well as a copy of the command(s) you used to generate the error(s). Without at least that much information, we could really only guess at what the problem might be.

--- rod.

The error get is this:

$ wput –h

/usr/bin/wput: line 1: syntax error: "(" unexpected


According to the proc/vesion, the installed Linux is:
Linux version 2.6.27 (build@buffy.sorcerers.fi) (gcc version 4.2.4) #1 Thu Apr 16 23:21:06 EEST 2009)

Thanks

Last edited by thosecars82; 04-06-2011 at 09:53 AM.
 
Old 02-11-2011, 08:36 AM   #5
orgcandman
Member
 
Registered: May 2002
Location: new hampshire
Distribution: Fedora, RHEL
Posts: 600

Rep: Reputation: 110Reputation: 110
what hardware device is this ?

what does /etc/motd say?
is there an /etc/*-release file?

That's a pretty old kernel, and vulnerable to quite a few issues (remote and local). If the distribution has similar age issues, I think my first order of business would be to upgrade it.

Regardless, if ftp is on the box, most versions can be scripted (heck, cat some-ftp-command-file | ftp host would probably work fine).

But please see my first concerns on distribution age.
 
Old 02-11-2011, 09:24 AM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
You haven't said what CPU your 'small devices' use, but the error message you displayed is not atypical of binaries created for other CPUs. Are you sure the runtime binaries and and libraries were built for the CPU your small devices are using? What exactly did you do to install the libraries that you think are required? How did you conclude from the error message that there is a problem with any libraries?

--- rod.
 
Old 02-11-2011, 10:08 AM   #7
thosecars82
LQ Newbie
 
Registered: Feb 2011
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by orgcandman View Post
what hardware device is this ?

what does /etc/motd say?
is there an /etc/*-release file?

That's a pretty old kernel, and vulnerable to quite a few issues (remote and local). If the distribution has similar age issues, I think my first order of business would be to upgrade it.

Regardless, if ftp is on the box, most versions can be scripted (heck, cat some-ftp-command-file | ftp host would probably work fine).

But please see my first concerns on distribution age.
(Linux version 2.6.27 (build@buffy.sorcerers.fi) (gcc version 4.2.4) #1 Thu Apr 16 23:21:06 EEST 2009)

As for upgrading there is this problem. This device has only 60MB of storage available. Moreover, I still do not know how to make a reliable backup of this device that I could recover reliably in case I broke it when messing around with it.

I know that the device has a usb port so may be that port might be used to insert a pen drive and do a backup.
The manufacturer of this device is Bluegiga
The device has 21 connections without external antennas (its antennas are internal antennas)
Thanks

Last edited by thosecars82; 02-11-2011 at 10:20 AM.
 
Old 02-11-2011, 10:35 AM   #8
thosecars82
LQ Newbie
 
Registered: Feb 2011
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by theNbomr View Post
You haven't said what CPU your 'small devices' use, but the error message you displayed is not atypical of binaries created for other CPUs. Are you sure the runtime binaries and and libraries were built for the CPU your small devices are using? What exactly did you do to install the libraries that you think are required? How did you conclude from the error message that there is a problem with any libraries?

--- rod.
I do not know whether there is a problem is the libraries, this is just a guess. I installed these libraries because this wput did not work properly. It asked for some library and when I tried to install that library then it said that I needed another library to be able to install the first library and so on. That way, I started by installing the last library, that is to say, the library that had no dependencies whatsoever.

Is this information I just said any useful for giving any hint about this problem?
Thanks

Last edited by thosecars82; 04-06-2011 at 09:53 AM.
 
Old 02-11-2011, 11:12 AM   #9
orgcandman
Member
 
Registered: May 2002
Location: new hampshire
Distribution: Fedora, RHEL
Posts: 600

Rep: Reputation: 110Reputation: 110
what would be far more helpful:

uname -a
file wput

I'm guessing you're using the bluegiga access server, but I've never used one of them. Regardless, BlueGiga's software vendor seems to be sorcerers.fi and you may need to contact them for more information.
 
Old 02-11-2011, 11:15 AM   #10
thosecars82
LQ Newbie
 
Registered: Feb 2011
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by orgcandman View Post
what would be far more helpful:

uname -a
file wput

I'm guessing you're using the bluegiga access server, but I've never used one of them. Regardless, BlueGiga's software vendor seems to be sorcerers.fi and you may need to contact them for more information.
Sorry, what did you mean with
"uname -a
file wput
"?

Should I type "uname -a
file wput
" anywhere?
Thanks

Last edited by thosecars82; 04-06-2011 at 09:54 AM.
 
Old 02-11-2011, 11:29 AM   #11
orgcandman
Member
 
Registered: May 2002
Location: new hampshire
Distribution: Fedora, RHEL
Posts: 600

Rep: Reputation: 110Reputation: 110
Most definitely you are in way over your head. I'm hoping you're not being paid to develop whatever it is you're developing. Regardless, there is no quick solution for what you're trying to do.

I've looked into wput, and you'll need to cross-compile this to whatever architecture the bluegiga access server is (I'm guessing either mips or arm). Regardless, there's a whole slough of information that you need to become familiar with, including not only linux basics, but the basics of computers as well (ie: why you can't take a binary from your PC and run it on random hardware X).

I'm hoping that you'll get the following books and read and understand them:

Structured Computer Organization (4th ed. or later) by Andrew S. Tanenbaum
Building Embedded Linux Systems by Yahgmour
Unix Shell Programming
 
Old 02-11-2011, 11:57 AM   #12
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
It doesn't sound like you understand that different CPU types require different types of binaries and libraries. Are you certain that the libraries and binaries you are trying to run on the Bluegiga boxen are built for that CPU/kernel/device? What is the origin of them? Did you build them? Copy them (from...)?

To help us understand more about your system, you need to run the shell commands (on the Bluegiga box)
Code:
uname -a
# ...and...
file wput
Report the results here.

The former will tell us about the host system, and the latter will tell us about the nature of the wput runtime binary.

--- rod.
 
Old 02-15-2011, 03:50 AM   #13
thosecars82
LQ Newbie
 
Registered: Feb 2011
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by theNbomr View Post
It doesn't sound like you understand that different CPU types require different types of binaries and libraries. Are you certain that the libraries and binaries you are trying to run on the Bluegiga boxen are built for that CPU/kernel/device? What is the origin of them? Did you build them? Copy them (from...)?

To help us understand more about your system, you need to run the shell commands (on the Bluegiga box)
Code:
uname -a
# ...and...
file wput
Report the results here.

The former will tell us about the host system, and the latter will tell us about the nature of the wput runtime binary.

--- rod.
The putty client returns this:

login as: root
root@172.26.0.55's password:
[root@wrap /root]$ uname -a
Linux wrap.localdomain 2.6.27 #1 Thu Apr 16 23:21:06 EEST 2009 armv4tl unknown
[root@wrap /root]$ file wput
-ash: file: not found

Why the file wput command is not recognized?

What could I do now?


How can I show the current local path in ssh?
When I try lpwd, I get this error:
-ash: lpwd: not found

How can I upload with put in ssh? When I try to use put I get this error:
-ash: put: not found


Thanks

Last edited by thosecars82; 04-06-2011 at 09:54 AM.
 
Old 02-15-2011, 07:20 AM   #14
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,466

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
How did you install wput? From the error message you got, it doesn't look like it's simply missing a library. It looks more like it's for a different platform or something. The error message "-ash: file: not found" means that the computer does not have the file command installed.

I would first try to check if there are some options for ftp installed on the computer. Have you tried the command "ftp"? If it's not installed, maybe it has "curl"? "wput" is not very common because commands like curl do the same and more. If you have curl, you can read this guide on how to use it for ftp uploads.

http://www.hyperorg.com/blogger/2008...-ftp-via-curl/
 
Old 02-15-2011, 07:33 AM   #15
thosecars82
LQ Newbie
 
Registered: Feb 2011
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Guttorm View Post
How did you install wput? From the error message you got, it doesn't look like it's simply missing a library. It looks more like it's for a different platform or something. The error message "-ash: file: not found" means that the computer does not have the file command installed.

I would first try to check if there are some options for ftp installed on the computer. Have you tried the command "ftp"? If it's not installed, maybe it has "curl"? "wput" is not very common because commands like curl do the same and more. If you have curl, you can read this guide on how to use it for ftp uploads.

http://www.hyperorg.com/blogger/2008...-ftp-via-curl/
I just checked that I have no ftp or curl available because I get

-ash: curl: not found
-ash: ftp: not found

I tried to use wget to install vsftpd-2.3.3.tar.gz in the device but I got this error message:
wget: bad response to RETR: 501 Syntax error

Any idea?

Thanks

Last edited by thosecars82; 04-06-2011 at 09:54 AM.
 
  


Reply

Tags
bluegiga, embedded


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Damn Small Linux releases version 3.1 LXer Syndicated Linux News 0 12-01-2006 06:21 AM
ftp in damn small linux Clarence27 Linux - Newbie 1 08-09-2006 04:21 AM
ftp-control "226 File send OK" sent too early spokie99 Linux - General 1 06-29-2005 10:10 AM
cron job to send file via ftp every 1 hour mcalizo Linux - Newbie 1 07-14-2004 03:50 AM
Small linux version tgardner Linux - General 4 03-23-2003 05:00 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration