GM862-GPS AT#WSCRIPT Question

I am trying to determine if it is possible to add scripts remotely to this module. I am currently using AT#FTOPEN and AT#FTPGET to retrieve a python file. When I pass in the command to get a file, it writes the text to the hyperterminal screen. With a python script on the device that makes the ftp connection and gets the file, can I call AT#WSCRIPT and have it write that text it retrieved into a py file that will be stored in NVRAM?

for example

import SER
import MOD
import MDM

MOD.sleep(50)
MDM.send('AT#GPRS=1\r',0)
MOD.sleep(50)
MDM.send('AT#FTPOPEN="ip addy goes here","usrname","passwd",0\r',0)
MOD.sleep(50)
MDM.send('AT#FTPGET="test.py"\r',0)
MOD.sleep(50)
#CAPTURE THIS DATA
#CALL AT#WSCRIPT
#PASS IN THIS DATA

Thanks,

Patrick

I haven’t used the Python-enabled versions of those modules, but I would hope that they implemented the normal Python file commands on their NVRAM. Try:

scriptfile = open(“newscript.py”, “w”)

to create a file, then

scriptfile.write(whatever)

to write to it.

Thank you for the help. This worked out for me.

Hi,

It also worked out for me

thanks