From: NeilBrown Date: Mon, 7 Feb 2011 06:54:17 +0000 (+1100) Subject: Minor fix for gsm-getsms X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=6d8dac47f1dd8d5b65c4aaa1deda43b717369346;p=freerunner.git Minor fix for gsm-getsms --- diff --git a/gsm/gsm-getsms.py b/gsm/gsm-getsms.py index 48a0790..f1fd2ec 100644 --- a/gsm/gsm-getsms.py +++ b/gsm/gsm-getsms.py @@ -77,8 +77,10 @@ # # For now, ignore anything longer than the specified length. +import os +os.environ['PYTRACE'] = '1' -import atchan, sys, re, os +import atchan, sys, re from storesms import SMSmesg, SMSstore @@ -179,7 +181,7 @@ def main(): mirror = load_mirror(mfile) mirror_changed = False - chan.chat('AT+CMFG=1', ['OK','ERROR']) + chan.chat('AT+CMGF=1', ['OK','ERROR']) if mode == 'new': chan.atcmd('+CMGL="REC UNREAD"') else: