How to send imei number to phone via sms

Haii everyone,
I want to know how to send imei number of a gsm device to phone via sms. I tried it in one way.
After AT+CMGF=1(text mode), i am writing my number AT+CMGS="+91xxxxxxxxxx"\r" and then i am sending imei number with the help of AT+CGSN command. But it is taking this as string and i am getting AT+CGSN as massage coz i set it to text mode. can anyone say how i should pass this command so that i can get the imei number value of a particular device as message.

first store your imei number in a variable,then convert your string into long or long into string vice-verse. after that send it as you wish

1 Like

thank you. I got it.