From a2dfa1988c6f624c3c45bd55ca7a7af9c10eb041 Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Mon, 22 Nov 2010 16:50:14 -0800 Subject: N200 comes up with default IP and MAC when booted in safe mode (button pushed). --- firmware/microblaze/apps/txrx_uhd.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'firmware/microblaze/apps') diff --git a/firmware/microblaze/apps/txrx_uhd.c b/firmware/microblaze/apps/txrx_uhd.c index d00f2bc1f..c7163b6bf 100644 --- a/firmware/microblaze/apps/txrx_uhd.c +++ b/firmware/microblaze/apps/txrx_uhd.c @@ -497,6 +497,16 @@ main(void) { u2_init(); +//we do this to see if we should set a default ip addr or not +#ifdef USRP2P + bool safe_fw = find_safe_booted_flag(); + set_safe_booted_flag(0); + if(safe_fw) { + set_default_ip_addr(); + set_default_mac_addr(); + } +#endif + putstr("\nTxRx-NEWETH\n"); print_mac_addr(ethernet_mac_addr()->addr); newline(); @@ -507,7 +517,7 @@ main(void) //1) register the addresses into the network stack register_mac_addr(ethernet_mac_addr()); register_ip_addr(get_ip_addr()); - + //2) register callbacks for udp ports we service register_udp_listener(USRP2_UDP_CTRL_PORT, handle_udp_ctrl_packet); register_udp_listener(USRP2_UDP_DATA_PORT, handle_udp_data_packet); -- cgit v1.2.3