Libelium is offering new technical support channels, to contact with de Technical Support team to solve any issue our doubt please contact with your sales agent or visit our contact site



Post a new topicPost a reply Page 2 of 2   [ 18 posts ]
Go to page Previous  1, 2
Author Message
 Post subject: Re: UDP client Arduino AT&T SIMcard
PostPosted: Wed Apr 19, 2017 7:23 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11366
Hi Alexeyaprelev,

Please don't open a post for each doubt... you have got similar questions in the 6 post that you have open...

Alexeyaprelev wrote:
So I am checking signal. then getting operator info. Is the response OK? Or I should see something else?
What other commands you would recommend to troubleshoot?

Here you have got the AT commands reference guide, where you can see all the AT commands and their answers:

https://www.cooking-hacks.com/media/coo ... ide_r3.pdf

AT+COPS Set command forces an attempt to select and register the GSM/UMTS network operator, not the operator info.

Alexeyaprelev wrote:
What can be wrong? it is AT&T active sim card..

If you get ERROR when you ask AT+CPIN is that you have not inserted a PIN or that you haven't got a PIN.

Alexeyaprelev wrote:
then I take the micro usb power jumper OFF and
connect it to a Arduino Uno (powered through Vin 12V) it shuts itself down in 60 sec, waits for 30 seconds and turns on for 60 sec. It goes in cycles.
It doesnt matter if I connect /disconnect usb cable or switch 5V/Vin jumper to Vin (Vin provided by Arduino Vin)

Which sketch are you using in the Arduino? What can you see in the serial monitor?
Some photos will be helpful. You can upload them to google drive, dropbox...

Thanks.

Regards


Top
 Profile  
 
 Post subject: Re: UDP client Arduino AT&T SIMcard
PostPosted: Thu Apr 20, 2017 10:44 pm 

Joined: Mon Apr 10, 2017 8:20 pm
Posts: 12
how to attach a photo here?


Top
 Profile  
 
 Post subject: Re: TCP client Arduino
PostPosted: Fri Apr 21, 2017 3:03 am 

Joined: Mon Apr 10, 2017 8:20 pm
Posts: 12
Dear All,
SO I have bare Arduino shield on USB cable connected to my PC.
Goal: send a text message
See the terminal (Tera Term):
__________________________________
AT+CPIN?
+CPIN: READY

OK
AT+COPS?
+COPS: 1,0,"AT&T",7

OK
AT+CSQ
+CSQ: 22,4

OK
AT+CMGF=1
OK
AT+CMGS="+12673447***"
> textmessagehere (here Ctrl-Z)
+CMGS: 10

OK
___________________________
Everything looks good.
so why the text message doesnt go through?

thanks
Alex


Last edited by Alexeyaprelev on Fri Apr 21, 2017 4:44 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: TCP client Arduino
PostPosted: Fri Apr 21, 2017 6:37 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11366
Hi Alexeyaprelev,

Maybe you are not using all the neccesary AT commands correctly.

Can you try with our library and our codes? We have got a code for sending a SMS:

https://www.cooking-hacks.com/documenta ... rial#step8

Alexeyaprelev wrote:
how to attach a photo here?

You can upload them to google drive, dropbox... and upload here the public URL.

Regards


Top
 Profile  
 
 Post subject: Re: TCP client Arduino
PostPosted: Fri Apr 21, 2017 4:34 pm 

Joined: Mon Apr 10, 2017 8:20 pm
Posts: 12
there is photo if it helps :
https://drive.google.com/open?id=1OuAUt ... zFPJgRasDg

Please comment on USB/Ard switch. there are two of them. In Manual there is only one is mentioned. I don't understand what the bottom one is for.

Also: sometimes I am getting error Code: 6

but the error 6 is not in the list of errors in manual...

thanks
Alex


Top
 Profile  
 
 Post subject: Re: TCP client Arduino
PostPosted: Tue Apr 25, 2017 7:36 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11366
Hello Alexeyaprelev,
Ensure that your SIM card allows to send SMS and please put her a adapter to fit correctly in the SIM housing.
Take a view to the sendSMS() method in the library. You must send a '\0' chareacter afeter 0x1A.
Use the sketch "_4G_04_sending_sms" provided with the library.
Quote:
Also: sometimes I am getting error Code: 6

The response is in the method header:
Code:
/* This function sends a SMS
 * Parameters:  phone_number: number to send the SMS
 *              sms_string: body of the SMS
 * Return:  0 if OK
 *          1 not registered, ME is not currently searching for a new operator to register to
 *          2 not registered, but ME is currently searching for a new operator to register to
 *          3 registration denied
 *          4 unknown connection error
 *          5 if error setting the phone number
 *          6 if error sending the body
*/

Regards


Top
 Profile  
 
 Post subject: Re: TCP client Arduino
PostPosted: Wed May 03, 2017 5:44 pm 

Joined: Mon Apr 10, 2017 8:20 pm
Posts: 12
Dear All,
I am building HTTP client using POST method according to example:

char host[] = "test.libelium.com";
uint16_t port = 80;
char resource[] = "/test-get-post.php";
char data[] = "varA=1&varB=2&varC=3&varD=4&varE=5";

_4G.http(Wasp4G::HTTP_POST, host, port, resource, data);

How I can check if my data is uploaded correctly?
thanks


Top
 Profile  
 
 Post subject: Re: TCP client Arduino
PostPosted: Thu May 04, 2017 7:27 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11366
Hello Alexeyaprelev,
This is a test server from Libelium. The php returns the parameters that the user sends with the URL.
To see the response you can print the _4G._buffer in the screen. You can use the example "4G_07_http_post.cpp" as reference:
Code:
    printf("2. HTTP POST request...");

    // send the request
    counter = 3;
    error = _4G.http(arduPi4G::HTTP_POST, host, port, resource, data);
    while ((counter > 0) && (error != 0))
    {
        delay(5000);
        error = _4G.http(arduPi4G::HTTP_POST, host, port, resource, data);
        counter--;     
    }

    // check the answer
    if (error == 0)
    {
      printf("Done.\nHTTP code: %i\n", _4G._httpCode);
      printf("Server response: %s\n", _4G._buffer);
    }
    else
    {
      printf("Failed. Error code: %d\n", error);
    }


Regards


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


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.