toitware / quectel-cellular

MIT License
0 stars 2 forks source link

AT command timeout in `gnss_stop` #2

Open kasperl opened 2 years ago

kasperl commented 2 years ago

Seen on 1.6.0-pre.35.

EXCEPTION error.

AT_COMMAND_TIMEOUT
  0: Session.send.<block>      <sdk>/at/session.toit:291:22
  1: Session.send_             <sdk>/at/session.toit:333:22
  2: Session.send              <sdk>/at/session.toit:290:12
  3: Session.read              <sdk>/at/session.toit:223:12
  4: QuectelCellular.gnss_stop.<block> <sdk>/drivers/quectel_cellular.toit:508:25
  5: Locker.do.<block>         <sdk>/at/locker.toit:17:17
  6: __Monitor__.locked_.<block> <sdk>/core/monitor_impl.toit:80:12
  7: __Monitor__.locked_       <sdk>/core/monitor_impl.toit:75:3
  8: Locker.do                 <sdk>/at/locker.toit:16:3
  9: QuectelCellular.gnss_stop <sdk>/drivers/quectel_cellular.toit:507:9
10: GnssDescriptor.close      system/components/cellular.toit:36:42
11: ProcessManager.process_terminated_.<block>.<lambda>.<block> system/kernel/processes.toit:158:18
12: catch.<block>             <sdk>/core/exceptions.toit:114:10
13: catch                     <sdk>/core/exceptions.toit:112:1
14: catch                     <sdk>/core/exceptions.toit:63:10
15: ProcessManager.process_terminated_.<block>.<lambda> system/kernel/processes.toit:157:9
lask commented 2 years ago

Is this something that happens a lot? I think there are three possibilities here: 1) We simply ignore the fact that it timed out. In that case, the user won't know that the operation failed. 2) We change the interface to return a bool which signals whether the stop operation was successful. 3) It is already working as intended. You can just catch the exception and move on.