Hi all, I have a problem:
I need to send a short file to a FTP server using a BL1800 board connected to a
Siemens MC35i GPRS modem.
The BL1800 board is connected to the MC35i through serial port C, the connection
type is (obviously) PPP.
My program (written in DynamicC 9.62) contains a first section that opens the
PPP connection, and a second section that can send, pressing a key into the
stdio window, a e-mail or a file to a FTP server.
When the program start, the PPP connection is correctly opened ('PPP: i/f 0
UP'), and I can acquire and print on the stdio window the IP address the
ISP assigned me. I can also ping from a PC connected to Internet this IP address
and the four requests are successfull.
Now, if I hit the 'e' key to send an e-mail, the e-mail
- is correctly sent if the IP address of the SMTP server (smtp.fastwebnet.it) is
in dot notation (85.18.95.132),
- if the IP address is in form of name (smtp.fastwebnet.it), the final message
is 'SMTP: Error resolving server (fffe)'; probably I have problems
with a DNS server, but I don't know why (the call to the function ifconfig(
) seems to be exact).
Hitting the 's' key to send a file to the FTP server, the exchange of
messages with the server is correct until the password request: the last correct
message I receive is 'FTPC: got '331 Password required for
'; then, the program send the password ('FTPC: sending PASS
') [obviuosly, and correspond to a correct
username and password for the FTP server connected].
At this time, start an exchange of messages between the program and the server
('PPP: got packet...', 'PPPLINK: sendpacket totlen=...'):
the password sent by the program is not acknowledged by the server, and the
program start to continuously send the password until the connection timeout
(300 seconds) expires.
No messages from the FTP_CLIENT.lib ('FTPC: ...') are now received;
the only message of this type received, after some time, is 'FTPC: got
'421 No transfer timeout (300 seconds): closing control
connection'', and the program ends.
Note that another program using DHCP instead of PPP (that is, with the second
section identical but the first section managing DHCP, and connected to our LAN)
(obviously running on a different board, with the ethernet interface [OP7200])
run without problems; it sends e-mail (also with IP address in form of name) to
the same mail address and files to the same FTP server (after the password
dispatch, I can see the message 'FTPC: got '230 User logged
in'' and so on).
Note that the same MC35i connected to a laptop and driven by a FTP client (a
LabVIEW program using Windows RAS) correctly send files to the same FTP
server.
Why this happens ?
- if the DHCP program correctly sends files to server, the FTP section must be
correct;
- also the PPP program runs correctly until the password dispatch, and the
communication remains still active, because I receive the closing connection
message '421 No transfer...'; simply the server, after requesting the
password, don't accept it;
- You know some reason because the FTP server accept my password and log me in
when I connect through ethernet, but refuse the password and me when i connect
through PPP ?
- Is possible that in PPP mode some timeout or some buffer are too short ? I
know for example that the maximum lenght of the FTP username and password
default to 16, and in my program I have added '#define FTP_MAX_NAMELEN
32' because my password is 17 characters long and during the first tests I
got errors (but clearly explained).
Thanks in advance
Giampaolo
Rabbit problems with FTP on PPP
Started by ●October 30, 2011
Reply by ●October 30, 20112011-10-30
Ciao Giampaolo,
Try a different modem, e.g. Telit. Sounds strange, but that'll do it.
Regards,
Francesco
Sent from my BlackBerry wireless device
-----Original Message-----
From: g...@fastwebnet.it
Sender: r...
Date: Tue, 18 Oct 2011 09:27:42
To:
Reply-To: r...
Subject: [rabbit-semi] Rabbit problems with FTP on PPP
Hi all, I have a problem:
I need to send a short file to a FTP server using a BL1800 board connected to a Siemens MC35i GPRS modem.
The BL1800 board is connected to the MC35i through serial port C, the connection type is (obviously) PPP.
My program (written in DynamicC 9.62) contains a first section that opens the PPP connection, and a second section that can send, pressing a key into the stdio window, a e-mail or a file to a FTP server.
When the program start, the PPP connection is correctly opened ('PPP: i/f 0 UP'), and I can acquire and print on the stdio window the IP address the ISP assigned me. I can also ping from a PC connected to Internet this IP address and the four requests are successfull.
Now, if I hit the 'e' key to send an e-mail, the e-mail
- is correctly sent if the IP address of the SMTP server (smtp.fastwebnet.it) is in dot notation (85.18.95.132),
- if the IP address is in form of name (smtp.fastwebnet.it), the final message is 'SMTP: Error resolving server (fffe)'; probably I have problems with a DNS server, but I don't know why (the call to the function ifconfig( ) seems to be exact).
Hitting the 's' key to send a file to the FTP server, the exchange of messages with the server is correct until the password request: the last correct message I receive is 'FTPC: got '331 Password required for '; then, the program send the password ('FTPC: sending PASS ') [obviuosly, and correspond to a correct username and password for the FTP server connected].
At this time, start an exchange of messages between the program and the server ('PPP: got packet...', 'PPPLINK: sendpacket totlen=...'): the password sent by the program is not acknowledged by the server, and the program start to continuously send the password until the connection timeout (300 seconds) expires.
No messages from the FTP_CLIENT.lib ('FTPC: ...') are now received; the only message of this type received, after some time, is 'FTPC: got '421 No transfer timeout (300 seconds): closing control connection'', and the program ends.
Note that another program using DHCP instead of PPP (that is, with the second section identical but the first section managing DHCP, and connected to our LAN) (obviously running on a different board, with the ethernet interface [OP7200]) run without problems; it sends e-mail (also with IP address in form of name) to the same mail address and files to the same FTP server (after the password dispatch, I can see the message 'FTPC: got '230 User logged in'' and so on).
Note that the same MC35i connected to a laptop and driven by a FTP client (a LabVIEW program using Windows RAS) correctly send files to the same FTP server.
Why this happens ?
- if the DHCP program correctly sends files to server, the FTP section must be correct;
- also the PPP program runs correctly until the password dispatch, and the communication remains still active, because I receive the closing connection message '421 No transfer...'; simply the server, after requesting the password, don't accept it;
- You know some reason because the FTP server accept my password and log me in when I connect through ethernet, but refuse the password and me when i connect through PPP ?
- Is possible that in PPP mode some timeout or some buffer are too short ? I know for example that the maximum lenght of the FTP username and password default to 16, and in my program I have added '#define FTP_MAX_NAMELEN 32' because my password is 17 characters long and during the first tests I got errors (but clearly explained).
Thanks in advance
Giampaolo
Try a different modem, e.g. Telit. Sounds strange, but that'll do it.
Regards,
Francesco
Sent from my BlackBerry wireless device
-----Original Message-----
From: g...@fastwebnet.it
Sender: r...
Date: Tue, 18 Oct 2011 09:27:42
To:
Reply-To: r...
Subject: [rabbit-semi] Rabbit problems with FTP on PPP
Hi all, I have a problem:
I need to send a short file to a FTP server using a BL1800 board connected to a Siemens MC35i GPRS modem.
The BL1800 board is connected to the MC35i through serial port C, the connection type is (obviously) PPP.
My program (written in DynamicC 9.62) contains a first section that opens the PPP connection, and a second section that can send, pressing a key into the stdio window, a e-mail or a file to a FTP server.
When the program start, the PPP connection is correctly opened ('PPP: i/f 0 UP'), and I can acquire and print on the stdio window the IP address the ISP assigned me. I can also ping from a PC connected to Internet this IP address and the four requests are successfull.
Now, if I hit the 'e' key to send an e-mail, the e-mail
- is correctly sent if the IP address of the SMTP server (smtp.fastwebnet.it) is in dot notation (85.18.95.132),
- if the IP address is in form of name (smtp.fastwebnet.it), the final message is 'SMTP: Error resolving server (fffe)'; probably I have problems with a DNS server, but I don't know why (the call to the function ifconfig( ) seems to be exact).
Hitting the 's' key to send a file to the FTP server, the exchange of messages with the server is correct until the password request: the last correct message I receive is 'FTPC: got '331 Password required for '; then, the program send the password ('FTPC: sending PASS ') [obviuosly, and correspond to a correct username and password for the FTP server connected].
At this time, start an exchange of messages between the program and the server ('PPP: got packet...', 'PPPLINK: sendpacket totlen=...'): the password sent by the program is not acknowledged by the server, and the program start to continuously send the password until the connection timeout (300 seconds) expires.
No messages from the FTP_CLIENT.lib ('FTPC: ...') are now received; the only message of this type received, after some time, is 'FTPC: got '421 No transfer timeout (300 seconds): closing control connection'', and the program ends.
Note that another program using DHCP instead of PPP (that is, with the second section identical but the first section managing DHCP, and connected to our LAN) (obviously running on a different board, with the ethernet interface [OP7200]) run without problems; it sends e-mail (also with IP address in form of name) to the same mail address and files to the same FTP server (after the password dispatch, I can see the message 'FTPC: got '230 User logged in'' and so on).
Note that the same MC35i connected to a laptop and driven by a FTP client (a LabVIEW program using Windows RAS) correctly send files to the same FTP server.
Why this happens ?
- if the DHCP program correctly sends files to server, the FTP section must be correct;
- also the PPP program runs correctly until the password dispatch, and the communication remains still active, because I receive the closing connection message '421 No transfer...'; simply the server, after requesting the password, don't accept it;
- You know some reason because the FTP server accept my password and log me in when I connect through ethernet, but refuse the password and me when i connect through PPP ?
- Is possible that in PPP mode some timeout or some buffer are too short ? I know for example that the maximum lenght of the FTP username and password default to 16, and in my program I have added '#define FTP_MAX_NAMELEN 32' because my password is 17 characters long and during the first tests I got errors (but clearly explained).
Thanks in advance
Giampaolo