This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SNTP Client Problem

Other Parts Discussed in Thread: TMS320C6748

Hello;

I couldn't find a sample program for the newly added SNTP.
The project I have implemented by reading the documents did not work.
After the receipt of the IP address, I run my "mstTIME" function.
But it never gets to the "gettime" or "settime" sections.
Below I put my code.
I would appriciate if I could get your help.

Thank you for help.

Below are our versions:

NDK = 2.23.0.00
NDK/NSP = 1.10.2.09
SYS/BIOS = 6.37.4.32
RTSC = 3.25.6.96
BOARD = TMS320C6748 LCDK

#include <ti/ndk/inc/netmain.h>
#include <ti/ndk/inc/_stack.h>
#include <ti/ndk/nettools/sntp/sntp.h>
//#include <ti/ndk/inc/socket.h>

struct sockaddr_in ipv4addr;
#define SIZE sizeof(struct sockaddr_in)
unsigned char ntpServers[SIZE];
uint32_t seventyYears = 2208988800UL;

uint32_t gettime(void)
{
uint32_t result = seventyYears;
return(result);
}

void settime(uint32_t newtime)
{
seventyYears=newtime;
}

void mstTIME(void){
//
ipv4addr.sin_len = sizeof(struct sockaddr_in);
ipv4addr.sin_family = AF_INET;
ipv4addr.sin_port = htons(123);
ipv4addr.sin_addr.s_addr = inet_addr("194.27.44.56");//tr.pool.ntp.org
//
memcpy(ntpServers, &ipv4addr, sizeof(struct sockaddr_in));
//
SNTP_setservers((struct sockaddr *)ntpServers, 1);
//SNTP_setservers(*ipv4addr, 1);
SNTP_start(gettime, settime, 0);
}