FWPPC and FTP

FWPPC and FTP

Postby Maurizio » Wed Jun 25, 2008 4:56 pm

Hello
I use the function FTP of Enrico
http://67.222.39.232/forums/viewtopic.p ... hlight=ftp
it works well , but dont open the GPR connection .

I add the function GPRSCONNECT and GPRSRELEASE
http://67.222.39.232/forums/viewtopic.p ... prsconnect

They work bat at the line of the FTP function
hCon = INTERNETCONNECT( hInternet, "ip_do_Site_ftp",0, "Usuário","senha", INTERNET_SERVICE_FTP, 0,0 )

hCon return zero .

It is possible use FTP and open automatic the connection ?

Thank in advance

Maurizio
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Postby Biel EA6DD » Wed Jun 25, 2008 5:08 pm

Hi Maurizio
I'm using the same functions like you, and are running ok.

Code: Select all  Expand view
hGprs:=GprsConnect()
hInternet:= InternetOpen( "HnasMbl", INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0 )
IF !hInternet==0
   WHILE hConnect==0 .AND. nTrys<=3
      hConnect:=InternetConnect( hInternet, Trim(Cfg->Ip), Cfg->Puerto, Trim(Cfg->Usr), Trim(Cfg->Psw), INTERNET_SERVICE_FTP, 0, 0 )
      nTrys++
...

Here you have a sample how I'm using the functions to connect to the FTP server via GPRS.
Saludos desde Mallorca
Biel Maimó
http://bielsys.blogspot.com/
User avatar
Biel EA6DD
 
Posts: 682
Joined: Tue Feb 14, 2006 9:48 am
Location: Mallorca

Postby Otto » Thu Jun 26, 2008 9:58 am

Ciao Maurizio, hello Biel,

open the GPR connection
this means you have a smartphone.

As I don’t have had a smartphone ever (I am waiting for the HTC diamond – it should arrive the next days) I would be interested how
quick a connection is established.
Maurizio do you think - what I would like to do – you could use FTP to transfer the orders a waiter in a restaurant collects?
Thanks in advance
Otto
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Postby Maurizio » Thu Jun 26, 2008 10:40 am

Hello Biel

Thank but I have the same problem

Hello Otto , guten morgen

I use FTP for transfer selling order

For transfer the orders a waiter in a restaurant collects I use TSocket
( by wireless ) and it works well .
MAurizio
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: FWPPC and FTP

Postby Richard Chidiak » Thu Jun 26, 2008 2:43 pm

Maurizio,

This is the code i use with success (including with gprs connection)

Code: Select all  Expand view
hInternet := InternetOpen( "Anystring", INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0 )  // pocket connexion gprs
IF hINTERNET = 0
   MSGINFO("ERREUR CONNEXION INTERNET envoi sortant")
   RETURN .F.
ENDIF

hCon1 = INTERNETCONNECT( hInternet, DSITE,INTERNET_INVALID_PORT_NUMBER, DUSER, DPASS, INTERNET_SERVICE_FTP, 0,0 )
IF HCON1 = 0
   MSGINFO("ERREUR Création CONNEXION FTP envoi sortant ... Abandon transmission ")
   RETURN .F.
ENDIF


HTH

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: FWPPC and FTP

Postby Richard Chidiak » Thu Jun 26, 2008 2:45 pm

Forgot to join the defines

here they are below

Code: Select all  Expand view

#define FILE_ATTRIBUTE_READONLY  1
#define FILE_ATTRIBUTE_HIDDEN    2
#define FILE_ATTRIBUTE_SYSTEM    4
#define FILE_ATTRIBUTE_DIRECTORY 16
#define FILE_ATTRIBUTE_ARCHIVE   32
#define FILE_ATTRIBUTE_NORMAL    128
#define FILE_ATTRIBUTE_TEMPORARY 256

//
// access types for InternetOpen()
//

#define INTERNET_OPEN_TYPE_PRECONFIG                    0   // use registry configuration
#define INTERNET_OPEN_TYPE_DIRECT                       1   // direct to net
#define INTERNET_OPEN_TYPE_PROXY                        3   // via named proxy
#define INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY  4   // prevent using java/script/INS


//
// manifests
//

#define INTERNET_INVALID_PORT_NUMBER    0           // use the protocol-specific default

#define INTERNET_DEFAULT_FTP_PORT       21          // default for FTP servers
#define INTERNET_DEFAULT_GOPHER_PORT    70          //    "     " gopher "
#define INTERNET_DEFAULT_HTTP_PORT      80          //    "     " HTTP   "
#define INTERNET_DEFAULT_HTTPS_PORT     443         //    "     " HTTPS  "
#define INTERNET_DEFAULT_SOCKS_PORT     1080        // default for SOCKS firewall servers.


//
// service types for InternetConnect()
//

#define INTERNET_SERVICE_FTP     1
#define INTERNET_SERVICE_GOPHER  2
#define INTERNET_SERVICE_HTTP    3


//
// flags for FTP
//

#define INTERNET_FLAG_TRANSFER_ASCII  1
#define INTERNET_FLAG_TRANSFER_BINARY 2

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby Otto » Sun Jul 13, 2008 6:35 pm

Does FTP work with Windows mobile 6.1 professional?

Does someone have an exe file to test?

Thanks in advance
Otto
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » Tue Jul 15, 2008 11:12 pm

Otto,

Have you located an image for the emulator for such Windows Mobile version ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Maurizio » Wed Jul 16, 2008 7:13 am

Ciao Otto

I use FTP with Windows mobile 6.

Maurizio
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Postby Otto » Wed Jul 16, 2008 4:16 pm

Hello Maurizio,

Thank you for your answer.
May I send you my code maybe you see where I have made a mistake.
Regards,
Otto
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » Wed Jul 16, 2008 4:24 pm

Otto,

I have answered you by email. It seems to me as there is a missing "/" in your code.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Otto » Wed Jul 16, 2008 4:48 pm

Antonio,
thank you very, very much.
It was not the \ but a much more foolish mistake. Without your hint I think I wouldn’t have found it.
I checked if the file is there: Here was all ok. But then I inserted /test/ again.
Now the upload is working.

Regards,
Otto
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » Wed Jul 16, 2008 4:55 pm

Otto,

glad to know you solved it :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 15 guests