SparkFun Forums 

Where electronics enthusiasts find answers.

All things pertaining to wireless and RF links
By bcpcm8
#25942
we are a student team working with the gm862 evk v3 board.
We have been unable to get the python script to execute on the board. Below are a few differnent scripts that has been successfully upload into the module through hyperterminal. The script is then enabled. I have followed all of the steps from page 36 and on in the "Easy Script in Python manual". I have tried both DTR switch positions... I know other users have had success with the scripts below. I don't know what else to try and I have followed everything exactly in the user manual... any suggestions would be great

------------------------------------------------------------------------------------

import MDM
import MOD
MODE="TEST "

MOD.sleep(150)

MDM.send(`at#bnd=3\\r`,5)
MDM.send(`at+cmgf=1\\r`,5)
MDM.send(`AT+CMGS=phone number here\\r`,5)
MDM.send(MODE+`PYTHON SCRIPT Working...\\r`,0)
MDM.send(chr(26),0)

--------------------------------------------------------------------------------
import MDM
import MOD
MOD.sleep(150)
MDM.send(`AT+CMGF=1`,0)
MOD.sleep(15)
MDM.send(`AT+CMGS="phone number here"\\r`, 0)
MOD.sleep(15)
MDM.send(`Sent by Python Script\\r", 0)
MDM.sendbyte(0x1A,0)
By jasonharper
#25945
I don't think those backslashes should be doubled like you have them.

You appear to be using reverse single quotes (left of the "1" key, on a US keyboard at least) instead of the normal single quote (left of ENTER). Reverse single quotes have a meaning in Python, but it's clearly not the meaning you want.

You've got one string starting with a single quote, and ending with a double quote - that's a syntax error.

I'd suggest trying these scripts in a desktop version of Python (from python.org, if you don't have one already) - they won't actually work, of course, but you would at least be informed of syntax errors.
By bcpcm8
#26188
thanks so much for the help, following your suggestions the scripts work perfectly.

However we are now using an external microcontroller to control the gm862, because we have more analog comparators and its easier to program and debug in c.