So I have been running into an issue with a USB Modem where if someone ends their dialin connection abruptly from the other side the modem gets stuck
and I found that the only way to fix it is to either unplug the USB Modem and plug it back in, or just reboot. I'd rather not reboot if that's possible, and since this
PC will be in a remote location where I won't have access to it physically, I was hoping to find another solution...
So after searching around a bit online I found this C program that is supposed to do exactly what I was trying to do, but it doesn't seem to be working properly.
Not sure if something is incorrect in the code below seeing that I have only limited knowledge of C, I was wondering if someone elswe could tell...?
If not does anyone know of any other soultion that I might try? I saw there was a command called "udevadm", and with that your supposed to be able to
control udev and devices, I believe... But I'm not sure if that command will help my cause..?
The C code at the end of the post seems to "shutdown" that USB port, but it doesn't seem to re-rigester the device...
*The USB Modem is the device labeled "Conexant Systems (Rockwell), Inc."....
If I run lsusb before I execute the C program I see:
Then I execute the C program, and when that's done I run lsusb again and I get:
As you can see this time the Modem is missing... If I watch /var/log/messages when I physically unplug the modem AFTER I execute the C program I get
no output at all, so it seems like the Kernel doesn't know its there, since normally I would get output on unplugging ANY usb device...
But this is /var/log/messages while executing the C program:
So it seems like it's recognizing the modem, but when I physically unplug and re-plug back in the modem I get more messages printed then what you see above...
Here is the C code:
If anyone has ANY thoughts or suggestion, please feel free to share... Not really sure what else I can try here..?
Having read your post a few times I think that you may be going about this the wrong way. You shouldn't need to reset the USB port, the modem software (driver should take care of it.
Firstly, what operating system is it????
Do you definitely have the correct Conexant driver for that O/S?
A modem is a serial port device but in this case the serial port is a virtual one inside the USB driver on the host.
If the remote end hangs up, the local modem should detect carrier loss and, through the USB interface, notify it's host uSB driver, which in turn should signal to the O/S that the remote end has gone away. The local O/S responds by closing the session/process thereby clearing down the modem (virtual) port.
So do you have the right USB driver for your O/S?
and
Is the local modem configured to correctly report a loss of carrier (DCD signal)? See modem manual for that one.
OS: OpenSuSE 13.1 (Bottle) PC: CuBox-i arm processor
Quote:
You shouldn't need to reset the USB port, the modem software (driver should take care of it.
Yea, I wish it was. But in certain cases the modem seems to hang and it stops excepting AT Commands and becomse completely unresponsize at certain
times. Most of the time it will reset correctly when an unexpected hang up occurs, but not everytime. There has been a few times where I hang up randomly
on the other end (*during testing) just to see what happens and the modem completely locks up and the only way to get it back is to either reboot the PC or
unplug and plug back in the modem.
This is the 2nd USB Modem I've tried using. The 1st Modem was a Zoom USB Modem Model 3095. This modem worked MUCH better in terms of never really
locking up, but there was an issue with External Caller-ID NOT working when the CID came from the TelCO. I'm pretty sure it's an mgetty thing since the
external CID worked in Putty (*for linux and Windows). But, since the PC will except calls based on the CID, this part was not exceptable so we tried this
TRENDnet TFM-561U. On this modem the CID worked perfectly with mgetty, so we decided to use this one since the CID was of the upmost importance...
The strange thing is both of these modems look the EXACT same, other then the physical color of the modems they are the same. Even if you watch /var/log/messages when connecting each modem the both report the exact same Serial Number and Manufacturer. If you look at the output below
you would see the exact same thing when connecting each modem. So you'd think they would work pretty much the same...
Output from "/var/log/messages", driver is "cdc_acm":
I'm not sure if the cdc_acm is the correct driver or not, so I had tried last week to use the driver that came with the Zoom modem. The TRENDnet modem
did NOT have a Linux driver on the disc, only Windows ones. So I had tried to compile the Linux driver that was on the Zoom Modem's disc, but was unable to
do so since I do not have the Kernel Sources on this machine in order to compile drivers/kernel modules. And I couldn't seem to figure out how to get that part
done...
I think I may have found the correct sources for the Kernel I'm running (*version 3.14.14)... I'm downloading them now and hopefully I can get it compiled
and symlink'ed to the correct location so I can actually compile that driver...
But in the mean time, this output below, is for the most part, what happens in the log when the modem freezes up. You'll see at the top is where I login to
the PC by dialing into the modem. Then, I hang-up the line on the other side and this is what happens. Doesn't happen everytime, but somewhat frequently...
Output from "/var/log/mgetty.ttyACM0":
But I'm going to attempt to compile this Kernel again since I think I may have found the correct sources. I'll reply back with my results shortly. Hopefully this
driver will work better if I can ever get it compiled...
Humm interesting, pretty similar... Too bad is not mgetty they were using. Wish there was a way to manually control mgetty while it's running, like sending it an AT command, but I don't think that's possible..?
Tomorrow I'm going to attempt to install the kernel sources I found for my version. Since both of the modems I mentioned are Conexant modems, I'm hoping the driver that came with the Zoom modem will work with the TRENDnet one. Hopefully if I can get that driver compiled tomorrow it will fix this hangup issue... Maybe it will even fix the CID problem with the Zoom modem.
Sorry I missed your question about the modem detecting the DCD... Not sure, but I think it does, but not positive. But I'll have to check up on that one. Is that the same as when I dial into the PC with that USB modem from my laptop, using minicom and another USB modem, and I issue a hangup on my laptop's side I see the message, "NO CARRIER".. Is that the same?
Yes, you got it. There is an interface signal (called DCD, Data Carrier Detect, which is pin 8 on the 25-pin RS232) that tells the host at each end if the modulated carrier (telephone line signal) is lost.
Although your (RS232) interface is a virtual one within the USB driver, the functionality should be the same. My point is that there may be some programming instruction (AT command(s)) to tell each of the modems what they should do if they see carrier lost. I would expect them to notify the USB driver through the USB interface so that the USB driver (if it's the correct one) can tell the host O/S that the line has gone down.
I have someone wanting to connect to the serial management port of a switch from a PC running CentOS6. The management port on the switch is apparently baud 9600, 8 data bits, 1 stop bit & no parity They have plugged in a cable to connect and the output from lsusb is:-Bus 001 Device 001: ID... (7 Replies)
Hi everybody! :)
I am a complete newbie. :D Is it possible to write a script (shell or python) to listen to usb port event and to notify me every time an usb storage key is plugged or ejected? I want it to echo the device to mount (eg. /dev/sdb).
I wrote an udev rule wich runs a script after... (1 Reply)
In ubuntu etopic i create this udev rules for prolink 3g usb modem:
SUBSYSTEM=="block",
SUBSYSTEM=="scsi",
ATTRS{idVendor}=="1e0e",
ATTRS{idProduct}=="f000",
ACTION=="add",
RUN+="/sbin/modprobe usbserial Vendor=0X1e0e Product=0Xf000"
After plugging the usb modem, ubuntu assigns the ports... (4 Replies)
Hello,
I have an unloaded T5140 machine and want to access the ILOM for the first time and subsequently the network port after that., and then load Solaris 10 the final January 2011 build.
The first part is what confuses me -the cabling.
I am coming from a Windows machine (w/appropriate... (5 Replies)
Hi @all,
i am currently having a Problem:
I want to restart 2 USB Bluetooth Dongles from the shell at the same time. It is very important that they are restarted nearly simultaneously, so that their clocks are starting to run at the same time.
At the moment i am using a command called... (3 Replies)
Hi
I have to buy my selfe external case for hdd but I don't know whether my ubuntu linux, needs some driver to be able to work with this device or it has inside of itselfe this driver ?
rhx for help. (1 Reply)
I want to watch the USB ports.
If any device is connected to the USB port I want to take the name of the device and
I want to log the device name. how to watch all the USB ports.
How to find the device is connected in which usb port. (1 Reply)
Hi,
I have PC with Linux OS RHEL3 and USB port is disabled from BIOS. BIOS access is protected using password. But, I have root access. Now, how can I enable USB port using root access? Is there any trick that I can do using root access that can enable USB port once my PC has booted up? (3 Replies)
Hello AIX Group Members,
I have two systems: (1) IBM pSeries 640, 7026-B80. (2) A 5-month old HP laptop with Windows Vista. It has no serial port and only has USB ports on it.
My question are: How can I use the laptop as the p640's terminal? How can I make the connection? What type of cable... (4 Replies)
hi all,
I have been trying to setup network on solaris10 from a long time but am unable to do so..
I tried it with the ethernet card i have(dfe -520tx) but since i was not able to find drivers for that particular device, i thought of using the usb mode to run network..
However am not able... (0 Replies)