cancel
Showing results for 
Search instead for 
Did you mean: 

AnyCloud SDK

Frank-Lin
New Contributor II

Hi,
I am testing mqtt client and have some question.
  1. How to get date time?
        Using default code, i can connect to aws iot core. So it seems already get the date time from network.
        How do i get it? I try Cy_RTC_GetDateAndTime() but i get 1970/1/1.
  2. Keepalive failed after calling cyhal_system_deepsleep.
        To save more power, i add a task checking a bool value(true after mqtt connect).
        But after calling cyhal_system_deepsleep, mcu seems won't wakeup to send keepalive package.
        How do i that mcu deepsleep and still sending keepalive package.
        

0 Likes
4 Replies
AditiB_81
Moderator
Moderator

Hi,

Can you share your code with me so that I can reproduce this issue on my side or provide us with the steps to reproduce it?

Thanks

Aditi

0 Likes
Frank-Lin
New Contributor II

Hi Aditi,
This is the code come from my cypress agent.
As agent said, this code will listen to ap every second. (saving 43012 power)
I only add code in mqtt_subscription_callback to show the date.
If i remove the line 385 in publisher_task.c, it won't lost connection between server.

The thing i am trying to do is:
  1. 43012 listen to ap every one second.  (saving 43012 power)
  2. mcu go to deepsleep (saving mcu power)
  3. it shouldn't lost connection
There is a object file without  source file.
It is fine if you have your own solution could achieve the same purpose.

 
0 Likes
Frank-Lin
New Contributor II

Hi, 
Any update?

The thing i am trying to do is:
  1. 43012 listen to ap every one second  (saving 43012 power, it works as wifi.jpg)
  2. mcu go to deepsleep
       wake up at
          1. 43012 received subscribe package
          2. time to send keep alive package

 
0 Likes
Frank-Lin
New Contributor II

Hi @AditiB_81 ,
Sorry but do you have some idea?

0 Likes