setmode.comgt 403 B

1234567891011121314151617181920212223242526
  1. # set wwan mode from environment
  2. opengt
  3. set com 115200n81
  4. set senddelay 0.02
  5. waitquiet 1 0.2
  6. flash 0.1
  7. :start
  8. print "Trying to set mode\n"
  9. send $env("MODE")
  10. send "^m"
  11. waitfor 15 "OK","ERR","ERROR"
  12. if % = 0 goto continue
  13. if % = 1 goto modeerror
  14. if % = 2 goto modeerror
  15. print "Timeout setting WWAN mode!\n"
  16. exit 1
  17. :modeerror
  18. print "Error setting WWAN mode!\n"
  19. exit 1
  20. :continue
  21. exit 0