🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    COM.LTE (SIM7600G) HTTPINIT error

    Modules
    2
    7
    12.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      Veto6017
      last edited by

      Hi,

      Using the AT+HTTPINIT command returns ERROR but I don't know why. The same code worked without problems when I had a 4G connection but now with 3G it doesn't work. Please see the log below:

      Module Reset, please wait
      
      RDY
      
      +CPIN: READY
      
      SMS DONE
      
      PB DONE
      AT+CPIN?
      +CPIN: READY
      
      OK
      AT+CSQ
      +CSQ: 20,99
      
      OK
      AT+CGREG?
      +CGREG: 0,5
      
      OK
      AT+COPS?
      +COPS: 0,0,"Swisscom Things Mobile",2
      
      OK
      AT+HTTPINIT
      ERROR
      
      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by felmue

        Hello @Veto6017

        did you check if the SIM7600G has received an IP address using AT+CGPADDR?

        also did you try to issue an AT+HTTPTERM command, maybe HTTP was already initialised?

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • V
          Veto6017
          last edited by

          Hi Felix,

          AT+CGPADDR
          +CGPADDR: 1,0.0.0.0
          
          OK
          AT+HTTPTERM
          ERROR
          

          Thanks,
          Roger

          1 Reply Last reply Reply Quote 0
          • felmueF
            felmue
            last edited by

            Hello @Veto6017

            ok, so for whatever reason the SIM7600G did not receive an IP address. That is probably the reason HTTP init fails.

            Have you set the APN? Maybe the 3G APN is different from the 4G APN?

            Thanks
            Felix

            GPIO translation table M5Stack / M5Core2
            Information about various M5Stack products.
            Code examples

            1 Reply Last reply Reply Quote 0
            • V
              Veto6017
              last edited by Veto6017

              Hi Felix,

              I'm using a SIM card from thingsmobile and as far as I understand the APN should always be the same. I've just contacted the thingsmobile support and they did a SIM reset. Sadly I'm now always getting a 4G connection and everything works fine.

              I've tried with AT+CNMP=48 to disable LTE connections to further debug but the setting is reset after AT+CRESET and also after a power reset. Although the manuals states: The set value will retain after module reset. I'm able to execute AT+HTTPINIT after changing preferred mode selection but I want to try it after a reset.

              Do you have an idea how I can force the SIM7600 to connect using 3G?

              Please also see the logs below.

              Thanks, Roger

              Changing APN without success
              AT+CGDCONT=1,"IP","TM"
              OK
              
              AT+CGPADDR
              +CGPADDR: 1,0.0.0.0
              
              OK
              AT+CGDCONT=?
              +CGDCONT: (1-24),"IP",,,(0-2),(0-4),(0-1),(0-1)
              +CGDCONT: (1-24),"PPP",,,(0-2),(0-4),(0-1),(0-1)
              +CGDCONT: (1-24),"IPV6",,,(0-2),(0-4),(0-1),(0-1)
              +CGDCONT: (1-24),"IPV4V6",,,(0-2),(0-4),(0-1),(0-1)
              
              When I have a 4G connection it works
              AT+CGPADDR
              +CGPADDR: 1,10.118.92.113
              
              OK
              
              AT+COPS?
              +COPS: 0,0,"Swisscom Things Mobile",7
              
              OK
              
              AT+HTTPINIT
              OK
              
              Changing Preferred mode selection
              
              AT+CNMP?
              +CNMP: 2
              
              OK
              AT+CNMP=48
              OK
              AT+CNMP?
              +CNMP: 48
              
              OK
              AT+COPS?
              +COPS: 0,0,"Swisscom Things Mobile",2
              
              OK
              AT+HTTPINIT
              OK
              
              1 Reply Last reply Reply Quote 0
              • V
                Veto6017
                last edited by

                When I use AT+CNMP=48 to disable LTE connections and then check the current IP address using AT+CGPADDR shows no IP (0.0.0.0) but calling AT+HTTPINIT works without an error and after this command I've got a valid IP (see the log below). I will check the device in the field again on the end of this week.

                AT+COPS?
                +COPS: 0,0,"Swisscom Things Mobile",7
                
                OK
                AT+CGPADDR
                +CGPADDR: 1,10.118.68.169
                
                OK
                AT+CNMP=48
                OK
                AT+CGPADDR
                +CGPADDR: 1,0.0.0.0
                
                OK
                AT+CGPADDR
                +CGPADDR: 1,0.0.0.0
                
                OK
                AT+COPS?
                +COPS: 0,0,"Swisscom Things Mobile",2
                
                OK
                AT+CGPADDR
                +CGPADDR: 1,0.0.0.0
                
                OK
                AT+HTTPINIT
                OK
                AT+CGPADDR
                +CGPADDR: 1,10.109.3.47
                
                OK
                
                1 Reply Last reply Reply Quote 0
                • felmueF
                  felmue
                  last edited by

                  Hello @Veto6017

                  thank you for reporting back - this is quite interesting.

                  I used AT+COPS=1,2,"22802",2 to manually select UTRAN (2) instead of EUTRAN (7).
                  Note: "22802" is provider Sunrise in Switzerland.
                  BTW: AT+COPS=0 gets you back to automatic selection.

                  Thanks
                  Felix

                  GPIO translation table M5Stack / M5Core2
                  Information about various M5Stack products.
                  Code examples

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post