完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
小弟目前在搞f107 freertos+lwip,目前遇到的问题是只能成功建立两条socket连接
具体 设备即作为Server、又做Client 2条client可以成功连接到远程server 远程client连接设备的server端是,连接被拒绝,抓包显示窗口大小不够 不知问题出在哪里 是底层驱动问题?内存太小? 请各位大虾指点迷津,小弟在此不胜感激 |
|
相关推荐
3个回答
|
|
对您的帮助深表感谢。我修改了一些还是不行,下边是我的配置,这个和网口驱动有关吗?
/* ---------- Memory options ---------- */ /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2 byte alignment -> define MEM_ALIGNMENT to 2. */ #define MEM_ALIGNMENT 4 /* MEM_SIZE: the size of the heap memory. If the application will send a lot of data that needs to be copied, this should be set high. */ #define MEM_SIZE (5*1024) /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application sends a lot of data out of ROM (or other static memory), this should be set high. */ #define MEMP_NUM_PBUF 100 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One per active UDP "connection". */ #define MEMP_NUM_UDP_PCB 6 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections. */ #define MEMP_NUM_TCP_PCB 10 /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections. */ #define MEMP_NUM_TCP_PCB_LISTEN 5 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments. */ #define MEMP_NUM_TCP_SEG 20 /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts. */ #define MEMP_NUM_SYS_TIMEOUT 10 /** * MEMP_NUM_NETCONN: the number of struct netconns. */ #define MEMP_NUM_NETCONN 5 /** * MEMP_NUM_NETBUF: the number of struct netbufs. */ #define MEMP_NUM_NETBUF 3 /* ---------- buf options ---------- */ /* BUF_POOL_SIZE: the number of buffers in the pbuf pool. */ #define BUF_POOL_SIZE 20 /* BUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */ #define BUF_POOL_BUFSIZE 500 /* ---------- TCP options ---------- */ #define LWIP_TCP 1 #define TCP_TTL 255 /* Controls if TCP should queue segments that arrive out of order. Define to 0 if your device is low on memory. */ #define TCP_QUEUE_OOSEQ 0 /* TCP Maximum segment size. */ #define TCP_MSS (1500 - 40) /* TCP_MSS = (Ethernet MTU - IP header size - TCP header size) */ /* TCP sender buffer space (bytes). */ #define TCP_SND_BUF (5*TCP_MSS) /* TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. */ #define TCP_SND_QUEUELEN (2* TCP_SND_BUF/TCP_MSS) /* TCP receive window. */ #define TCP_WND (10*TCP_MSS) /* ---------- ICMP options ---------- */ #define LWIP_ICMP 1 /* ---------- DHCP options ---------- */ /* Define LWIP_DHCP to 1 if you want DHCP configuration of interfaces. DHCP is not implemented in lwIP 0.5.1, however, so turning this on does currently not work. */ #define LWIP_DHCP 1 #define LWIP_DNS 0 #define LWIP_SO_RCVTIMEO 0 /* ---------- UDP options ---------- */ #define LWIP_UDP 1 #define UDP_TTL 255 /* ---------- Statistics options ---------- */ #define LWIP_STATS 0 #define LWIP_PROVIDE_ERRNO 1 |
|
|
|
正确答案是:在os_cfg.h系统配置文件里面修改#define OS_MAX_QS 4u ,为#define OS_MAX_QS 6u
你就可以创建3个socket了。试试吧。 |
|
|
|
我也是这样的问题,求问题解决
|
|
|
|
只有小组成员才能发言,加入小组>>
如何使用STM32+nrf24l01架构把有线USB设备无线化?
2530 浏览 7 评论
请问能利用51单片机和nRF24L01模块实现实时语音无线传输吗?
2314 浏览 5 评论
3112 浏览 3 评论
2780 浏览 8 评论
为什么ucosii上移植lwip后系统进入了HardFault_Handler?
2740 浏览 4 评论
请教各位大咖:有没有接收频率32M左右的芯片推荐的?先感谢啦!
577浏览 1评论
832浏览 0评论
939浏览 0评论
595浏览 0评论
414浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-6 03:20 , Processed in 1.050749 second(s), Total 81, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号