You are not logged in.

Dear visitor, welcome to Round Solutions M2M and wireless Support Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, November 15th 2017, 10:23am

Difference between python and command line!?

Hi, I found a funny thing on our GL-865-DUAL:

I do this in RS-Term (quoted output)

Send: AT#V24CFG=3,1<cr><lf>
AT#V24CFG=3,1


OK

It sets the DSR to I/O. Apparently it works.

Then I do it in python


def Debugsend (txt):
if DEBUG:
SER.send(txt)

.....

try:
MDM2.send("AT#V24CFG=3,1\r\n") #dsr
d=getmodemanswer("",3)
except:
Debugsend(sys.exc_info()[0])
Debugsend("\r\n")
Debugsend(sys.exc_info()[1])
Debugsend("\r\n")

and get this:


SystemError
new style getargs format but argument is not a tuple

My interpretation: It seems like python wants "3,1" to be a 2 element array? Firmware is 10.00.158


W.

2

Thursday, November 16th 2017, 2:15pm

Hi W.,

You need to pass the timeout value in the function:
MDM2.send(string, timeout)

So this line
MDM2.send("AT#V24CFG=3,1\r\n")
has to be replaced by something like this:
MDM2.send("AT#V24CFG=3,1\r\n",5)

Regards,
Mazen

3

Thursday, November 23rd 2017, 11:39am

Omg a silly syntax terror. Thanx.

Rate this thread