• AVR Freaks

Hot!Connect SIM800L and AT&T Chip to the Cellular Network

Author
PROGRAMMER ID
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2018/07/19 11:07:05
  • Location: 0
  • Status: offline
2020/01/07 17:16:44 (permalink)
0

Connect SIM800L and AT&T Chip to the Cellular Network

First I am in Mexico. I want to connect the SIM800L module to the cellular network to be able to make HTTP requests with GET and POST, I have an AT&T chip. But I can't perform the initial configuration, these are my commands.
AT + SAPBR = 3.1, "CONTYPE", "GPRS"
AT + SAPBR = 3.1, "APN", "INTERNET"
AT + SAPBR = 1.1
AT + SAPBR = 2.1
AT + CLTS = 1
I hope you can help me, or comment if someone has managed to communicate for HTTP.
Thanks and regards
#1

15 Replies Related Threads

    jtemples
    عُضْوٌ جَدِيد
    • Total Posts : 11661
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: Connect SIM800L and AT&T Chip to the Cellular Network 2020/01/07 17:39:00 (permalink)
    +2 (2)
    I can't perform the initial configuration

     
    What does that mean?  Do you get errors?  Do you get no response?  Do you have any indication that the the module is powered?  Show your PIC software.
    #2
    PROGRAMMER ID
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/07/19 11:07:05
    • Location: 0
    • Status: offline
    Re: Connect SIM800L and AT&T Chip to the Cellular Network 2020/01/08 10:21:28 (permalink)
    -1 (1)
    Thanks "jtemples":
     
    I tell you that I have connected the module directly to the PC by UART. My specific question is towards the AT command "AT + SAPBR = 2.1" because it does not assign me an IP address.
     
    RDY
    +CFUN: 1
    +CPIN: READY
    Call Ready
    SMS Ready
    AT+SAPBR=3,1,"CONTYPE","GPRS"
    OK
    AT+SAPBR=3,1,"APN","INTERNET"
    OK
    AT+SAPBR=1,1
    ERROR
    AT+SAPBR=2,1
    +SAPBR: 1,3,"0.0.0.0"
    OK
    AT+CLTS=1
    OK
     
    So, when using AT commands to make HTTP requests it always generates an error on the network. There is something wrong with the network configuration and I don't know what it is, I hope you can help me.
     
    Thanks and Regards
    #3
    ric
    Super Member
    • Total Posts : 25992
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: Connect SIM800L and AT&T Chip to the Cellular Network 2020/01/08 12:48:42 (permalink)
    +2 (2)
    So why is this question on a Microchip Technology forum, specifically in the "PIC Microcontrollers (PIC10F, PIC12F, PIC16F, PIC18F)" area?
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #4
    katela
    Super Member
    • Total Posts : 1623
    • Reward points : 0
    • Joined: 2013/06/11 05:25:18
    • Location: South Africa
    • Status: offline
    Re: Connect SIM800L and AT&T Chip to the Cellular Network 2020/01/08 15:55:06 (permalink)
    0
    PROGRAMMER ID
     
    I tell you that I have connected the module directly to the PC by UART. My specific question is towards the AT command "AT + SAPBR = 2.1" because it does not assign me an IP address. 
     

    Then the problem is not a PIC microcontroller software issue, it could be the SIM800L problem (Network configuration settings you are supposed to get from your cellular network or your AT commands are wrong, etc. ).
    The SIM800L is not a Microchip device.
     

    Free online Microcontroller Tutorials and Projects for Hobbyists and students. From beginners to advanced. Website: www.studentcompanion.co.za
    YouTube Tutorials: https://www.youtube.com/StudentCompanionSA
    #5
    PROGRAMMER ID
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/07/19 11:07:05
    • Location: 0
    • Status: offline
    Re: Connect SIM800L and AT&T Chip to the Cellular Network 2020/01/08 16:14:03 (permalink)
    +1 (1)
    Thanks "ric" and "katela":
     
    I am using a PIC18F45K50 to make HHTP requests with the SIM800L module, the detail is that when reading the response of the serial port, I get the following message "+ SAPBR: 1,3," 0.0.0.0 "that does not allow to connect to the network, so I started testing the SIM800L module independently generating the answers I mentioned.
     
    Thanks and Regards
    #6
    katela
    Super Member
    • Total Posts : 1623
    • Reward points : 0
    • Joined: 2013/06/11 05:25:18
    • Location: South Africa
    • Status: offline
    Re: Connect SIM800L and AT&T Chip to the Cellular Network 2020/01/08 16:32:47 (permalink)
    0
    If by connecting it directly to PC you are still unable to connect to the network, then it's got nothing to do with the PIC18F45K50 code.

    Free online Microcontroller Tutorials and Projects for Hobbyists and students. From beginners to advanced. Website: www.studentcompanion.co.za
    YouTube Tutorials: https://www.youtube.com/StudentCompanionSA
    #7
    pcbbc
    Super Member
    • Total Posts : 1614
    • Reward points : 0
    • Joined: 2014/03/27 07:04:41
    • Location: 0
    • Status: online
    Re: Connect SIM800L and AT&T Chip to the Cellular Network 2020/01/08 23:35:37 (permalink)
    0
    The SIM works if you put it in another device?
    e.g. mobile / tablet / PC dongle ?
    I’ve never used this module, but that is where I would start.
     
    Your problem is earlier than AT+SAPBR=2,1 


    Looks to me (from a google of your initialisation sequence and brief reference to some SIM800L documentation) like the attempt to enable GPRS is failing...
    AT+SAPBR=1,1 
    ERROR

    Where did you get that initialisation sequence from?
    Set the APN to to “www” since i am using a Vodafone SIM card, It might be different for you, and depends on the network
    AT+SAPBR=3,1,”APN”,”www”
    OK
     
    Enable the GPRS
    AT+SAPBR =1,1
    OK
     
    Query if the connection is setup properly, if we get back a IP address then we can proceed
    AT+SAPBR=2,1
    +SAPBR: 1,1,”100.120.204.132″
    OK

     
    Really you should be asking on a forum with some SIM800L users. You’re not going to find many here.
    post edited by pcbbc - 2020/01/08 23:40:12
    #8
    karsen
    Starting Member
    • Total Posts : 65
    • Reward points : 0
    • Joined: 2012/02/07 01:49:31
    • Location: Bangalore
    • Status: offline
    Re: Connect SIM800L and AT&T Chip to the Cellular Network 2020/01/09 01:55:30 (permalink)
    0
    i cant post 
    #9
    ric
    Super Member
    • Total Posts : 25992
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: Connect SIM800L and AT&T Chip to the Cellular Network 2020/01/09 02:43:39 (permalink)
    0
    karsen
    i cant post 


    ??
    You can't post something here? (See : Expressions which trigger the firewall )
    or you can't post on another suitable forum?
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #10
    pcbbc
    Super Member
    • Total Posts : 1614
    • Reward points : 0
    • Joined: 2014/03/27 07:04:41
    • Location: 0
    • Status: online
    Re: Connect SIM800L and AT&T Chip to the Cellular Network 2020/01/09 03:31:37 (permalink)
    0
    ric
    karsen
    i cant post 


    ??
    You can't post something here?
    or you can't post on another suitable forum?

    Indeed - but karsen's not the OP
    #11
    ric
    Super Member
    • Total Posts : 25992
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: Connect SIM800L and AT&T Chip to the Cellular Network 2020/01/09 03:37:46 (permalink)
    0
    Good point.
    Plainly they did manage to post into a new thread.
    https://www.microchip.com/forums/m1124138.aspx
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #12
    PROGRAMMER ID
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/07/19 11:07:05
    • Location: 0
    • Status: offline
    Re: Connect SIM800L and AT&T Chip to the Cellular Network 2020/01/09 11:20:29 (permalink)
    +1 (1)
    Thanks "pcbbc":
     
    The SIM works on my cell phone, I can access the internet, make calls and send messages as I have an AT&T rental plan.
     
    I obtained the sequence from the internet and it has helped me to communicate to the network using a SIM800L module with a SIM from the TELCEL company, but when using the same sequence with a SIM800L module but with my SIM from the AT&T company I cannot.
     
    I know that the "AT + SAPBR = 1.1" command should answer OK and the "AT + SAPBR = 2.1" command should assign me an IP address, I know because I have done it with the TELCEL company SIM, but with AT&T not yet.
     
     
    Thanks and Regards
    #13
    btommo
    Senior Member
    • Total Posts : 136
    • Reward points : 0
    • Joined: 2017/07/07 02:59:33
    • Location: 0
    • Status: online
    Re: Connect SIM800L and AT&T Chip to the Cellular Network 2020/01/09 12:59:33 (permalink)
    0
    Hi PROGRAMMER ID, I'm currently experimenting with a SIM900(which is near end of life unfortunately) Module, the commands are the same. On the Simcom website there are app notes for the device from which I used the TCPIP application note and was able to connect to a Cellular network and obtain an IP address. The SAPBR command is used in the GSM location APP note relating to bearer profile and AT+SAPBR = 2,1 reads bearer paramer AT+CIICR brings up wireless connection and AT+CIFSR gets local IP address. I'll probably move on to SIM800 soon....

    Edit: there's also an IP app note on the SIMCOM website which seems to use the initialisation in your first post and steps for HTTP POST and HTTP GET. Also please ignore the information on TCPIP as I imagine you would want to follow IP APP note
    post edited by btommo - 2020/01/10 03:04:57
    #14
    PROGRAMMER ID
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/07/19 11:07:05
    • Location: 0
    • Status: offline
    Re: Connect SIM800L and AT&T Chip to the Cellular Network 2020/01/10 16:36:28 (permalink)
    0
    Thanks "btommo":
     
    I have a SIMCOM account, I will verify the documentation for the SIM800L.
     
    Thanks and Regards
    #15
    btommo
    Senior Member
    • Total Posts : 136
    • Reward points : 0
    • Joined: 2017/07/07 02:59:33
    • Location: 0
    • Status: online
    Re: Connect SIM800L and AT&T Chip to the Cellular Network 2020/01/20 09:43:31 (permalink)
    0
    Also note that the sun is setting on 2G and 3G networks to make way for 5G and some networks have started to shut down, I've had to think of moving to 4G SIM7500/7600 which has quite a bit of a price difference, Thought it may be worth mentioning to anyone searching this in future.
    #16
    Jump to:
    © 2020 APG vNext Commercial Version 4.5