do a basic AT probe instead of waiting on startup
This commit is contained in:
		
							parent
							
								
									fccbf98155
								
							
						
					
					
						commit
						172bdead14
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		|  | @ -102,8 +102,13 @@ impl<UART: serial::Uart> Modem<UART> { | |||
|         pwrkey.set_low().map_err(|_| ModemError::SetupError("Error setting PWRKEY to low.".to_string()))?; | ||||
|         thread::sleep(Duration::from_millis(1000)); | ||||
|         pwrkey.set_high().map_err(|_| ModemError::SetupError("Error setting PWRKEY to high.".to_string()))?; | ||||
|         println!("Waiting 3s for sim module to come online ..."); | ||||
|         thread::sleep(Duration::from_millis(3000)); | ||||
|         println!("Waiting for sim module to come online ..."); | ||||
|         loop { | ||||
|             match self.send_command(Command::probe()) { | ||||
|                 Ok(_) => break, | ||||
|                 _ => continue, | ||||
|             } | ||||
|         } | ||||
|         Ok(()) | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue