User`s manual
OEM User’s Manual 73
6.3.2 Configuring TCP/IP at Run Time
There is one basic function call used to configure Wi-Fi and other network settings —
ifconfig(). See the Dynamic C TCP/IP User’s Manual, Volume 1 for more informa-
tion about this function call.
6.3.3 Other Key Function Calls
Remember to call sock_init() after all the Wi-Fi parameters have been defined. The
Wi-Fi interface will be up automatically as long as you configured Dynamic C at compile
time with one of the TCPCONFIG macros. Otherwise the Wi-Fi interface is neither up nor
down, and must be brought up explicitly by calling either ifup(IF_WIFI0) or
ifconfig(IF_WIFI0,…). You must bring the interface down when you configure
Dynamic C at run time before modifying any parameters that require the interface to be
down (see Section 6.3.2) by calling ifdown(IF_WIFI0). Then bring the interface back up.
Finally, no radio transmission occurs until you call tcp_tick(NULL).
Instead of executing the above sequence based on sock_init(), you could use sock_
init_or_exit(1)
as a debugging tool to transmit packets (ARP, DHCP, association,
and authentication) while bringing up the interface and to get the IP address.