How to make a phone call with Particle Electron

I want to make a call with Particle Electron by using AT Commands.

but AT Commands are very complicated for me, so is there any sample source for this?

Have you looked at the sample code in the docs?

After that you may find some inspiration in one of the threads dealing with Cellular.commamd() already, by use of the forum search feature

1 Like

Thank you so much. but i’ve been tried search for this thread with Cellular.command( ) before, but failed to find some example what i want.

There are a couple problems making voice phone calls from an Electron. One is that the Particle SIM does not support SMS or voice, so you’ll need to use a 3rd-party SIM card. The other is that while the u-blox modem supports voice, as far as I know the SARA line only uses the I2S digital audio interface for its audio up-link and down-link. The problem is that while there is an I2S interface on the Electron data sheet, that is the STM32F205 I2S interface, not the u-blox I2S interface. I think the u-blox I2S interface is not connected. I’m not saying it’s definitely impossible, but it’s certainly very difficult, and may indeed be impossible.

1 Like

Thank you for your answers rickkas7

i actually don’t need to communicate with actual voice call.
let me explain in simple.

( now i’m using 3rd-party SIM card and registered completed )

now i have plan to make push emergency signal from some machine.

here is the scenario.

  1. machine got error and push the signal to Electron.
  2. Electron make a call to my mobile phone.
  3. my phone ringing…
  4. i recognized the error because my mobile phone show the phone number of my 3rd-party SIM card.

that’s why i need some example for this

And you also forgot to mention what exactly you wanted, hence the rather general answer.
Clarifying the above might have helped right from the beginning :wink:

For such things you’d need to consult the ublox AT commands datasheet, since I’m not aware of a thread that dealt with that already.

@luke906, are you still looking for a solution or have you found one already?

1 Like

yes i am trying to so far…

The reason I ask is, because I took your idea, went ahead and came up with this rather simple approach

SerialLogHandler log;

int placeCall(const char* telNr, uint32_t duration = 30000)
  int  ret;

  if (!strlen(telNr)) return -1;

  if (!Cellular.ready())
    if (!waitFor(Cellular.ready, 300000))
      Log.warn("no radio connection");
      return -1;

  if ((ret = Cellular.command("ATD%s;\r\n", telNr)) == RESP_OK)
  {"Call pending");
    Cellular.command("AT+CHUP\r\n");"Hung up");
    Log.warn("Call not possible (%d)", ret);

  return ret;

Why not just use Ubidots and send the status of your machine to a variable. Then you can set an SMS Text Message Alert with a custom message to let you know an error condition has been triggered on a machine.

Just trigger an SMS message to be sent anytime a variable goes over a certain number like 1 vs. 0, or any time a variable goes over any particular number.

This is better than just getting a phone call from a specific number because the SMS message will contain a specific message about what is going on.

You can trigger voice recording calls by interfacing with Twilio but that I have not tried yet so I can’t say how hard or easy that process is. Ubidots is super easy for this.

I get an SMS message anytime my Electron’s battery level goes below 22% - saying it’s about to go into deep sleep mode, and then also when the battery is fully charged with a text saying the battery has been fully charged via solar power.

You can have it send an Email alert also which is free. SMS message cost a few cents after you go over the free SMS messages they give you.

1 Like

thank you very much ScruffR.
i will try soon and then tell you the rsults.

thanks a lot !!

1 Like

Thank you for your kind answers RWB.
the reason i try to using method CALL is that SMS messages could be missed.
if i were in situation very noisy i could miss the SMS messages.

thank you anway RWB ^^