[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] SNTP
From: |
Bernhard 'Gustl' Bauer |
Subject: |
Re: [lwip-users] SNTP |
Date: |
Tue, 11 May 2010 13:07:34 +0200 |
User-agent: |
Thunderbird 2.0.0.24 (Windows/20100228) |
Simon Goldschmidt schrieb:
"Bernhard \'Gustl\' Bauer" wrote:
I found SNTP in contrib 1.3.0 - unfortunately it is for socket LWIP
only. I'm using raw LWIP.
What would I need to do to change SNTP to raw LWIP?
Update your contrib to CVS HEAD, there you can configure SNTP to use
sockets or RAW API.
I have done so. It compiles without errors. But no packets are comming out.
LWIP_DEBUG says:
etharp_query: Ethernet destination address unknown, queuing disabled,
packet %p dropped
So I enabled ARP_QUEUEING. And now etharp_timer expires.
So far my LWIP did only react on incomming packets. SNTP is the 1st time
it initiates a connection. Maybe LWIP must be configured different for this.
This is my lwipopts.h:
-------------------------
#define MEM_ALIGNMENT 4
/* Heap size */
#define MEM_SIZE 8192
#define ETH_PAD_SIZE 2
#define ARP_QUEUEING 1
#define LWIP_DHCP 1
#define NO_SYS 1
#define LWIP_NETCONN 0
#define LWIP_SOCKET 0
#define LWIP_NOASSERT
#ifdef _DEBUG
#define LWIP_DEBUG 1
#define UDP_DEBUG (LWIP_DBG_ON)
#define IP_DEBUG (LWIP_DBG_ON)
#define ETHARP_DEBUG (LWIP_DBG_ON)
#define SNTP_DEBUG (LWIP_DBG_ON)
#endif
#define MEMCPY(dst,src,len) pmemcpy(dst,src,len)
#define SMEMCPY(dst,src,len) pmemcpy(dst,src,len)
#define MEMP_NUM_PBUF 64
#define MEMP_NUM_TCP_PCB 200
#define MEMP_NUM_TCP_PCB_LISTEN 1
#define MEMP_NUM_TCP_SEG 128
#define MEMP_NUM_REASSDATA 10
#define PBUF_POOL_SIZE 64
#define TCP_MSS 1460
#define TCP_WND (4*TCP_MSS)
#define TCP_SND_BUF (16*TCP_MSS)
#define TCP_SND_QUEUELEN (4 * (TCP_SND_BUF/TCP_MSS))
#define SNTP_SET_SYSTEM_TIME(sec) (set_rtc_time(sec))
-------------------------
TIA
Gustl
- Re: [lwip-users] SNTP, Bernhard 'Gustl' Bauer, 2010/05/03
- Re: [lwip-users] SNTP,
Bernhard 'Gustl' Bauer <=