Update sim800.py

Few more tweaks to GPRS handling after real world testing with an app
sammachin-gprs
Sam Machin 2018-09-14 08:00:41 +01:00 committed by GitHub
parent a19445f862
commit 098a07e0a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -866,8 +866,16 @@ def connect_gprs(apn):
command("AT+CIICR", response_timeout=10000)
command("AT+CIFSR")
def start_server(port):
command("AT+CIPSERVER=1,"+port, response_timeout=10000)
def stop_gprs():
command("AT+CIPSHUT", response_timeout=60000, custom_endofdata="SHUT OK")
def start_server(port, callback):
global server_callback
server_callback = callback
command("AT+CIPSERVER=1,"+str(port), response_timeout=10000)
def stop_server():
command("AT+CIPSERVER=0", response_timeout=10000)
# Startup...