This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Interface a GSM Modem and 8051 and retrieve decoded SMS

Hi everyone,

Is there any way in which I can interface a GSM modem with a 8051 and retrieve the decoded SMS. The motivation behind this is that... even if i can get the encoded SMS from the GSM modeme using AT commands, the decoding complexity is very high for a 8051. And I think the GSM module should have some kind of decoding code (using this would be benificial and reduce code complexity for 8051)

Also please let me know exactly how to interface the GSM modem to 8051. I dont want a PC interface in between.

Please help me out..

Sambit
NIT ROURKELA

Parents
  • Appology please
    here is bad code

    unsigned char mmc_init(void)
    {
      unsigned int i;
      unsigned char response;
    
            MMC_CS_TRIS=0;
            MMC_VCC_KEY_TRIS=0; //out
            MMC_VCC_KEY=0; //MMC power ON
            MMC_DOUT_TRIS=1; //input
    
            MMC_DOUT_TRIS = 1;      // dout as input.
            MMC_CS_TRIS = 0;        // CS as output.
            MMC_CLK_TRIS = 0;       // CLK as output.
            MMC_DI_TRIS = 0;   // DI as output
            MMC_CLK = 1;
    
      mmc_powerup();
      mmc_unselect();
    
      for(i = 0; i < 10; ++i)
        mmc_read_write(0xFF);
    
      /* address card */
      mmc_select();
    
      /* reset card */
      for(i = 0; ; ++i)
      {
        response = mmc_send_command_r1(CMD_GO_IDLE_STATE, 0);
        if(response == 1)
          break;
    
        if(i == 0x1ff)
        {
          mmc_unselect();
          return 0;
        }
      }
    
      /* wait for card to get ready */
      for(i = 0; ; ++i)
      {
        response = mmc_send_command_r1(CMD_SEND_OP_COND, 0);
        if(!(response & 1))
          break;
    
        if(i == 0x7fff)
        {
          mmc_unselect();
          return 0;
        }
      }
    
      /* set block size to 512 bytes */
      if(mmc_send_command_r1(CMD_SET_BLOCKLEN, 512))
      {
        mmc_unselect();
        return 0;
      }
    
      /* deaddress card */
      mmc_unselect();
    
      raw_block_address = 0xffffffff;
    
      if(!mmc_read(0))
        return 0;
    
      return 1;
    }
    

Reply
  • Appology please
    here is bad code

    unsigned char mmc_init(void)
    {
      unsigned int i;
      unsigned char response;
    
            MMC_CS_TRIS=0;
            MMC_VCC_KEY_TRIS=0; //out
            MMC_VCC_KEY=0; //MMC power ON
            MMC_DOUT_TRIS=1; //input
    
            MMC_DOUT_TRIS = 1;      // dout as input.
            MMC_CS_TRIS = 0;        // CS as output.
            MMC_CLK_TRIS = 0;       // CLK as output.
            MMC_DI_TRIS = 0;   // DI as output
            MMC_CLK = 1;
    
      mmc_powerup();
      mmc_unselect();
    
      for(i = 0; i < 10; ++i)
        mmc_read_write(0xFF);
    
      /* address card */
      mmc_select();
    
      /* reset card */
      for(i = 0; ; ++i)
      {
        response = mmc_send_command_r1(CMD_GO_IDLE_STATE, 0);
        if(response == 1)
          break;
    
        if(i == 0x1ff)
        {
          mmc_unselect();
          return 0;
        }
      }
    
      /* wait for card to get ready */
      for(i = 0; ; ++i)
      {
        response = mmc_send_command_r1(CMD_SEND_OP_COND, 0);
        if(!(response & 1))
          break;
    
        if(i == 0x7fff)
        {
          mmc_unselect();
          return 0;
        }
      }
    
      /* set block size to 512 bytes */
      if(mmc_send_command_r1(CMD_SET_BLOCKLEN, 512))
      {
        mmc_unselect();
        return 0;
      }
    
      /* deaddress card */
      mmc_unselect();
    
      raw_block_address = 0xffffffff;
    
      if(!mmc_read(0))
        return 0;
    
      return 1;
    }
    

Children
No data