vm_gsm_sim_get_imei() function

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

  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?

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

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.

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