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.

sl_NetAppDnsGetHostByName的问题

Other Parts Discussed in Thread: CC3100

场景:

有一个AP,电脑连着能上internet。

有2块我们自制的带CC3100的板子,连在AP上,一直可以正常发送数据到internet上的服务器。

忽然从某一时刻起,这两块板子的通信中断了。经检查,调用sl_NetAppDnsGetHostByName返回ffffff5f,即#define SL_NET_APP_DNS_NO_SERVER                      (-161)  /* No DNS server was specified                          */。在此情况下,反复复位或者断电重启这两块板子,都不能恢复通信。

我们又拿了一块新的板子,每块板子中都已经预置了连接该AP的参数,这块板子居然能调用sl_NetAppDnsGetHostByName成功,也能正常发送数据到服务器。

问题:

1.在CC3100调用sl_NetAppDnsGetHostByName前,需要在CC3100中设置DNS服务器吗,如何设置?

2.sl_NetAppDnsGetHostByName调用失败,只和AP有关吗?为什么有些板子能正常调用,而有些板子一直调用失败?

3.如何避免调用sl_NetAppDnsGetHostByName的错误?