MC60 Bluetooth connectivity

//SPP send data
if(0 == Ql_strncmp(m_RxBuf_Uart1,“send=”,5))
{
u8 *p1,*p2;
u16 send_size;
BT_DEV_HDL BTDevHdl=0;

                p1 = m_RxBuf_Uart1+5;
                p2 = Ql_strstr(m_RxBuf_Uart1,",");
                if( p1 && p2)
                {
                    u8 str[11] = {0}; 
                    Ql_strncpy((char*)str,(char*)p1,p2-p1);
                    BTDevHdl = strtoul(str,NULL,16);

                }
                else
                {
                     APP_DEBUG("Invalide para.\r\n");
                }
                
                p1 = p2+1;
                p2 = Ql_strstr(p1,"\r\n");
                send_size = Ql_strlen(p1);
                if(p2)
                {
                    send_size = Ql_strlen(p1)-2;
                }
                
                if(0 == send_size)
                {
                    APP_DEBUG("No data for send.\r\n");
                    break;
                }
                send_size = send_size <= BL_RX_BUFFER_LEN ? send_size : BL_RX_BUFFER_LEN;
                Ql_strncpy(SppSendBuff,p1,send_size);
                ret = RIL_BT_SPP_Send(BTDevHdl,SppSendBuff,send_size,NULL);

                if(RIL_AT_SUCCESS == ret)
                {
                    APP_DEBUG("Send successful.\r\n");
                }
                else
                {
                    APP_DEBUG("Send failed.\r\n");
                }

                break;
            }