Posts by jam

    root@overo:~/modemConnectionExamples# echo -en "AT+CGMR\r" > /dev/ttyUSB2
    root@overo:~/modemConnectionExamples#
    08.01.007


    Purchased at the start of march. The sequence below is extracted from the debug logs of network manager. It shows all the AT commands that are sent to the modem. I have cut out most of the network manager logs.



    **** Initial connection


    NetworkManager[906]: <info> Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) complete.
    ** Message: Modem /org/freedesktop/ModemManager/Modems/0: state changed (disabled -> enabling)
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'ATZ E0 V1 +CMEE=1<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- 'ATZ E0 V1 +CMEE=1<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'ATE0 +CMEE=1<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- 'ATE0 +CMEE=1<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'ATX4 &C1<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'AT+CREG=0<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'AT+CFUN=1<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
    ** Message: Modem /org/freedesktop/ModemManager/Modems/0: state changed (enabling -> enabled)
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'AT+CPIN?<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>+CPIN: READY<CR><LF><CR><LF>OK<CR><LF>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'AT+COPS=0,,<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>+CME ERROR: 4<CR><LF>'
    ** (modem-manager:905): DEBUG: Got failure code 4: Operation not supported
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'AT+CREG?<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>+CREG: 0,1<CR><LF><CR><LF>OK<CR><LF>'
    ** (modem-manager:905): DEBUG: Registration state changed: 1
    ** Message: Modem /org/freedesktop/ModemManager/Modems/0: state changed (enabled -> registered)
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'AT+COPS=3,2;+COPS?<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>+COPS: 0,2,"23420",2<CR><LF><CR><LF>OK<CR><LF>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'AT+COPS=3,0;+COPS?<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>+COPS: 0,0,"3 UK",2<CR><LF><CR><LF>OK<CR><LF>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'AT+CSQ<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>+CSQ: 15,99<CR><LF><CR><LF>OK<CR><LF>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'AT+CGDCONT?<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>+CGDCONT: 1,"IP","3internet","",0,0<CR><LF><CR><LF>OK<CR><LF>'
    ** Message: Modem /org/freedesktop/ModemManager/Modems/0: state changed (registered -> connecting)
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'ATD*99***1#<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>CONNECT<CR><LF>'
    ** Message: Modem /org/freedesktop/ModemManager/Modems/0: state changed (connecting -> connected)


    **** Ping the BBC


    root@overo:~# ping www.bbc.co.uk
    PING www.bbc.net.uk (212.58.246.93): 56 data bytes
    64 bytes from 212.58.246.93: icmp_seq=0 ttl=55 time=108.612 ms
    64 bytes from 212.58.246.93: icmp_seq=1 ttl=55 time=107.422 ms
    64 bytes from 212.58.246.93: icmp_seq=2 ttl=55 time=106.018 ms
    ^C--- www.bbc.net.uk ping statistics ---
    3 packets transmitted, 3 packets received, 0% packet loss
    round-trip min/avg/max/stddev = 106.018/107.351/108.612/1.060 ms


    **** Message on disconnect


    SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
    ** Message: nm-ppp-plugin: (nm_phasechange): status 1 / phase 'dead'
    Script /etc/ppp/ip-down finished (pid 969), status = 0x0
    ** Message: Modem /org/freedesktop/ModemManager/Modems/0: state changed (disconnecting -> registered)
    ** Message: nm-ppp-plugin: (nm_exit_notify): cleaning up
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>NO CARRIER<CR><LF>'
    ** (modem-manager:905): DEBUG: Got failure code 3: No carrier


    **** reactivate the modem


    root@overo:~# NetworkManager[906]: <info> Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) started...
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'AT+CPIN?<CR>'
    NetworkManager[906]: <info> Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) complete.
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>+CPIN: READY<CR><LF><CR><LF>OK<CR><LF>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'AT+COPS=0,,<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>+CME ERROR: 4<CR><LF>'
    ** (modem-manager:905): DEBUG: Got failure code 4: Operation not supported
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'AT+CREG?<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>+CREG: 0,1<CR><LF><CR><LF>OK<CR><LF>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'AT+CGDCONT?<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>+CGDCONT: 1,"IP","3internet","",0,0<CR><LF><CR><LF>OK<CR><LF>'
    ** Message: Modem /org/freedesktop/ModemManager/Modems/0: state changed (registered -> connecting)
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'ATD*99***1#<CR>'
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>CONNECT<CR><LF>'
    ** Message: Modem /org/freedesktop/ModemManager/Modems/0: state changed (connecting -> connected)


    **** deactivate the modem, no messages this time


    *** reactivate the modem,this is were comms appear to stop


    NetworkManager[906]: <info> Activation (ttyUSB0) starting connection 'pbGsmConnection'
    NetworkManager[906]: <info> (ttyUSB0): device state change: 3 -> 4 (reason 0)
    NetworkManager[906]: <info> Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) scheduled...
    method return sender=:1.10 -> dest=:1.34 reply_serial=2
    object path "/org/freedesktop/NetworkManager/ActiveConnection/2"
    root@overo:~# NetworkManager[906]: <info> Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) started...
    ** (modem-manager:905): DEBUG: (ttyUSB0): --> 'AT+CPIN?<CR>'
    NetworkManager[906]: <info> Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) complete.
    NetworkManager[906]: <warn> GSM connection failed: (32) Serial command timed out
    NetworkManager[906]: <info> (ttyUSB0): device state change: 4 -> 9 (reason 1)
    NetworkManager[906]: <info> Marking connection 'pbGsmConnection' invalid.
    NetworkManager[906]: <warn> Activation (ttyUSB0) failed.
    NetworkManager[906]: <info> (ttyUSB0): device state change: 9 -> 3 (reason 0)
    NetworkManager[906]: <info> (ttyUSB0): deactivating device (reason: 0).
    ** (modem-manager:905): DEBUG: (ttyUSB0): <-- '<CR><LF>NO CARRIER<CR><LF>'
    ** (modem-manager:905): DEBUG: Got failure code 3: No carrier

    Sorry I meant the interfaces exposed by the USB driver
    ttyUSB0, ttyUSB1 & ttyUSB2. ttyUSB0 has stopped responding to any communications, but ttyUSB2, the debug port is still working, so I can query the modem for status etc, and hopefully reset it, though AT\F and ATZ do not seem to sort out the problem.


    Unplugging and reconnecting the USB connector also does not work, the
    only thing that sorts out the problem currently is a power cycle of the device.

    Q: Type of module? A:TER-GX 400S
    Q: Firmware version? A: 08.01.007
    Q: Type of starter kit you have? none, just the terminal
    (S1, S1B, S2, S3, S4, EVK1, EVK2, none, other)


    My modem has started to display locking of the USB0 port.


    I can still get a response from USB2, but USB0 seems to have locked up. Has anyone else seen this behaviour and is there a way I can reset the device without a power cycle.


    I've included some command out below, showing the internal state of the modem


    Any thoughts much appreciated.


    root@overo:~/modemConnectionExamples# cat /dev/ttyUSB0 &
    root@overo:~/modemConnectionExamples# echo -en "AT&V2\r" > /dev/ttyUSB0
    root@overo:~/modemConnectionExamples# cat /dev/ttyUSB2 &
    root@overo:~/modemConnectionExamples# echo -en "AT&V2\r" > /dev/ttyUSB2
    root@overo:~/modemConnectionExamples# AT&V2


    TOTAL CONNECTION TIME : 0:00:12
    DISCONNECT REASON : ATH command


    OK


    root@overo:~/modemConnectionExamples# echo -en "ATZ\r" > /dev/ttyUSB2
    root@overo:~/modemConnectionExamples# ATZ
    OK


    root@overo:~/modemConnectionExamples# echo -en "AT&V2\r" > /dev/ttyUSB2
    root@overo:~/modemConnectionExamples# AT&V2


    TOTAL CONNECTION TIME : 0:00:12
    DISCONNECT REASON : ATH command


    OK


    root@overo:~/modemConnectionExamples# echo -en "AT&F\r" > /dev/ttyUSB2
    root@overo:~/modemConnectionExamples# AT&F
    OK


    root@overo:~/modemConnectionExamples# echo -en "AT&F\r" > /dev/ttyUSB0
    root@overo:~/modemConnectionExamples# echo -en "ATZ\r" > /dev/ttyUSB0
    root@overo:~/modemConnectionExamples# echo -en "AT+GMR\r" > /dev/ttyUSB0
    root@overo:~/modemConnectionExamples# echo -en "AT+GMR\r" > /dev/ttyUSB2
    root@overo:~/modemConnectionExamples# AT+GMR
    08.01.007


    OK


    root@overo:~/modemConnectionExamples# echo -en "AT+GMI\r" > /dev/ttyUSB2
    root@overo:~/modemConnectionExamples# echo -en "AT+GMM\r" > /dev/ttyUSB2
    > /dev/ttyUSB2
    AT+GMI
    Telit


    OK
    root@overo:~/modemConnectionExamples# echo -en "AT+GMR\r" > /dev/ttyUSB2
    tyUSB2
    echo -en "AT&V\r" > /dev/AT+GMM
    UC864-E


    OK
    root@overo:~/modemConnectionExamples# echo -en "AT+GCAP\r" > /dev/ttyUSB2
    root@overo:~/modemConnectionExamples# echo -en "AT+GSN\r" > /dev/ttyUSB2


    08.01.007


    OK
    AT+GCAP
    +GCAP: +CGSM,+DS,+FCLASS,+MS,+ES


    OK
    root@overo:~/modemConnectionExamples# echo -en "AT&V\r" > /dev/ttyUSB2
    cho -en "AT\V\r" > /dev/ttyUSB2
    AT+GSN
    352636021112961


    OK
    AT&V


    DTE SPEED : 115200
    DTE FORMAT : 8N1
    GSM DATA MODE : Not Transparent
    AUTOBAUD : +IPRxxx00=NO
    COMMAND ECHO : E1=YES
    RESULT MESSAGES : Q0=YES
    VERBOSE MESSAGES : V1=YES
    EXTENDED MESSAGES : X1=YES
    LINE SPEED : F0=autodetect
    CONSTANT DTE SPEED : YES
    FLOW CONTROL OPTIONS : &K3=HW bidirect.
    ERROR CORRECTION MODE : RLP
    CTS (C106) OPTIONS : &B2=OFF while disc.
    DSR (C107) OPTIONS : &S3=PHONE ready->ON
    DTR (C108) OPTIONS : &D0=ignored
    DCD (C109) OPTIONS : &C1=follows carrier
    RI (C125) OPTIONS : \R1=OFF dur. off-hk
    C108/1 OPERATION : &D4=NO
    POWER SAVING ON DTR : +CFUN:1=NO
    DEFAULT PROFILE : &Y0=user profile 1


    OK
    root@overo:~/modemConnectionExamples# echo -en "AT&V0\r" > /dev/ttyUSB2
    root@overo:~/modemConnectionExamples# echo -en "AT&V1\r" > /dev/ttyUSB2
    AT&V0


    DTE SPEED : 115200
    DTE FORMAT : 8N1
    GSM DATA MODE : Not Transparent
    AUTOBAUD : +IPRxxx00=NO
    COMMAND ECHO : E1=YES
    RESULT MESSAGES : Q0=YES
    VERBOSE MESSAGES : V1=YES
    EXTENDED MESSAGES : X1=YES
    LINE SPEED : F0=autodetect
    CONSTANT DTE SPEED : YES
    FLOW CONTROL OPTIONS : &K3=HW bidirect.
    ERROR CORRECTION MODE : RLP
    CTS (C106) OPTIONS : &B2=OFF while disc.
    DSR (C107) OPTIONS : &S3=PHONE ready->ON
    DTR (C108) OPTIONS : &D0=ignored
    DCD (C109) OPTIONS : &C1=follows carrier
    RI (C125) OPTIONS : \R1=OFF dur. off-hk
    C108/1 OPERATION : &D4=NO
    POWER SAVING ON DTR : +CFUN:1=NO
    DEFAULT PROFILE : &Y0=user profile 1


    OK
    root@overo:~/modemConnectionExamples# echo -en "AT&V3\r" > /dev/ttyUSB2
    AT&V1


    REG DEC HEX
    000 000 000
    001 000 000
    002 043 02B
    003 013 00D
    004 010 00A
    005 008 008
    007 060 03C
    012 050 032
    025 005 005
    038 020 014


    OK
    root@overo:~/modemConnectionExamples# echo -en "AT&V2\r" > /dev/ttyUSB2
    AT&V3


    REG DEC HEX
    000 000 000
    001 000 000
    002 043 02B
    003 013 00D
    004 010 00A
    005 008 008
    007 060 03C
    012 050 032
    025 005 005
    030 000 000
    038 020 014


    OK
    root@overo:~/modemConnectionExamples# echo -en "AT\V\r" > /dev/ttyUSB2
    AT&V2


    TOTAL CONNECTION TIME : 0:00:12
    DISCONNECT REASON : ATH command


    OK
    root@overo:~/modemConnectionExamples# AT\V
    OK

    Q: Type of module? TER-GX400
    Q: Firmware version?
    Q: Type of starter kit you have? Terminal


    I would like to do create a signal that toggles on receipt of a specific text message, that could be used as a remote system reset. I plan to route the signal to the on/off select of the regulator for my systems cpu board. The modem and the CPU are on different supplies.


    I only plan to reset the cpu, not the modem, I can also live with some setup of the modem by the cpu board at initial boot.


    Does the thread below hold true for the GX400? Does anyone else have any experience of doing this?


    Activating GPIO lines using SMS commands

    Thank you for your help, appreciate it, that did the trick. I now set this at the very start of my chat script.



    #!/bin/sh
    # Connection to the network


    # Set HW flow control off! You need this for 2 line option!
    '' AT&K0


    OK AT+CGDCONT=1,"IP","3internet"


    #for umts connection:
    OK AT+WS46=22
    # Dial the number.
    OK ATD*99***1#
    # The modem is waiting for the following answer
    CONNECT ''

    I am using a real serial port, to a PC running Ubuntu 10.10


    I pretty sure nothing is destroyed, when I reconnect all the signals the interface works correctly and I can connect to the internet. My debug process was to remove all the connections, except for RXD/TXD, until the connection stopped working.


    The signal levels are
    +-10 RTS
    +-10 TXD
    +- 5 RXD
    but this was a crude measurement with a multimeter, I don't have access to an oscilloscope

    Q: Type of module? GX400 terminal
    Q: Firmware version? A:
    Q: Type of starter kit you have? none


    Hi I am trying to debug my serial connection to the GX400. I need to use only the RXD/TXD lines as this is all my 3rd party processor board supplies. I am debugging the connection using a standard desktop, with the serial cable cut to allow me to remove signals.


    The connection works with all pins connected and I can get it operating with just the TXD, RXD and RTS, but I need to get rid of the RTS signal. As soon
    as I remove the RTS signal, I can never connect. I have nocrtscts set in my setup script


    Below are my pppd & chat scripts. What else do I need to do?



    # Debug info from pppd
    debug
    #kdebug 4
    # Most phones don't reply to LCP echos
    lcp-echo-failure 3
    lcp-echo-interval 3
    # Keep pppd attached to the terminal
    # Comment this to get daemon mode pppd
    nodetach
    # The chat script (be sure to edit that file, too!)
    connect "sudo /usr/sbin/chat -v -f /home/joker/scripts/modemConnectionExamples/hsdpaConnection"
    # Serial Device to which the HSDPA phone is connected
    /dev/ttyS0
    # Serial port line speed
    115200
    dump
    # The phone is not required to authenticate
    noauth
    #user prova
    #name prova
    #password prova
    # If you want to use the HSDPA link as your gateway
    defaultroute
    # pppd must not propose any IP address to the peer
    noipdefault
    ipcp-accept-local
    ipcp-accept-remote
    # Keep modem up even if connection fails
    #persist
    # Hardware flow control
    nocrtscts
    # Ask the peer for up to 2 DNS server addresses
    usepeerdns
    # No ppp compression
    novj
    nobsdcomp
    novjccomp
    nopcomp
    noaccomp
    # For sanity, keep a lock on the serial line
    #lock
    # Show password in debug messages
    #show-password



    #!/bin/sh
    # Connection to the network
    '' AT+CGDCONT=1,"IP","3internet"


    #for umts connection:
    OK AT+WS46=22
    # Dial the number.
    OK ATD*99***1#
    # The modem is waiting for the following answer
    CONNECT ''