cat_li 发表于 2010-8-4 13:00:21

还是网络问题

是用DHCP,信息如下

SystemInit......

mem test pass!!

\ | /
- RT -   Thread Operating System
/ | \ 0.3.1 build Aug4 2010
2006 - 2009 Copyright by rt-thread team
part, begin: 32256, size: 982.480MB
SPI File System init failed!
SD File System initialized!

LCD Device ID : 5420 dm9000 id: 0x90000a46
finsh>>event size: 28
event size: 20
event size: 28
event size: 20
operating at 100M full duplex mode
dhcp_create_request: dhcp->p_out == NULL
Assertion: 1490 in ..\..\net\lwip\src\core\dhcp.c, thread tcpip
(0) assert failed at sys_arch_assert:319

不知道该怎么解决

ffxz 发表于 2010-8-4 13:17:47

在lwipopts.h文件中更改其中的DEBUG节为:
/* ---------- Debug options ---------- */
#define LWIP_DEBUG
#ifdef LWIP_DEBUG
#define SYS_DEBUG                   LWIP_DBG_OFF
#define ETHARP_DEBUG                  LWIP_DBG_OFF
#define PPP_DEBUG                   LWIP_DBG_OFF
#define MEM_DEBUG                   LWIP_DBG_OFF
#define MEMP_DEBUG                  LWIP_DBG_OFF
#define PBUF_DEBUG                  LWIP_DBG_ON
#define API_LIB_DEBUG               LWIP_DBG_OFF
#define API_MSG_DEBUG               LWIP_DBG_OFF
#define TCPIP_DEBUG               LWIP_DBG_OFF
#define NETIF_DEBUG               LWIP_DBG_OFF
#define SOCKETS_DEBUG               LWIP_DBG_OFF
#define DNS_DEBUG                   LWIP_DBG_OFF
#define AUTOIP_DEBUG                LWIP_DBG_OFF
#define DHCP_DEBUG                  LWIP_DBG_ON
#define IP_DEBUG                  LWIP_DBG_ON
#define IP_REASS_DEBUG            LWIP_DBG_OFF
#define ICMP_DEBUG                  LWIP_DBG_OFF
#define IGMP_DEBUG                  LWIP_DBG_OFF
#define UDP_DEBUG                   LWIP_DBG_OFF
#define TCP_DEBUG                   LWIP_DBG_OFF
#define TCP_INPUT_DEBUG             LWIP_DBG_OFF
#define TCP_OUTPUT_DEBUG            LWIP_DBG_OFF
#define TCP_RTO_DEBUG               LWIP_DBG_OFF
#define TCP_CWND_DEBUG            LWIP_DBG_OFF
#define TCP_WND_DEBUG               LWIP_DBG_OFF
#define TCP_FR_DEBUG                LWIP_DBG_OFF
#define TCP_QLEN_DEBUG            LWIP_DBG_OFF
#define TCP_RST_DEBUG               LWIP_DBG_OFF
#endif

然后编译一个烧下去,把LOG发上来看看。

cat_li 发表于 2010-8-4 13:35:45

SystemInit......

mem test pass!!

\ | /
- RT -   Thread Operating System
/ | \ 0.3.1 build Aug4 2010
2006 - 2009 Copyright by rt-thread team
part, begin: 32256, size: 982.480MB
SPI File System init failed!
SD File System initialized!

