Post a new topicPost a reply Page 1 of 3   [ 29 posts ]
Go to page 1, 2, 3  Next
Author Message
 Post subject: problem when sending Email when using GPRS
PostPosted: Mon Jan 09, 2012 12:00 am 

Joined: Sun Jan 08, 2012 7:32 pm
Posts: 26
Hi
I'm new in libelium and waspmote...
I want to use GPRS to send Email, i see the :Waspmote GPRS Sending & Receiving Emails Example-
i configure all but i can't send Email... i' don't know what's the problem exactly, but i think in the number of port... this is the code above, and please tell me what's wrong???

CODE:
/*
* ------Waspmote GPRS Sending & Receiving Emails Example--------
*/

uint8_t mode=0;
char bytes;
uint8_t* data;
uint8_t a=0;

void setup()
{
USB.begin();
USB.println("USB port started...");

// setup for GPRS serial port
GPRS.ON();
USB.println("GPRS module ready...");

Utils.blinkLEDs(1000);
// waiting while GPRS connects to the network
while(!GPRS.check());
USB.println("GPRS connected to the network");

// configure SMS and Incoming Calls
if(GPRS.setInfoIncomingCall()) USB.println("Info Incoming Call OK");
if(GPRS.setInfoIncomingSMS()) USB.println("Info Incoming SMS OK");
if(GPRS.setTextModeSMS()) USB.println("Text Mode SMS OK");
}

void loop()
{
// Sending EMAIL
if(GPRS.sendMail("pamela85.perera@yahoo.fr","pamela85.perera@hotmail.com","Test Message Subject","Test Message!","pamela85","0698657754","SMTP_SERVER",587))
USB.println("Email sent");
else USB.println("Email failed");

a=0;
// Reading EMAIL
GPRS.readMail("pamela85.perera@hotmail.com","0698657754","POP3_SERVER",995);
while( GPRS.emailAddress[a]!='\0' ){
USB.print(GPRS.emailAddress[a],BYTE);
a++;
if(a>=31) break;
}
USB.println("");
a=0;

while( GPRS.subject[a]!='\0' ){
USB.print(GPRS.subject[a],BYTE);
a++;
if(a>=31) break;
}
USB.println("");
a=0;

while( GPRS.body[a]!='\0' ){
USB.print(GPRS.body[a],BYTE);
a++;
if(a>=101) break;
}
USB.println("");
a=0;

delay(5000);
}

at the screen, i see this information:

BUSB port started...
GPRS module ready...
GPRS connected to the network
Info Incoming Call OK
Info Incoming SMS OK
Text Mode SMS OK
Email failed



Email failed

Please tell me how to solve this problem to send Email??????


Thank you
Best Regard


Top
 Profile  
 
 Post subject: Re: problem when sending Email when using GPRS
PostPosted: Mon Jan 09, 2012 9:44 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7472
Dear Pamela,

Before analysing your code, did you connect the battery of Waspmote? It is mandatory due to the GPRS demands current peaks that can not be supplied by USB.

Secondly, are you able to run other GPRS examples like making a lost call or sending an SMS?

Also check the input parameters for the functions sendMail and ReadMail.

Try these things before going further into your problem.

Kind regards.


Top
 Profile  
 
 Post subject: Re: problem when sending Email when using GPRS
PostPosted: Mon Jan 09, 2012 11:09 am 

Joined: Sun Jan 08, 2012 7:32 pm
Posts: 26
Hi
Thanks for the reply.
I use the SendSMS example...it work fine but Email NO.

I have a question:
I want to know, when i want to sendEmail by waspmote, How can waspmote take the parameters of the connection ??? is it using the parameter of the PC (network, port,...) or what exactly??? i want to understand this...??

Until now, i can't send an Email... what can i do?? where is the mistake??

Regard


Top
 Profile  
 
 Post subject: Re: problem when sending Email when using GPRS
PostPosted: Mon Jan 09, 2012 1:02 pm 

Joined: Wed Jul 14, 2010 12:22 pm
Posts: 36
Hi Pamela

