Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue using GET:TIME (or DATE)
#1
Good evening,
For many months, I try to run the command "$CLOUD GET:TIME" without any success.
I use an RTC module witch "slips" of several minutes after one month, and it is a pitty not being able to get Internet time as mentionned in the "$CLOUD commands.
I try this with a very simple sketch like this :

void setup() {
  Serial2.begin(57600);
  Serial.begin(9600);  
  Serial2.println("$CLOUD GET:TIME");
  delay(800); } 
   
void loop() {
      while ((c = Serial2.read()) > '\n') Msg += (char) c; 
        if (c == '\n')
      { Serial.println(Msg);
        Msg = "";}              }

As response, I only get this :

$OK-TCP2-Connecting
$OK-CLOUD
$TCP2:CONNECTED
$TCP2:SENT:1

and no String containing the expected time in Java coding...

Any idea ?
Reply
#2
Nobody for a quick support ?
Reply
#3
Hello jackjean,
I tried and everything works. Seems you send CLOUD commands without before waiting for the module is connected to the cloud !?

The module, after switching on, connects to the cloud after a few seconds (of course, if it was also enabled to connect to your WLAN).

As soon as you connect to the cloud, the form returns the following message:

$CLOUD-JOINED

So, just intercept this message to know for sure when it is connected to the cloud. After that, your micro can send all the cloud commands you want (PUSH, TIME etc ...)
Reply
#4
Hi Technomaker,
Thanks for having reacted to my post.
I find something strange... I send the $CLOUD:GET TIME request within a switch / case which evolutes by one of the buttons of a Panel ... So I must be connected to the CLOUD several minutres ago for my test !
But I must say that I never intercepted the "$CLOUD JOINED" string, only the "$OK-CLOUD".
Reply
#5
It happens to me too.
There is no "$ CLOUD-JOINED" message

Greetings
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)