Hi Yuvi, On 05/16/2011 02:28 AM, Yuvaraj Ragupathi wrote: > Hi All, > > I am trying to add new contact in sim via following sample code > > > static int new_contact(struct ofono_phonebook *pb,char > *num,ofono_phonebook_cb_t cb) > { > struct pb_data *pbd = ofono_phonebook_get_data(pb); > char cmd[50];int return_value; > sprintf(cmd,"AT+CPBW=10,%s,129,Testing", num); > printf("Command is %s\n",cmd); > return_value=g_at_chat_send(pbd->chat,cmd, none_prefix, > NULL,NULL, NULL); > printf("Add New contact number in Sim\n Status is > %d\n",return_value); > return return_value; > } > oFono core does not support adding new contacts to the sim and there are no plans to do so. So I'm not quite sure what you're trying to accomplish here in the first place. If your question is about using GAtChat, then adjust your subject accordingly. > > If i try to add new contact my Return status is 69 or 70 > Your 'return status' is just an ID assigned by GAtChat. GAtChat is _asynchronous_, your command has not been executed yet. If you want to know the result of the operation, provide a proper callback, or at the very least enable AT debug logging. See HACKING for details. Regards, -Denis