Maestro Wireless Solutions
            Knowledge Base Maestro Wireless Solutions Modems

            mPack AutoTCP use case

            Set serial baudrate and configuration

            AT#SERIAL=9600,"8N1",1
            AT#SERIAL=(baud),(char_framing),(flow_ctrl)
            • baud: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
            • char_framing: "8N1", "8N2", "9O1", "9E1"
            • flow_ctrl:
              • 1 = disable
              • 2 = enable

            Set APN

            AT#IPCELLULAR=1,"soracom.io","sora","sora",1
            AT#IPCELLULAR=1,(APN),(username),(password),(cid)
            • APN: max 64 char, in quotes
            • username: max 25 char, in quotes. If unspecified, "*" is assumed.
            • password: max 25 char, in quotes. If unspecified, "*" is assumed.
            • cid

            Set TCP server IP and port

            AT#IPTCP=1,60000,"C","162.242.170.49"
            AT#IPTCP=(idx),(port),(mode),(ip)
            • idx:
              • 1 = RS-232 port
              • 2 =  USB port
            • port: from 0 to 65535
            • mode:
              • "C" = Modem as client to remote server
              • "S" = Modem as server for remote client to connect
            • ip: IP address of the remote partner (IPv4 dotted notation)

            Set automatic TCP connection

            AT#AUTOTCP=1
            AT#AUTOTCP=(mode)

            • mode:
              • 0 = AUTOTCP connection OFF
              • 1 = AUTOTCP connection ON

            Test case

            AT#SERIAL=9600
            OK
            AT#IPCELLULAR=1,"soracom.io","sora","sora"
            OK
            AT#IPTCP=1,60000,"C",162.242.170.49
            OK
            AT#AUTOTCP=1
            OK
            AT#RESET

            after reset and ~20s

            CONNECT

            type @TEST!

            @TEST,OK!


            Use IPPING along AUTOTCP to ensure the connection is steady and available at all time

            step1: Configure ping using "AT#IPOPT" command

            AT#IPPING=2,"1.1.1.1",4,10,10000
            AT#IPPING=(option),(address),(num),(interval),(timeout)
            • option:
              • 0,1 = (reserved)
              • 2 = configure ping address and parameters
            • address: IP address of the target to be pinged. Can be set as an IPv4 format (xxx.xxx.xxx.xxx) or as a dom URL (i.e. domain.com)
            • num: numbers of ping trials for each ping action. Default value is 3.  Valid range is 1 to 10.
            • interval: time in seconds between each ping trial. Default value is 3.  Valid range is 1 to 10.
            • timeout: time in ms before ping is timed out. Default value is 10. Valid range is 5000 to 60000.

            step2: enable periodic ping

            AT#IPOPT=4,10,1
            AT#IPOPT=4,(time_period),(action)
            • time_period: time in seconds between 1 to 65535. If 0 ping is disabled.
            • action: specify the actions to be taken if ping is failing
              • 0 nothing
              • 1 disconnect the data connectivity, and let AUTOTCP reinitiate the link.
              • 2 reset the mPack.

            Updated: 22 Nov 2018 12:50 AM
            Helpful?  
            Help us to make this article better
            0 0