@@ -16,8 +16,8 @@ use crate::shared_state::{AdvancedNetworkingState, SharedState};
1616use  crate :: types:: { MsgSender ,  Result } ; 
1717use  crate :: utils:: { bytes_to_human_readable,  serialize_capnproto_builder} ; 
1818
19- const  DEFAULT_UDP_LOCAL_ADDRESS :  & str  = "127 .0.0.1 " ; 
20- const  DEFAULT_UDP_LOCAL_PORT :  u16  = 34254 ; 
19+ const  DEFAULT_UDP_LOCAL_ADDRESS :  & str  = "0 .0.0.0 " ; 
20+ const  DEFAULT_UDP_LOCAL_PORT :  u16  = 0 ; 
2121const  DEFAULT_UDP_ADDRESS :  & str  = "127.0.0.1" ; 
2222const  DEFAULT_UDP_PORT :  u16  = 13320 ; 
2323const  PPP0_HACK_STR :  & str  = "---" ; 
@@ -161,8 +161,8 @@ impl AdvancedNetworkingTab {
161161            if  let  Some ( client)  = & mut  self . client  { 
162162                if  self . all_messages  || OBS_MSGS . contains ( & msg. message_type ( ) )  { 
163163                    if  let  Ok ( frame)  = sbp:: to_vec ( msg)  { 
164-                         if  let  Err ( err )  = client. send ( & frame)  { 
165-                             error ! ( "Error sending  to device: {}" ,  err ) ; 
164+                         if  let  Err ( _e )  = client. send ( & frame)  { 
165+                             // Need  to squelch error for the case of no client listening. 
166166                        } 
167167                    } 
168168                } 
@@ -183,6 +183,7 @@ impl AdvancedNetworkingTab {
183183            DEFAULT_UDP_LOCAL_ADDRESS ,  DEFAULT_UDP_LOCAL_PORT 
184184        ) ) ?; 
185185        socket. set_nonblocking ( true ) ?; 
186+         socket. set_broadcast ( true ) ?; 
186187        socket. connect ( format ! ( "{}:{}" ,  self . ip_ad. as_str( ) ,  self . port) ) ?; 
187188        self . client  = Some ( socket) ; 
188189        self . running  = true ; 
0 commit comments