Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
Route USB connection thru telnet
I think this is a what obscure title, but the problem was (WAS) this. I have purchased a couple of MultiTech GPRS modems. My only application for now is to send SMS through these modems.
I did some research, and thought that Gammu would be a fine command line program to be called from my application.
The MultiTech modems also seemed to be designed for my application, and they come with RS-232, USB or Ethernet interface. I choose Ethernet becasue the modems will by mounted quite some distance from the server running my app. I talk to these modems over ethernet using Telnet.
Gammu is wonderful, ethernet GPRS modems are wonderful but I made a big fat mistake by forgetting Gammy can talk over devices like /dev/ttyS0 or /dev/ttyUSB0, but not via Telnet.
I solved the problem quickly (I needed it running THIS week!) by adapting an Expect script I had lying around, and now I am perfectly able to communicate and send SMS-es.
However, I am wondering if there is any way to set up a Telnet connection to the modem, and simulate a /dev/tty device through that connection. In other words, Gammu talks to my /dev/faketty, faketty routes everything thru the Telnet connection.
My application might need a little more functionality, not much. It would be possible to implement that in the Expect app I already have, but if there is a real easy solution to create a fake device and use Gammu, I might prefer that.
As far as I know, the only way to do that is to write your own "telnet" driver for your modems. This would not be that difficult, but you would need to understand the TCP/IP stack and linux character device drivers.
I just purchased a MultiTech MTCBA-C-U to use with gammu in linux. I can see it with lsusb but I cannot figure out the correct settings in gammurc in order to communicate with it. This modem can do serial, usb, and ethernet. If I cannot get usb to work, your solution using expect sounds intriguing. Any chance you can send me a copy of your script? I would most rather use gammu though. Any thoughts on how to configure it for the MultiTech?
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Original Poster
Rep:
Quote:
Originally Posted by dagnabit
Any thoughts on how to configure it for the MultiTech?
No, but it seems to be straightforward and there are plenty of examples available. Mutlitech is one of the best supported modems, thanks to the extensive documentation.
Frankly I doubt whether you can talk ethernet to that model. The modems are available for RS232, USB and Ethernet but those are 3 different models.
If your modem talks ethernet, make sure you are able to talk to it over telnet, send messages etc. One step at a time. The script is resilient against errors, but you won't get any message out and it is gonna take a long time if you try to debug using the script instead of going thre the basics.
No, but it seems to be straightforward and there are plenty of examples available. Mutlitech is one of the best supported modems, thanks to the extensive documentation.
Frankly I doubt whether you can talk ethernet to that model. The modems are available for RS232, USB and Ethernet but those are 3 different models.
If your modem talks ethernet, make sure you are able to talk to it over telnet, send messages etc. One step at a time. The script is resilient against errors, but you won't get any message out and it is gonna take a long time if you try to debug using the script instead of going thre the basics.
Thanks. You are right. It is just the USB version. I had read it could do all three, but that is because they sell three models. I've got it talking over minicom, but not with gammu or smstools3 which are both designed for GSM modems/phones and not CDMA as mine is.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.