vm_gsm_sim_get_imei() function

Moderators: lily.li, violet, jessie, chao.zhang

Post Reply
gary.pitcher
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Wed Dec 30, 2015 3:48 am

vm_gsm_sim_get_imei() function

Post by gary.pitcher » Thu Mar 03, 2016 1:30 am

Hi There,

Has anyone been able to get a valid IMEI number from the vm_gsm_sim_get_imei() function?

I get all zeros every time I try it.

Example:

char t_str[40] = {0};
VMCSTR IMEI;
IMEI = vm_gsm_sim_get_imei(VM_GSM_SIM_SIM1);
sprintf(t_str, "%s",IMEI);
Serial.println(t_str);

Thanks!

Gary

dbelam
Elementary-1
Elementary-1
Posts: 157
Joined: Wed Feb 03, 2016 2:59 am

Re: vm_gsm_sim_get_imei() function

Post by dbelam » Thu Mar 03, 2016 3:34 am

1. Are you running it from the main thread?
2. Is the gsm permission granted?
3. Just curious: you tried that with or without SIM?

gary.pitcher
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Wed Dec 30, 2015 3:48 am

Re: vm_gsm_sim_get_imei() function

Post by gary.pitcher » Thu Mar 03, 2016 4:00 am

Yes, the call is from main and a working SIM is installed...

jinyuan.weng
Pre-kindergarten
Pre-kindergarten
Posts: 33
Joined: Tue Jan 26, 2016 5:17 pm

Re: vm_gsm_sim_get_imei() function

Post by jinyuan.weng » Fri Mar 04, 2016 5:16 pm

Hi,
It is need to use remoteCall() to call vm_gsm_sim_get_imei() on Arduino IDE.
You can make reference to ..\Arduino_IDE_for_RePhone\hardware\arduino\mtk\libraries\LCheckSIM.

gary.pitcher
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Wed Dec 30, 2015 3:48 am

{SOLVED} Re: vm_gsm_sim_get_imei() function

Post by gary.pitcher » Sat Mar 05, 2016 5:45 am

Thank you very much. I made a remote call and it worked perfectly!

Post Reply