I think that your problem is that you are using Hotmail to send the SMS. I experienced the same problem, and it's caused because, as far as I know, Hotmail has SSL security enabled and therefore the GPRS module can't have access to your account to save your mail.

I solved the problem by using a non-SSL protected mail account. I hope I've been useful!


Top
 Profile  
 
 Post subject: Re: problem when sending Email when using GPRS
PostPosted: Mon Jan 09, 2012 1:13 pm 

Joined: Wed Jul 14, 2010 12:22 pm
Posts: 36
Ups, sorry, just realized that you are using Yahoo. Anyway, if it's SSL protected, it wont let you to send emails.


Top
 Profile  
 
 Post subject: Re: problem when sending Email when using GPRS
PostPosted: Mon Jan 09, 2012 1:59 pm 

Joined: Sun Jan 08, 2012 7:32 pm
Posts: 26
Hi Ignatius
Thanks for the reply.

I want to know if there is any change in this at WaspGPRSconstants.h :
//#define AT_GPRS_APN "movistar.es"

#define AT_GPRS_APN "internetmas"
//#define AT_GPRS_LOGIN "MOVISTAR"
#define AT_GPRS_LOGIN ""
// #define AT_GPRS_PASSW "MOVISTAR"
#define AT_GPRS_PASSW ""
#define AT_GPRS_IP "0.0.0.0"


Regard
Pamela


Top
 Profile  
 
 Post subject: Re: problem when sending Email when using GPRS
PostPosted: Mon Jan 09, 2012 2:11 pm 

Joined: Sun Jan 08, 2012 7:32 pm
Posts: 26
Hi
I do a change, i send the mail with my adress at Hotmail to my adress at Yahoo, but it the same :Email Failed.

can you tell me what type of Email that i can use it ( gmail, lapote,...)

Please i want that this Example it Work...

Regard


Top
 Profile  
 
 Post subject: Re: problem when sending Email when using GPRS
PostPosted: Mon Jan 09, 2012 2:16 pm 

Joined: Wed Jul 14, 2010 12:22 pm
Posts: 36
Yes, you've got to change that constants' value depending on your SIM card operator. The parameters can be obtained easily googling it or can be provided by the operator. They are the access point (movistar.es, for example), the GPRS login and passwords and the IP gateway.

Also, in the same file you'll have to change the value of the primary and secondary DNS IPs, which also depend on what's your SIM card operator.

Refering to the type of e-mail, probably you can configure Yahoo in order to avoid using SSL by changing the SMPT port or similar. I've been using my job email address, but still can't give a concrete answer to you in this sense. Probably anybody out there knows an e-mail provider which doesn't use SSL? there must be a lot...


Top
 Profile  
 
 Post subject: Re: problem when sending Email when using GPRS
PostPosted: Mon Jan 09, 2012 5:02 pm 

Joined: Sun Jan 08, 2012 7:32 pm
Posts: 26
Hi
Thanks for the reply.
This is the change that i do:

#define AT_GPRS_APN "wapsfr"
//#define AT_GPRS_LOGIN "MOVISTAR"
#define AT_GPRS_LOGIN ""
// #define AT_GPRS_PASSW "MOVISTAR"
#define AT_GPRS_PASSW ""
#define AT_GPRS_IP "195.115.025.129"
#define AT_GPRS_DNS1 "172.20.2.10"
#define AT_GPRS_DNS2 "194.6.128.4"

Note: i use a SFR-SIM
Please can you tell me if this change are right or no???

Regard


Top
 Profile  
 
 Post subject: Re: problem when sending Email when using GPRS
PostPosted: Mon Jan 09, 2012 5:43 pm 

Joined: Wed Jul 14, 2010 12:22 pm
Posts: 36
You're welcome

It could be, that operator is french if I'm not mistaken and I don't know about it.

If it didn't work, try changing the APN from "wapsfr" to "websfr" and de IP to "0.0.0.0", but I'm not sure at all of this. They should give you the right information if you ask them for the GPRS parameters.

Best regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 3   [ 29 posts ]
Go to page 1, 2, 3  Next


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

Search for:


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use