Finally, transfers over TCP are working with the SM5100B!!

Thanks to some help from a blog post about GPRS with the SM5100B Arduino GSM Shield by Hadley Rich I was finally able to get the TCP connection working. I will add more details on this when I get time.

Here is a screen shot of the shield transmitting the byte character “B” followed by CR and LF to a Perl TCP server running on my PC, and then receiving one copy of the message “[9212]AsYouWish” in return for each byte.


2 thoughts on “Finally, transfers over TCP are working with the SM5100B!!

  1. Please can you publish more information about send information to SM5100B from Arduino, I´m try to send this

    cell.print(“AT+SDATATSEND=1,1”); //Send one character
    cell.print(13,BYTE); //Send CR
    cell.print(79, BYTE); //Send character O
    cell.print(13, BYTE); //Send CR
    cell.print(10, BYTE); //Send el LF

    cell.print(26, BYTE); //Envio el Ctrl+Z //Send

    That returns the error: CME ERROR:29.

    What has been the problem????

    Thanks and congratulation for put works the SM5100.

    • You seem to be using SDATATSEND instead of SDATASEND which I think only takes text data followed by CR+LF. I have instead been using SDATASEND, with which you need to convert your data before sending, and I think is better suited for HTTP which required sending CR+LF.

      So for example if you want to send the character “G” you will first send the following text followed by CR+LF:


      Then you will receive CR+LF followed by a prompt “> ” from the modem.

      Next you need to the ascii codes for the hex converted data. So in this case G = 0x47. So we will send the ascii byte for 4, which is 52, followed by ascii byte for 7, which is 55. Note that we are sending two bytes which is why we specified 2 as the length with the SDATASEND command.

      cell.print(52, BYTE); cell.print(55, BYTE);

      And then to indicate that you are done send a single byte with the decimal value 26.

      cell.print(26, BYTE);

      That should hopefully work.

      I have been using this website to convert my HTTP messages from text to this hex format:

      I was able to figure this out thanks to help from here:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s