I was searching how to send and receive SMS and I have searched a lot starting with how to do it on Linux. All I have found is libudev. I'm confortable with C/C++ so I hope it will fit me. However I'm not sure if libudev can enable me connect to a phone/modem and allow me send commands, So I though I would ask here: Is libudev+AT commands a good option? If yes I would appreciate tutorials on how to send command to a USB Modem/Phone. It is C/C++ of course Thanks
Let me first clarify few things:
/dev
.So, back to your question. You can use libudev to find the modem among your other devices programmatically. In this case, udev might have created something like /dev/ttyUSB0
for that device. You can also use udevadm
command line tool for querying devices.
When you've got the right device, sending commands to your modem via serial interface is just a matter of writing to that device file. Web is full of examples of that: