2

One of my internet connections is via a USB dongle. As well as accessing the internet I can use the SIM card contained inside to send SMS texts in the exact same fashion as a SIM card housed in my mobile phone. (I know, I really am a technical superhero...)

Anyway, I wish to be able to send a message at a pre-determined time. The ability to send an SMS when a specific incident occurs would be preferable but is not essential.

Preferably there will be some C++ library just waiting to do all the work for me, although any pointing in the right direction would be welcome.

Could some kind soul point me towards how I can automate this process?

Unz
  • 23
  • 1
  • 3

1 Answers1

1

You could look into the AT commands as that is how it works. By sending an AT command to the usb dongle, one could send a text, the ability to send a message at a pre-determined time would have to be implemented logically in the code outside of the communications with the usb dongle. Something like this in pseudo code

while (true or !quit){
   getcurrenttime(&time);
   if (time == specified_time){
      send_command("This is a sample message", "12345678", &result);
      if (result == true){
         print "Sent a message to 12345678";
      }
   }
   sleep(1);
}

That would be how you can send a message at a pre-determined time...as for the AT commands have a look here...since the usb dongle would be treated as a serial interface, it's a matter of writing to the serial port...

t0mm13b
  • 34,087
  • 8
  • 78
  • 110
  • Can you please help me here - http://stackoverflow.com/questions/16333783/how-to-send-sms-through-dongle-using-c?noredirect=1#comment23395575_16333783. It seems like the same answer, but I need more help. Please help! – PeakGen May 02 '13 at 13:07