No SIM detected

Hi,

recently i get out my RePhone Geo Kit from the shelf and tried to do some basic experiments. The Xadow GSM+BLE module seems to work at least partly because i can access the mass storage and copied the “Create Kit” demo application on it. Because i also got the LCD and other modules the demo started and i see the main menu. I can touch it and see the sensor data for example. But the sim seems not to be detected at all. I tried the sim in my smartphone and it worked without problems. I also disabled the pin and tried to level up the pins on the sim socket for a better connection. But no matter what i try the sim card is not detected. I also tried a second sim card from another provider but i have the same problem.

Than i wrote a very little test program which should only query the sim card and i get the result that no sim card is available. The function vm_gsm_sim_has_card() returns 0 and vm_gsm_sim_get_active_sim_card() returns -103.

Now i don’t know what else i should try to get the sim card recognized. I hope somebody has a clue what could be wrong with my approach.

Here is my very basic test program for the arduino ide where i use the low-level routines to access the sim card:

#include "Arduino.h"
#include "vmgsm_sim.h"

void setup() {
	Serial.begin(115200);
}

void loop() {
	int has_card;
	int sim_id;
	int sim_status;
	const signed char* imei;
	signed char home_plmn[7];
	signed char network_plmn[7];
	int plmn_status;
	const signed char* imsi;
	int counter;

	// Delay for the serial connection to be opened on the pc side
	for (counter = 20; counter > 0; counter--) {
		Serial.printf("Waiting: %d\n", counter);
		delay(1000);
	}

	has_card = vm_gsm_sim_has_card();
	Serial.printf("vm_gsm_sim_has_card: %d\n", has_card);

	sim_id = vm_gsm_sim_get_active_sim_card();
	Serial.printf("vm_gsm_sim_get_active_sim_card: %d\n", sim_id);

	if (sim_id == VM_GSM_SIM_SIM1) {
		sim_status = vm_gsm_sim_get_card_status(VM_GSM_SIM_SIM1);
		Serial.printf("vm_gsm_sim_get_card_status: %d\n", sim_status);

		imei = vm_gsm_sim_get_imei(VM_GSM_SIM_SIM1);
		Serial.printf("vm_gsm_sim_get_imei: %s\n", imei);

		plmn_status = vm_gsm_sim_get_home_plmn(VM_GSM_SIM_SIM1, home_plmn, 7);
		Serial.printf("vm_gsm_sim_get_home_plmn: %d,%s\n", plmn_status, home_plmn);

		imsi = vm_gsm_sim_get_imsi(VM_GSM_SIM_SIM1);
		Serial.printf("vm_gsm_sim_get_imsi: %s\n", imsi);

		plmn_status = vm_gsm_sim_get_network_plmn(VM_GSM_SIM_SIM1, home_plmn, 7);
		Serial.printf("vm_gsm_sim_get_network_plmn: %d,%s\n", plmn_status, home_plmn);
	}

	while(1);
}

Ciao,
Rainer

Hi~

You can dowmload this Arduino:https://github.com/Seeed-Studio/Arduino_IDE_for_RePhone
Then open the example: https://github.com/Seeed-Studio/Arduino_IDE_for_RePhone/tree/master/hardware/arduino/mtk/libraries/LGSM/examples/sms_test
However, an error occurs at compile time,it is some thing about “endSMS”. Don’t worry, open this two file:LGSM.h and LSMS.cpp https://github.com/Seeed-Studio/Arduino_IDE_for_RePhone/tree/master/hardware/arduino/mtk/libraries/LGSM. Find all “sendSMS” and change to “endSMS” and save files.
Now, compile and try to use your SIM card send a messageto your friend.

Hi,

thanks for the hint. I tried the sms and call demos and they work. :smiley:

So it seems that somehow the more complex demo from the create kit is not working for me and my test with the low level functions does also not work. But the two simple demos work. Maybe i can’t just call the low level functions the way i do. :open_mouth:

But now i have a starting point from where i can go on and find the correct way to use these functions.

Ciao,
Rainer