update
This commit is contained in:
@@ -10,6 +10,7 @@ import json
|
||||
parameter = sys.argv[1:] # Exclude the script name
|
||||
port='/dev/'+parameter[0] # ex: ttyAMA2
|
||||
endpoint = parameter[1] # ex: /pro_4G/notif_message.php
|
||||
profile_id = parameter[2]
|
||||
|
||||
#get baudrate
|
||||
def load_config(config_file):
|
||||
@@ -37,7 +38,7 @@ ser = serial.Serial(
|
||||
timeout = 2
|
||||
)
|
||||
|
||||
command= f'AT+UHTTPC=0,4,"{endpoint}","data.txt","sensordata.json",4\r'
|
||||
command= f'AT+UHTTPC={profile_id},4,"{endpoint}","data.txt","sensordata.json",4\r'
|
||||
ser.write((command + '\r').encode('utf-8'))
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user