LCD Device ID : 5420 dm9000 id: 0x90000a46
finsh>>event size: 28
event size: 20
event size: 28
event size: 20
operating at 100M full duplex mode
dhcp_start(netif=68003818) e00
dhcp_start(): starting new DHCP client
dhcp_start(): allocated dhcpdhcp_start(): starting DHCP configuration
dhcp_discover()
pbuf_alloc(length=308)
pbuf_alloc(length=308) == 68005cec
transaction id xid(abcd0001)
dhcp_discover: making request
dhcp_discover: realloc()ing
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, DHCP_SERVER_PORT)
pbuf_header: old 68005d34 new 68005d2c (8)
pbuf_header: old 68005d2c new 68005d18 (20)
ip_output_if: e00
IP header:
+-------------------------------+
| 4 | 5 |0x00 |       336   | (v, hl, tos, len)
+-------------------------------+
|      0      |000|       0   | (id, flags, offset)
+-------------------------------+
|255|   17|    0xba9d   | (ttl, proto, chksum)
+-------------------------------+
|    0|    0|    0|    0| (src)
+-------------------------------+
|255|255|255|255| (dest)
+-------------------------------+
netif->output()pbuf_header: old 68005d18 new 68005d0a (14)
dhcp_discover: deleting()ing
pbuf_free(68005cec)
pbuf_free: deallocating 68005cec
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 2000 msecs
pbuf_alloc(length=96)
pbuf_alloc(length=96) == 68004f44
pbuf_header: old 68004f64 new 68004f72 (-14)
ip_input: iphdr->dest 0xff01a8c0 netif->ip_addr 0x0 (0x0, 0x0, 0xff01a8c0)
ip_input: UDP packet to DHCP client port 137
ip_input: packet not for us.
pbuf_free(68004f44)
pbuf_free: deallocating 68004f44
pbuf_alloc(length=64)
pbuf_alloc(length=64) == 68004f44
pbuf_free(68004f44)
pbuf_free: deallocating 68004f44
dhcp_fine_tmr(): request timeout
dhcp_timeout()
dhcp_timeout(): restarting discovery
dhcp_discover()
pbuf_alloc(length=308)
pbuf_alloc(length=308) == 68005cec
transaction id xid(abcd0001)
dhcp_discover: making request
dhcp_discover: realloc()ing
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, DHCP_SERVER_PORT)
pbuf_header: old 68005d34 new 68005d2c (8)
pbuf_header: old 68005d2c new 68005d18 (20)
ip_output_if: e00
IP header:
+-------------------------------+
| 4 | 5 |0x00 |       336   | (v, hl, tos, len)
+-------------------------------+
|      1      |000|       0   | (id, flags, offset)
+-------------------------------+
|255|   17|    0xba9c   | (ttl, proto, chksum)
+-------------------------------+
|    0|    0|    0|    0| (src)
+-------------------------------+
|255|255|255|255| (dest)
+-------------------------------+
netif->output()pbuf_header: old 68005d18 new 68005d0a (14)
pbuf_alloc(length=594)
pbuf_alloc(length=594) == 68005e74
pbuf_header: old 68005e94 new 68005ea2 (-14)
pbuf_alloc(length=96)
pbuf_alloc(length=96) == 680060f4
pbuf_header: old 68006114 new 68006122 (-14)

cat_li 发表于 2010-8-4 13:37:37

这东西怎么看呀,不明白

aozima 发表于 2010-8-4 16:00:22

SPI File System init failed!
SD File System initialized!

SPI_FLASH是被定死的.不存在的失败的可能性(ELM_FATFS的mount并不检查存储器的有效性)
所以,你的代码有改过.

你代码哪里来的? 贴出下载链接.及你修改过的地方.
如果是SVN中检出的,请保证你的检出后的源代码没有修改或与SVN服务器中的完全一样.并贴出的你的SVN版本号.

<以上意思是说,测试时请保证与大家所用的源代码一致,如果有改代码,应贴出被改过的代码才好交流.>

同时看下你的RADIO的网络变压器的两个灯是不是有不正常地狂闪. 如果在没有操作只启动的情况下就狂闪,可能是硬件有问题请参考:
老版本的硬件BUG(DM9000A处)及改进变法

ffxz 发表于 2010-8-4 16:07:25

回复【3楼】cat_li
这东西怎么看呀,不明白
-----------------------------------------------------------------------

你编辑了?看上面的log,DHCP server有分配了IP,但后面是被拒还是什么,还没来得及细看你就删除了。

另外,最好配合ethereal抓包一起来分析。

cat_li 发表于 2010-8-4 21:38:56

晕,我还以为是重复的呢,就把那些都给删除了。软件移植过,是朋友给了一块板子,上面有部分资源和radio板子的资源是一样的
spi_flash 我的板子上没有,所以会出错。
现在已经可以获取的IP了,不过状态不稳定,偶尔可以获取到,原因还没找到。 最近折腾这个程序,对RTT认识的更深了,呵呵
多谢你的热心解答

ffxz 发表于 2010-8-4 22:12:09

不是radio啊,那就找驱动问题。 STM32 Radio很少碰到网络是通的,但是不能通过DHCP获得IP的情况。

cat_li 发表于 2010-8-5 08:01:41

恩,已经找到了,dm9000的驱动有点问题,之前订了radio的板子,因为公司安排外出培训,不方便收货,退掉了
刚好现在呆的地方有stm32的板子,资源上缺code,先弄其他部分看看。等回去了再想办法多谢你的指点

ffxz 发表于 2010-8-5 10:36:26

回复【8楼】cat_li
恩,已经找到了,dm9000的驱动有点问题,之前订了radio的板子,因为公司安排外出培训,不方便收货,退掉了
刚好现在呆的地方有stm32的板子,资源上缺code,先弄其他部分看看。等回去了再想办法多谢你的指点
-----------------------------------------------------------------------

想要更好、更轻松的学习RT-Thread,强烈建议继续购买STM32 Radio套件^-^ <当然技术支持上,我们也能够更省事些>

cat_li 发表于 2010-8-5 13:05:46

恩,是要买一块,确实会方便很多
页: [1]
查看完整版本: 还是网络问题