The arduino is supposed to make a phone call through the sim HAT as shown through the code shown above, presumably through the TX RX connections
Serial.begin(9600);
sim7600.PowerOn(POWERKEY);
sim7600.PhoneCall(phone_number);
This is the code for the poweron and phonecall functions
/**************************Power on Sim7x00**************************/
void Sim7x00::PowerOn(int PowerKey = powerkey){
uint8_t answer = 0;
Serial.begin(9600);
// checks if the module is started
answer = sendATcommand("AT", "OK", 2000);
if (answer == 0)
{
Serial.print("Starting up...\n");
pinMode(PowerKey, OUTPUT);
// power on pulse
digitalWrite(PowerKey, HIGH);
delay(500);
digitalWrite(PowerKey, LOW);
// waits for an answer from the module
while (answer == 0) { // Send AT every two seconds and wait for the answer
answer = sendATcommand("AT", "OK", 2000);
delay(1000);
}
}
delay(5000);
while ((sendATcommand("AT+CREG?", "+CREG: 0,1", 500) || sendATcommand("AT+CREG?", "+CREG: 0,5", 500)) == 0)
delay(500);
}
/**************************Phone Calls**************************/
void Sim7x00::PhoneCall(const char* PhoneNumber) {
char aux_str[30];
// Serial.print("Enter the phone number:");
// scanf("%s", PhoneNumber);
sprintf(aux_str, "ATD%s;", PhoneNumber);
sendATcommand(aux_str, "OK", 10000);
// press the button for hang the call
//while (digitalRead(button) == 1);
delay(20000);
Serial.println("AT+CHUP"); // disconnects the existing call
Serial.print("Call disconnected\n");
}
/**************************SMS sending and receiving message **************************/
I'm guessing it stalls at the answer = sendATcommand("AT", "OK", 2000); line
The connections are based off this link of a connected older version of the sim
The gray wire is removed in my connections because pwr and 3.3v pins on the hat are jumpered together which turns it on automatically.