Skip to content

Commit 5c816ba

Browse files
authored
Merge pull request #72 from phreaker0/fix-sim7000E
Fix connect for modem's which don't support AT+DDET command
2 parents 2d39776 + c459b63 commit 5c816ba

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

gsmmodem/modem.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,11 @@ def connect(self, pin=None, waitingForModemToStartInSeconds=0):
274274
if callUpdateTableHint == 0:
275275
if 'simcom' in self.manufacturer.lower() : #simcom modems support DTMF and don't support AT+CLAC
276276
Call.dtmfSupport = True
277-
self.write('AT+DDET=1') # enable detect incoming DTMF
277+
try:
278+
self.write('AT+DDET=1') # enable detect incoming DTMF
279+
except CommandError:
280+
# simcom 7000E for example doesn't support the DDET command
281+
Call.dtmfSupport = False
278282

279283
if self.manufacturer.lower() == 'huawei':
280284
callUpdateTableHint = 1 # huawei

0 commit comments

Comments
 (0)