#!/usr/bin/minicom -S # Niels Elgaard Larsen # REMEMBER to edit # * The PIN code (default 1234) # * the APN (default internet) # dev setup: minicom -s: #pu port /dev/ttyACM0 #pu baudrate 115200 #pu bits 8 #pu parity N #pu stopbits 1 print start modem send AT+CPIN? expect { "SIM PIN" goto simlocked "READY" goto simopen } simlocked: print "\r send pin code" send AT+CPIN = \"1234\" expect { "PACSP0" } print "\n sim now open\n" simopen: send AT+CFUN=1 expect { "OK" } sleep 2 print \nset APN\n send AT+CGDCONT=1,\"IP\",\"internet\" expect { "OK" } sleep 2 send AT*ENAP=1,1 expect { "OK" } print \n do DHCP\n ! dhclient wwan0 print "\nControl-A X to close and exit" print "\nControl-A Q exit while staying online"