Sending AT commands to my internal UMTS modem - modem

I have a thinkpad laptop and I would like to send AT commands to my modem once it is connected to the network. The interface that is used is '/dev/ttyACM0'. What is the best way to send my commands there? I tried gnokii but wasn't able to connect to my modem :/ I also tried echo'ing commands to the device, this worked, but it is not easy to get the output of the command to proceed with the computation. Maybe one of you guys has a better way to do this. TIA

Have you tried minicom? (assuming from your interface that you are using Linux)
Introduction to minicom.
Entering "minicom" in www.alternativeto.net gives a link to another terminal emulator for Linux called Cutecom, but I have no personal experience of it.

Related

Connecting the Raspberry Pi 3 with a 3G dongle (Qualcomm Modem)

I recently bought a 3G dongle for a project I'm working on. I want my Raspberry Pi to be able to receive SMS messages and respond to them. I got a HSDPA 3g dongle with a 7.2mbps connection. I've set up the dongle on Windows with an A1 (not sure if you guys know this provider) sim and it works fine. I can connect to the internet just fine and also receive text messages (SMS)
However when I try connecting it to my Raspberry Pi (with Raspbian OS) then it doesn't work. It's always show as a "Mass Storage Device".
I tried my luck with usb_modeswitch and wvdial and with Sakis3g as well, but I can't get it to work. My problem with usb_modeswitch and wvdial was that even after I tried everything explained on these 2 blog posts (https://www.thefanclub.co.za/how-to/how-setup-usb-3g-modem-raspberry-pi-using-usbmodeswitch-and-wvdial ; https://nicovddussen.wordpress.com/2014/11/12/setting-up-your-raspberry-pi-to-work-with-a-3g-dongle/) it still didn't switch to the modem mode. It always stays at the "Mass Storage Mode". I saw an alternative and tried using Sakis3G, but with no luck as well. Seems like their website (sakis3g.org / sakis3g.com) is offline and you can't download certain .tar.gz folders/files anymore. I tried my luck with this blog post. (https://shkspr.mobi/blog/2012/07/3g-internet-on-raspberry-pi-success/)
And you guessed it, I couldn't get it to work either. It doesn't let me download the .gz folder/file because the website appears to be down.
It's a very big problem for my project and I would appreciate any help. It's really important. If anyone knows what I can do to fix this, please offer help. I'd really appreciate it.
Greetings.
Trying using tips supplied in this article
Unplug your modem
Open a terminal prompt
Install the usb-modeswitch package by typing in:
sudo apt-get install usb-modeswitch
EDIT... ADD REBOOT STEP
Reboot Pi
Plug the modem in,
Give it a couple of seconds and then try commands to confirm it worked
lsusb
ifconfig -a
You should see a new interface (Note the name of it - might be something like wwan0 )
To get this to acquire an IP address, edit the file /etc/network/interfaces and add the lines:
allow-hotplug wwan0
iface wwan0 inet dhcp
EDIT - REBOOT AGAIN
........
EDIT - UPDATE
Also note that the full version of sakis3G has this usb-modeswitch embedded in it.
You can still download code and look at instructions at old site that's been archived at:
http://web.archive.org/web/20130511202305/http://www.sakis3g.org/#download

Send SSH commands from iOS?

The app I am planning to develop involves sending SSH commands from the phone to a server that supports SSH. Is there a library that will help me connect and send commands to an SSH server?
Thanks! I looked at libssh, but a lot of the stuff it used was deprecated in iOS6.
~Carpetfizz
NMSSH works great! I was able to successfully implement this into an iOS project, and get everything to work.
https://github.com/Lejdborg/NMSSH
You can look at this: I expect you'd still need to do a non-trivial bit of work to make it fit into your app, but that should work.

SMSC911x network interface cards' light never comes back on after cable replugged

I have this strange problem in an embedded system (linux) we build, so I don't have normal GUI trouble-shooting tools on Linux or Windows machines.
The problem is the NIC is no longer usable after cable removed. Even if I re-plug the cable, the lights on it never come back on again and nothing can be sent or received. ifconfig still works on the surface, but doesn't have real effect. Only a reboot will solve the problem. I guess the problem is in the ethernet driver.
My question is how the trouble-shoot it. Any clues/hints? Thanks.
====================
Thank you guys! The board is a gumstix and the PHY is SMSC911x. We are running on Linux 3.0.12. It turns out the smsc911x_soft_reset() of the NIC fails when driver calls smsc911x_open(). The symptom also includes we must run ifconfig multiple times (not consistent) to bring the NIC up and the system can detect it.
I did a search on "SMSC911x soft reset failed" and find this link. http://comments.gmane.org/gmane.linux.network/216467. I removed SMSC_PHY=y in the linux build config file and that fixed the problem. It seems the driver is not compatible. Can somebody explain this, or is there a better solution?

GPRS and GPS on embedded Linux

I've got an embedded linux and a Telit gprs/gps module ("GM862-GPS" on USB-Port). My current project requires it to be connected via gprs for sending data, while continuously asking the module for the gps position. I'm connected to gprs with a ppp-daemon and chatsripts, but when the connection is established, the module seems to be locked (no reaction on AT-commands through minicom).
I read, that 'AT+CMUX' could be one solution, which is provided by this device, but I don't know how to use it, since the 'CMUX User Guide' by Telit isn't really helpfull (and a program for automatic setup is only provided for windows).
Does anyone know, how to deal with this command, or even knows a better choice to handle this problem ?
My answer might be too late.
You need to use CMUX to create another COM port to talk to it. I played with CMUX once and I understand your frustrations. In my case, it worked for a while and then failed and I couldn't find out why. You might want to post your question at Roundsolutions.
I programmed the module by writing Python scripts and upload to the module. Their Python API provides two channels to send AT commands to the module: MDM and MDM2. I use MDM as the AT command and use MDM2 to create sockets. Initially, you use MDM2 to send AT commands to create a socket connection. Once connected, whatever data sent to it will be interpreted as data stream instead of AT commands. They allow you to send '+++' to switch back to AT command mode.

What's the best way to spy on IOCTLs?

I have a U9 Telit modem which, at first, appears as a disk drive on USB bus. Then, the native software after autorun and install, sends a couple of IOCTLs to tell the device to reappear as other things. I can see them in procmon.
I want to better spy on these, to know exactly what they send and how, in order to do the same in proper way.
Try something like Systemtap. Attach a probe that dumps all ioctls and arguments from the kernel, grep through them.
You could use something like strace under linux. The windows equivalent is discussed here Systrace for Windows.
This might show you the ioctl commands sent.
Some companies offer the linux kernels of their devices as direct download from their official webpage. There you might find more information on how it works. For some devices, it's easy to build and deploy your own kernel. This helps as you can add custom debug output.