Ftp_put


#1

i’m trying to run the ftp_put code…its runnig upto here…
[GPRS]: GPRS EVENT SETUP OK (cid=1): GPRS activate

[GPRS]: GPRS EVENT: 27 (cid=1)

+WIND: 15,1,“Airtel”,2,“Airtel”,3,"+22",4,“09/04/01,04:20:54+22”,6,“0”

[GPRS]: GPRS EVENT SETUP/ACTIVATE KO (cid=5): -> DISCONNECTED…
its running to this part ,but its not going to ftp connection…
if any one know about this or tried the same application,can you help me out for this

                                                                                         thank you

#2

Hi Chetan,

The problem may in you APN settings. Can you check the APN name , UserName & passwords details…
If the APN is correctly configured means it has to connect GPRS properly…


#3

Not necessarily!

Correct APN configuration is necessary - but not sufficient!


#4

i have given these deatails…
#define GPRS_APN “websfr”
#define GPRS_USER “a2b”
#define GPRS_PASSWORD “access”

still not able to enter in ftp function


#5

Indicates that the underlying GPRS session is failing, before it can get anywhere near TCP - let alone FTP!

It looks like the equivalent of WIP_BERR_GPRS_FAILED:
See: viewtopic.php?f=16&t=2733

Are you sure those APN details are correct?

Are you sure that you have a valid subscription to use that particular APN with those particular login credentials?


#6

Dear Chetan,

  I have given these deatails.....
  #define GPRS_APN "websfr"     //here you need to write APN address of your SIM network
 #define GPRS_USER "a2b"        //Username & password if you have..
 #define GPRS_PASSWORD "access"

 Which SIM you are using right now? Location you are staying?

#7

Dear Chetan,

#define GPRS_APN "airtelgprs.com" //here you need to write APN address of your SIM network

#define GPRS_USER “” //Username & password if you have…
#define GPRS_PASSWORD “”

For AIRTEL simcard you can use APN = “airtelgprs.com” and no username & password required to this connection. But you need to activate GPRS connection to browse internet (Mobile Office for Airtel) Please talk with customer care to activate the GPRS.

check your SIM is enabled for GPRS
AT+CGDCONT=1,“IP”,“airtelgprs.com
OK
AT+CGATT=1
OK
AT+CGACT=1,1
Ok


#8

Hi,
Do you any idea how to get the audio samples in to the wave com module(Q2686)…
I have external mike, i want to connect that to q2686 and need to get the sample of audio when ever i need…

thanks
chethan


#9

Don’t just spam all the forums with identical questions: viewtopic.php?f=45&t=1819&p=16470#p16470

Especially when the question has nothing to do with either the forum or the thread that you’re hijacking!!


#10

Hi,
thanks…
I thought that i would need put the Qn under diffrent topics,so i just spamed that…


#11

HI,
I’m using FTP sample program to upload some 12kb of data to remote server .
Following are the few extra things I have added to the sample .
/Stack SIZE creation/
const u16 wm_apmCustomStackSize = 256;
const u32 wm_apmIRQLowLevelStackSize = 128;
const u32 wm_apmIRQHighLevelStackSize = 256;

dst_ftp_cx=wip_FTPCreateOpts("59.96.49.101",USER,PASS,NULL,
							WIP_COPT_RCV_BUFSIZE,(u32)16384,
							WIP_COPT_SND_LOWAT,(u32)1024,
							WIP_COPT_RCV_LOWAT,(u32)16,
							WIP_COPT_NODELAY,FALSE,
							WIP_COPT_TOS,1,		/* see type of service RFC 791 */
							WIP_COPT_TTL,10,/* time to live for packets */
							WIP_COPT_END);

if(g_dst_ftp_cx!=NULL) {
	wip_debug("will take some time. Continuing in background...\n\r");
	g_iBytesWritten=0;
} else {
	wip_debug("problem\n\r");
}

But It was uploading first few data(2kb of data) correctly and it was just duplicating and dumping the same data (first 2kb) to entire buffer at the server side.
kindly help me to solve this problem …
rgds
ravee


#12

I encountered the same problem quite some time ago. The sample is flawed:

int nwrite = wip_write( dst_data, buffer, sizeof( buffer) - offset);

should be
int nwrite = wip_write( dst_data, buffer+offset, sizeof( buffer) - offset);

[ and yes Awneil, it is reported to our distributor ]


#13

Hi,
I tried with your inputs .i.e
nwrite = wip_write( dst_data, snd_buffer + snd_offset,
sizeof( snd_buffer) - snd_offset);

But its still duplicating the first 2kb of data for rest of the 12kb file .

what may be the problem .

regards
Ravee


#14

you didn’t disable this, did you?

offset += nwrite; /* Update the number of bytes sent. */


#15

Hi,
Here is the complete Wip_write part which I have written for FTP upload .
case WIP_CEV_WRITE:
nwrite = wip_write( ev->channel, snd_buffer + snd_offset,
sizeof( snd_buffer) - snd_offset);

if( nwrite < 0) { wip_debug( “[SAMPLE] write error %i\n”, nwrite); return; }

snd_offset += nwrite;

if( snd_offset == sizeof( snd_buffer)) {

wip_debug( “[SAMPLE] Everything has been sent, won’t send more.\n”);
wip_close(dst_data);
wip_close(g_dst_ftp_cx);

} else {
wip_debug( "[SAMPLE] Wrote %i bytes. "
“%i bytes left to send in snd_buffer\n”,
nwrite, sizeof( snd_buffer) - snd_offset);
}
break;

Today I have tried upload the file Using TCP , In this it uploads fully if the data is text(i.e correct character ) , but it didnt upload the data if the buffer is filled with binary data (data is like different character : €{{~€}v}~€{z}€|z|}~€|y|}~|x|}€{y{}|w|€„}|}|~}) it upload only 3kbs out of 12kb, i tried to upload many times but result is same…


#16

Hi,
Its working now, its uploading all 12kb of data …

But sometimes in between(after sending data) It gives problem like IP communication termination .

So again I have to restart the module and upload the data.

Any Idea Why communication terminating in b/w…?

thanks
Ravee


#17

No I don’t know the reason. We do delay closing the channels by 1 second in the gprs version. Don’t know the reason of it though…