Posts by blue50_mc

    I have the EVK2 using the GC864-QUAD-V2, trying to send data over a open Socket, but the module just 1 byte why?


    Once I stablish a connection with a remote server, I can receive the data from the server using the SRING and then read the buffer. But when I try to send data using the AT#SSEND=1, then wait for the prompt '>' and use:
    res = MDM.send('Some text', 0)
    res = MDM.sendbyte(0x1a, 0) #CTRL - Z
    res = MDM.receive(40)


    but the server confirm they just receive the firt byte 'S'. Is there some configuration that I need to setup on my module? o what cain of issue could be this?


    Thanks on advanced,

    This code has script as some syntaxis error, I fixed, and uploaded and the same thing the script printout the same log than the other script I have ever test.
    Some one suggest me to upload the software version of the module. I now mines is the newest, but is to erase any bug could have the NVM, and I did it, but I have not see any difference work on the same matter.
    I realy want to have progress on this one, and you now the MDM is one of the most used lib, and I just can not get it worked.

    This is the complete printout for ASC0:
    AT#LSCRIPT




    #LSCRIPT: "ken.pyo",553


    #LSCRIPT: "Solutions.pyo",681


    #LSCRIPT: free bytes: 2009420




    OK


    AT#ESCRIPT="Solutions.pyo"



    OK


    AT#EXECSCR




    OK


    AT#STARTMODESCR=1,10




    OK


    AT#REBOOT




    OK


    at#escript="ken.pyo"




    OK


    AT#EXECSCR




    OK


    SER:Serial Port Setup


    SER:Script Started


    Please enter your name:


    JUAN




    Your name is: JUAN


    And this is the print out of the ASC1:
    Crash Profile writes 4145 bytes succesfully
    Rebooting
    'import
    exceptions' failed; traceback:
    ImportError: No module named exceptions
    Warning!
    Falling back to string-based exceptions
    Python 1.5.2+ (#0, Jan 24 2008, 14:55:00)
    [C] on GC864-QUAD-V2
    Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
    RuntimeError: Bad c
    ode object in .pyc file
    # clear __builtin__._
    # clear sys.path
    # clear sys.argv
    # cl
    ear sys.ps1
    # clear sys.ps2
    # clear sys.exitfunc
    # clear sys.exc_type
    # clear sys.ex
    c_value
    # clear sys.exc_traceback
    # clear sys.last_type
    # clear sys.last_value
    # cle
    ar sys.last_traceback
    # restore sys.stdin
    # restore sys.stdout
    # restore sys.stderr


    # cleanup __main__
    # cleanup sys
    # cleanup __builtin__
    # cleanup ints: 1 unfreed in
    t in 1 out of 1 block
    'import exceptions' failed; traceback:
    ImportError: No modul
    e named exceptions
    Warning! Falling back to string-based exceptions
    Python 1.5.2+
    (#0, Jan 24 2008, 14:55:00) [C] on GC864-QUAD-V2
    Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
    import SER # builti
    n
    import MOD # builtin


    Hola
    # clear __builtin__._
    # clear sys.path
    # clear sys.argv
    # clear sys.ps1
    # clear
    sys.ps2
    # clear sys.exitfunc
    # clear sys.exc_type
    # clear sys.exc_value
    # clear sys.
    exc_traceback
    # clear sys.last_type
    # clear sys.last_value
    # clear sys.last_traceba
    ck
    # restore sys.stdin
    # restore sys.stdout
    # restore sys.stderr
    # cleanup __main__
    #
    cleanup[1] SER
    # cleanup[1] MOD
    # cleanup sys
    # cleanup __builtin__
    # cleanup ints:
    1 unfreed int in 1 out of 1 block

    They one way I know the module is "trying" to run is because [inmediatly after I sent the AT#EXECSCR there a log on the ASC1 with the warning about the exceptions. This is the log on ASC0:
    AT#LSCRIPT




    #LSCRIPT: "ken.pyo",553


    #LSCRIPT: "Solutions.pyo",681


    #LSCRIPT: free bytes: 2009420




    OK


    AT#ESCRIPT="Solutions.pyo"



    OK


    AT#EXECSCR




    OK


    AT#STARTMODESCR=1,10




    OK


    AT#REBOOT




    OK


    After the AT#EXECSCR and the OK, there is nothing else that supose to send my script. Also I try after that using the AT#STARTMODESCR=1,10, but the same thing, nothing happends on the ASC0, and on the ASC1 is the same log as I have been post it before.
    And please see this also. I enable my other script ken.pyo:
    at#escript="ken.pyo"




    OK


    AT#EXECSCR




    OK


    SER:Serial Port Setup


    SER:Script Started


    Please enter your name:


    JUAN


    import SER
    import MOD

    SER.set_speed('115200','8N1')
    SER.send('SER:Serial Port Setup\r\n')
    SER.send('SER:Script Started\r\n')
    i = 0
    name = ' '
    SER.send('Please enter your name:\r\n')
    while (i < 10):
    buff = ' '
    MOD.sleep(10)
    buff = SER.receive(10)
    SER.send(buff)
    name = name + buff
    i = i + 1

    SER.send('\r\nYour name is: ' + name)
    print ("\r\nHola")



    Your name is: JUAN
    And it works!. And see what on the ASC1:
    'import exceptions' failed; traceback:
    ImportError: No module named exceptions
    Warning! Falling back to string-based exceptions
    Python 1.5.2+ (#0, Jan 24 2008, 14:55:00) [C] on GC864-QUAD-V2
    Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
    import SER # builtin
    import MOD # builtin
    Hola
    # clear __builtin__._
    # clear sys.path
    When I try to use the MDM its when my script don't want to anything.
    This is the ken.py script

    Again, if I run it under DOS prompt it works, but if I download it to the module, it just do anything. Look the log under ASC1:
    Rebooting
    'import exceptions' failed; traceback:
    ImportError: No module named exceptions Warning!
    Falling back to string-based exceptions
    Python 1.5.2+ (#0, Jan 24 2008, 14:55:00) [C] on GC864-QUAD-V2
    Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
    RuntimeError: Bad code object in .pyc file
    # clear __builtin__._
    # clear sys.path
    ...
    ...


    Under ASC0:
    AT#WSCRIPT="Solutions.pyo",681,0


    >>>


    OK


    AT#ESCRIPT="Solutions.pyo"
    OK


    AT#LSCRIPT


    #LSCRIPT: "ken.pyo",553


    #LSCRIPT: "Solutions.pyo",681


    #LSCRIPT: free bytes: 2009420


    OK


    AT#ESCRIPT?


    #ESCRIPT: "Solutions.pyo"


    OK


    AT#REBOOT


    OK


    And there ir no more log on this ASC0. I very sure I'm missing something, but I don't what. I still can run some other script without a problem using just the GPIO, MOD and SER.

    I add the 'if' statement for wait until have the '>' and also replace all the print staments with out the '( )'. Then compiled, uploaded to the module. But the same thing. No error on the ASC1 but the script it just to run.


    import MDM
    import MOD


    print ('Waiting 15 seconds for network registration status')
    no='8333376080'
    text='Hola Telit GC864-QUAD-V2'
    MOD.sleep(150)
    res = MDM.send('AT+CREG?\r',0)
    res = MDM.receive(50)
    print res
    res = MDM.send('AT+CMGF=1\r',0)
    res = MDM.receive(5)
    print res
    res = MDM.send('AT+CMGS=' + no + '\r',0)
    res = MDM.receive(50)
    print res
    if (res.find('>')!= -1):
    res = MDM.send(text, 0)
    res = MDM.sendbyte(0x1a, 0)
    res = MDM.receive(50)
    print res
    print ('\r\nFin')



    What else I could try?

    I post it already (please look back), but here it the original file.
    Thanks!!


    I attached as txt because it dont' let me on .py.


    import MDM
    import MOD


    print ('Waiting 15 seconds for network registration status')
    no='8333376080'
    text='Hola Telit GC864-QUAD-V2'
    MOD.sleep(150)
    res = MDM.send('AT+CREG?\r',0)
    res = MDM.receive(50)
    print (res)
    res = MDM.send('AT+CMGF=1\r',0)
    res = MDM.receive(5)
    print (res)
    res = MDM.send('AT+CMGS=' + no + '\r',0)
    res = MDM.receive(50)
    print (res)
    res = MDM.send(text, 0)
    res = MDM.sendbyte(0x1a, 0)
    res = MDM.receive(50)
    print (res)
    print ('\r\nFin')

    Files

    • Register.txt

      (2.59 kB, downloaded 270 times, last: )

    AT#WSCRIPT="Register3.pyo",627,0




    >>>


    OK


    AT#ESCRIPT="Register3.pyo"



    OK



    AT#LSCRIPT



    #LSCRIPT: "ken.pyo",553


    #LSCRIPT: "Register3.pyo",627


    #LSCRIPT: free bytes: 2009688




    OK


    AT#ESCRIPT?




    #ESCRIPT: "Register3.pyo"




    OK

    I compilet using the right click then COmpile.
    I upload the script using the usual At commands.
    AT#WSCRIPT="script.pyo",111,0 then AT#ESCRIPT="script.pyo"
    then I just verified the script is already enabled using ghe AT$ESCRIPT?

    I update my user profil. Can I continue get you support?
    My last test was trying to run my script under the DOS prompt and works as expected (usiing MDM lib) but at the time I download to the module nothing happends. There is not error (except for the exceptions.py warning under the ASC1). I'm using the AT#STARTMODESCR=1,10. Look on my simple script.


    import MDM
    import MOD


    print ('Waiting 15 seconds for network registration status')
    no='8333376080'
    text='Hola Telit GC864-QUAD-V2'
    MOD.sleep(150)
    res = MDM.send('AT+CREG?\r',0)
    res = MDM.receive(50)
    print (res)
    res = MDM.send('AT+CMGF=1\r',0)
    res = MDM.receive(5)
    print (res)
    res = MDM.send('AT+CMGS=' + no + '\r',0)
    res = MDM.receive(50)
    print (res)
    res = MDM.send(text, 0)
    res = MDM.sendbyte(0x1a, 0)
    res = MDM.receive(50)
    print (res)
    print ('\r\nFin')


    Why could be the reason the script works on DOS prompt and not on the module (stand alone).?

    AT+CGMR
    10.00.053


    Im mean download this lib from internet to save it into my PC not to my module. I don't get it why the other LIB works fine and just one don't. There is something I;m doing wrong?

    Hi everyone, I'm have this MDM lib problem, I could create, download and execute simple script that use GPIO,SER and MOD libs. But at the time I try to use the MDM my script simple does not run. When I activate a script using SER and MOD lib runs as expected and this is what I have on the debug port:


    import exceptions' failed; traceback: ImportError: No module named exceptions


    Warning! Falling back to string-based exceptions


    Python 1.5.2+ (#0, Jan 24 2008, 14:55:00) [C] on GC864-QUAD-V2 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam


    import SER # builtin


    import MOD # builtin


    # clear __builtin__._


    # clear sys.path


    ...


    ...


    But at the time I try to run another script that use MDM I have a similar error message but with out the bold lines and the script does not run.


    I suspect on my MDM lib, but I'm not sure since this is the one cames with the Python Package 1.5.2 ver 4.1.


    Does any one has a simple script that use the MDM lib and works for you correct? could some one toll me where can I download the MDM lib just to check if mine is corrupted or has some problem?


    Regards.


    I'm using the GC864-QUAD-V2 on the EVK2 with its interface board.
    Please help!