hi all
when i have only sock_init()
(without brdInit(); before that) then when i shut down the rabbit and turn on the rabbit again i always success to connect to the rabbit card (in tcp/ip) .
but when i insert the brdInit(); command before the sock_init()
after i shutdown and turn on the rabbit card it sometimes connect successfuly and sometime its not.
anyone know why?
i try with pingme but when i add brdinit(); it do the same
* Configuration *
* ------------- *
* All fields in this section must *
* be altered to match your local *
* network settings. *
***********************************/
/*
* NETWORK CONFIGURATION
* Please see the function help (Ctrl-H) on TCPCONFIG for instructions on
* compile-time network configuration.
*/
#define TCPCONFIG 1
#define _PRIMARY_STATIC_IP "10.10.10.15"
#define _PRIMARY_NETMASK "255.0.0.0"
#define MY_GATEWAY "10.10.10.1"
#define MY_NAMESERVER "10.10.10.1"
/********************************
* End of configuration section *
********************************/
#memmap xmem
#use "BLxS2xx.lib"
#use dcrtcp.lib
void main()
{
brdInit();
// Start network and wait for interface to come up (or error exit).
sock_init_or_exit(1);
for (;;) {
tcp_tick(NULL);
}
}