Reputation: 23
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?
Upvotes: 2
Views: 2928
Reputation: 34592
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...
Upvotes: 1