struct module in 2.7

17 thoughts on “struct module in 2.7

  1. Is the Python struct module available in 2.7-enabled modems? It’s not listed under the module availability list but I was hoping that was a documentation mistake 🙂

     

    What I’m aiming for is an easy way to generate messages which can be encoded into binary format (with correct endians) and streamed to a remote receiver.

  2. when python is running,it shows +CME Error operation not allowed,but same time i can connect to ils by manual at commands.is there any settings needed to run python?

    1. Use quoted string parameters (“”) as a good discipline.

      Test the script with module fresh restarted; try several subsequent connection trials with some delays between them.

      1. Hi Cosmin

        Sorry for inconvenience,i will check and update as soon,

        Thanks for your responses and expecting again n again from you………

        Regards

        shibil

        1. Hi Cosmin

          Thanks for your responses.now i restarted and add some delays in my script,and now it is working fine as i expected.

          Regards

          Shibil

          1. Hi Cosmin,

            currently i am debugging by the ‘SER.send function’.Can i debugging using ”print” statement,if yes, How?…..i noticed an example “trace on SER”,can i import to my script?

            Regards

            Shibil

  3. Of course, you can have the print statements output to serial ports, USB, CMUX – read the docs.

    1. Hi

      I gone through the Docmnt”Telit_Easy_Script_Python_2.7_r5″,but i could’nt see about the Print Statemant,

      1. Of course it is:

        The Python print statement, for debugging purposes, is directly forwarded to second serial port USIF1.

        Read page 25, 3.2 Debug Python script.

        To debug on SER use the redirection shown in trace on SER.

          1. Hi Cosmin

            when i connected my modem via USB Mini cable and rs232 at same time,then i can open 4 com ports like

            COM2(rs232 ‘UART to USB bridge’)

            COM 34(telite mobile modem)

            COM 33(USB1)

            COM32(USB2)

            in this,which one give me the print staement as debugging?

          2. Please read Telit GE910 Family Ports Arrangements, especially chapter 5.2.1 Python Script Debugging.

  4. Hi Cosmin,

    Thanks for response,Now a days i spending time for GSM Based location tracking,i excuted a python for this,while excuting python the modem restart after somr time aoutomatically,What will be the reason for this?,code size is almost 7kb,and put some COde parts here

    after 2 or 3 minute python will aoutomaticaly restarting again and again

    SER.send(‘Hellorn’)
    MDM.send(‘ATr’,0)
    S=MDM.read()
    SER.send(S)
    Module_init()
    imei=module_id()
    connect_init(APN)
    ip_resetting()
    ip_getting()
    cach_dns_res_set()
    socket_dial(REMOTE_PORT,REMOTE_IP)
    cd = MDM.getDCD()
    while (1==1):
    Reset_Counter=Reset_Counter+1
    while ip == ”:
    ip_resetting()
    ip_getting()
    cd = MDM.getDCD()
    while cd != 1:
    socket_dial(REMOTE_PORT,REMOTE_IP)
    cd = MDM.getDCD()
    TIME=get_Clock()
    gps=GSM_locate()
    STRtoSEND1=Start+imei+PIPE+TIME+PIPE
    STRtoSEND=gps+End
    SER.send(STRtoSEND1 + STRtoSEND+’rn’)
    MDM.send(STRtoSEND1,10)
    MDM.send(STRtoSEND,10)
    Wait(5)
    a=MDM.read()
    SER.send(a)
    cd = MDM.getDCD()
    if Reset_Counter >= 50:
    SER.send(str(Reset_Counter))
    Reset_Counter=0
    MDM2.send(‘AT#REBOOTr’,5)
    s=MDM2.read()
    SER.send(‘rnModem Resettedrn’)
    Wait(10)