Debugging USB serial disconnection on raspberry pi - raspberry-pi

On one of my raspberry pis (Raspbian OS) with a USB serial device connected, there is periodic disconnection of the serial device while still being registered as a USB device.
lsusb returns a valid Bus Device entry, but there is no corresponding /dev/serial/ entry.
The only way to fix this issue is rebooting the pi, which I'd like to avoid.
I'd love some ideas on how I can debug USB serial connections on a Raspberry Pi Linux platform, or methods to reset the serial connection without requiring a reboot.
We tried:
Tracking udevadm monitor to see USB related events. This is what is seen where we catch a serial disconnection / reconnection happening:
KERNEL[65879.184887] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/tty/ttyACM1 (tty)
KERNEL[65879.185179] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
KERNEL[65879.185389] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb)
KERNEL[65879.185728] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.2 (usb)
KERNEL[65879.186275] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
UDEV [65879.193792] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb)
UDEV [65879.197016] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/tty/ttyACM1 (tty)
UDEV [65879.197414] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.2 (usb)
UDEV [65879.203665] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
UDEV [65879.205795] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
==> /var/log/messages <==
Jan 20 18:36:42 rpi4161a-172-101 kernel: [65879.307684] usb 1-1.3: USB disconnect, device number 12
==> /var/log/syslog <==
Jan 20 18:36:42 rpi4161a-172-101 kernel: [65879.307684] usb 1-1.3: USB disconnect, device number 12
KERNEL[65880.121912] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
KERNEL[65880.122424] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
KERNEL[65880.125157] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/tty/ttyACM0 (tty)
KERNEL[65880.125702] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb)
KERNEL[65880.126324] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.2 (usb)
UDEV [65880.158159] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
UDEV [65880.167588] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
UDEV [65880.168004] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb)
UDEV [65880.169128] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.2 (usb)
UDEV [65880.177534] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/tty/ttyACM0 (tty)
==> /var/log/messages <==
Jan 20 18:36:43 rpi4161a-172-101 kernel: [65880.244987] usb 1-1.3: New USB device found, idVendor=****, idProduct=****, bcdDevice= 1.00
Jan 20 18:36:43 rpi4161a-172-101 kernel: [65880.245001] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 20 18:36:43 rpi4161a-172-101 kernel: [65880.245010] usb 1-1.3: Product: J-Link Pro OB
Jan 20 18:36:43 rpi4161a-172-101 kernel: [65880.245020] usb 1-1.3: Manufacturer: ****
Jan 20 18:36:43 rpi4161a-172-101 kernel: [65880.245028] usb 1-1.3: SerialNumber: ****
Jan 20 18:36:43 rpi4161a-172-101 kernel: [65880.248227] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
Jan 20 18:36:43 rpi4161a-172-101 mtp-probe: checking bus 1, device 13: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3"
Jan 20 18:36:43 rpi4161a-172-101 mtp-probe: bus: 1, device: 13 was not an MTP device
Checking if the raspberry pi was overheating, using vcgencmd. It returns 8000 Soft temperature limit has occurred flag sometimes, but not always.
Tried the following method to "reset" the serial connection, which had no effect
echo -n '1-1.3:1.0' | sudo tee -a unbind
echo -n '1-1.3:1.0' | sudo tee -a bind
Followed some of the solutions here: https://raspberrypi.stackexchange.com/questions/9264/how-do-i-reset-a-usb-device-using-a-script, including the solution to reset the USB bus, with no luck.

USB Serial malfunctioning may be caused by many different factors, including software, hardware or noisy environment.
The following diagram roughly describes the related components,
-------------------- ----------------
| Userspace (Apps) | | Power Supply |
-------------------- ----------------
^
|
-------------------- ------------- ----------
| Kernel (Drivers) | <-- | USB Cable | <-- | Device |
-------------------- ------------- ----------
Narrow down to the faulty part
As first step, elimination method can help us to narrow down to the faulty part, basically you replace the suspect part with another good component, and observe if it changes result. for example,
use the latest official raspbian image to eliminate userspace issue
choose a different kernel/firmware image to eliminate kernel/driver issue
change usb cable
change usb device
use a decent power supply
Troubleshooting on software issue
Assume we could narrow down the scope to software, I would use the following procedures to do further check,
Make sure the usb device is recognized by kernel, check with lsusb, dmsg, udevadm.
Have a correct name (dev path), check udev rules;
Run udevadm monitor to observe any unexpected disconnection events, make sure it works (stable connection) on a fresh OS image, and install only necessary packages step by step.
Other tips
Check if your usb device is a "smart" device? meaning the device may have its own logic to disconnect or change mode, so that affect your host side connection.

To see what happened on the USB bus it is better to use usbmon (see https://wiki.wireshark.org/CaptureSetup/USB).
I think you should carefully check usb descriptors: lsusb -v and check how much current it attempts to take (check configuration descriptor: https://learn.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-configuration-descriptors).
I think reconnects could occur due to insufficient current to you usb device especially if device supplied only from bus. If current > than usb host controller can provide, usb host-controller limits current this could lead to device reset. To check this hypothesis connect your device to Raspberry using active hub with external power supply.

Related

Can't connect iPhone 6 to macOS virtual machine

I'm trying to test a flutter app on iOS using my macOS virtual machine, but I can't get my old iPhone 6 to connect. I was able to get it to connect once last week, but since then it will immediately disconnect from the guest and back to the host whenever I plug it in. Here's some info about my setup:
Host OS: Ubuntu 20.04
Guest OS: macOS Big Sur 11.2
Phone: iPhone 6, iOS 12.5.1
Virtualization: VMWare player 16.1.0
I have the vm stored in a 2TB external USB drive
I added the line usb.quirks.device0 = "0x05ac:0x12a8 skip-reset, skip-refresh, skip-setconfig" to my vmx file which at least stops an infinite loop of connecting and disconnecting.
I have the vm settings to USB 2 and have all the options checked
If I plug the phone into a USB 3 port, I get a driver error, and if I plug it into a USB 2 port I sometimes get a message saying the device is busy.
I also get similar messages in the vmware log
2021-02-15T20:41:21.288-07:00| vmx| I005: USBGA: device 1000001d05ac12a8 arrived
2021-02-15T20:41:21.291-07:00| vmx| I005: MsgHint: msg.usb.disconnectHostProcess
2021-02-15T20:41:21.291-07:00| vmx| I005+ The specified device is in use by process:3922 /usr/libexec/gvfs-gphoto2-volume-monitor on the host operating system. Continuing will detach the device from the host operating system.
2021-02-15T20:41:21.291-07:00| vmx| I005+ ---------------------------------------
2021-02-15T20:41:21.297-07:00| vmx| W003: USBGL: failed to claim device (fd=19), interface 0. Retrying
2021-02-15T20:41:21.297-07:00| vmx| I005: USBGL: disconnect driver 'usbfs' from device 19, interface 0
2021-02-15T20:41:21.297-07:00| vmx| I005: USBGL: claimed device 19, interface 0 successfully
2021-02-15T20:41:21.297-07:00| vmx| I005: USBGL: Connected device 0x1000001d05ac12a8 successfully
2021-02-15T20:41:21.297-07:00| vmx| I005: USBG: Quirks for device 05ac:12a8 (user-defined,skip-setconfig,skip-reset,skip-refresh,slow-reconnect)
...
2021-02-15T20:41:21.617-07:00| vcpu-1| I005: USBGL: Disable port is not supported.
2021-02-15T20:41:21.719-07:00| vcpu-0| I005: USBG: Skipping device reset for 0x1000001d05ac12a8
2021-02-15T20:41:21.874-07:00| vmx| I005: USBG: Skipping SetConfiguration(1) for 0x1000001d05ac12a8
2021-02-15T20:41:21.879-07:00| vmx| W003: USBGL: failed to set device 19 to config 5: Device or resource busy
2021-02-15T20:41:21.879-07:00| vmx| I005: USBGL: claimed device 19, interface 0 successfully
2021-02-15T20:41:26.578-07:00| vmx| W003: USBGL: failed to submit urb to device 19: Device or resource busy
...
2021-02-15T20:41:26.579-07:00| vmx| W003: USBGL: failed to submit urb to device 19: Device or resource busy
2021-02-15T20:41:53.340-07:00| vmx| I005: USB: Disconnecting device 0x1000001e05ac12a8
2021-02-15T20:41:53.340-07:00| vmx| I005: USBG: Disconnecting 1000001e05ac12a8, port:0 reservedPort:5574C8CD9D20
2021-02-15T20:41:53.340-07:00| vmx| I005: USBGA: device 1000001e05ac12a8 already disconnected from host
The iPhone shows up under USB in system information. Manually connecting or disconnecting the device in the removable devices section of vmware doesn't seem to do anything.
Is there any other setting I can change or something I can try to get the iPhone to stay connected to the guest macOS?
Thanks so much!
Had the same problem. Need disable gvfs-gphoto2-volume-monitor and usbmuxd services in host OS (Ubuntu). Detail solution found here: https://www.insanelymac.com/forum/topic/326555-vmware-cant-connect-iphone/
Is the usbmuxd daemon that you need to disable but also to mask in order to prevent it from auto start again.
When you need to attach your iPhone to the VMWare Guest you need to execute the following commands:
sudo systemctl mask usbmuxd
sudo systemctl stop usbmuxd
When you finished and need to enable again the usbmuxd daemon you need to execute the following commands:
sudo systemctl unmask usbmuxd
sudo systemctl start usbmuxd
Also you may need to kill gvfs-gphoto2-volume-monitor by executing:
sudo killall gvfs-afc-volume-monitor
Tested and working on Fedora 36 with WMWare Workstation 16.2.3 and OSX guest 12.4
in the vmx file.... change the following line
usb_xhci:7.speed = "4"
like this
usb_xhci:7.speed = "2"
but it resets.Change the line after you open vmware...before starting the virtual machine....
you can check the port that iphone connects to from log....
in my case ... usb_xhci:7

I'm trying to set up apcupsd on a raspberry pi to communicate with a tripp-lite power supply

I am trying to get this to work. I have:
Raspberry Pi B (I think) running Raspbian 10 (buster)
Tripp Lite OMNI1500LCDT
Connection via USB
I have the following configuration files:
/etc/apcupsd/hosts.conf:
MONITOR 127.0.0.1 "Local Host"
/etc/default/apcupsd
ISCONFIGURED=yes
/etc/apcupsd/apcupsd.conf:
UPSNAME triplite
UPSCABLE usb
UPSTYPE usb
DEVICE
When I run sudo apctest (note that I stopped the daemon first) I get:
apctest
2020-04-04 00:28:18 apctest 3.14.14 (31 May 2016) debian
Checking configuration ...
sharenet.type = Network & ShareUPS Disabled
cable.type = USB Cable
mode.type = USB UPS Driver
Setting up the port ...
apctest FATAL ERROR in apctest.c at line 321
Unable to open UPS device.
If apcupsd or apctest is already running,
please stop it and run this program again.
apctest error termination completed
when I run sudo /etc/init.d/apcupsd start, the log looks OK:
Apr 4 00:29:57 megabyte systemd[1]: Starting UPS power management daemon...
Apr 4 00:29:57 megabyte systemd[1]: apcupsd.service: Can't open PID file /run/apcupsd.pid (yet?) after start: No such file or directory
Apr 4 00:29:57 megabyte apcupsd[6712]: apcupsd 3.14.14 (31 May 2016) debian startup succeeded
Apr 4 00:29:57 megabyte apcupsd[6712]: NIS server startup succeeded
Apr 4 00:29:57 megabyte systemd[1]: Started UPS power management daemon.
When I run lsusb I get (note that the Tripp Lite UPS is listed on Device 4:
lsusb
Bus 001 Device 005: ID 0781:5575 SanDisk Corp. Cruzer Glide
Bus 001 Device 004: ID 09ae:3016 Tripp Lite
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I wound up installing nut by following these directions and now nut is working fine.

Cannot run STM32 L1 Discovery board

I have fresh STM32 L1 discovery board, and it seems to be broken.
But I am not completely sure.
When connecting board via USB to the Linux machine, board starts
perfectly fine, and the demo works just as described by vendor.
But I am unable to actually connect to this board.
➜ lsusb -s 002:074
Bus 002 Device 074: ID 0483:3748 STMicroelectronics ST-LINK/V2
Board seems to be connected, big jumper (CN3) to switch between ST-LINK and DISCOVERY is set to DISCOVERY. But when I try to use st-link utility
I am receiving.
➜ stlink git:(master) ./st-flash --reset erase
libusb_handle_events() timeout
[!] send_recv
libusb_submit_transfer(-6)
[!] send_recv
libusb_submit_transfer(-6)
[!] send_recv
libusb_submit_transfer(-6)
[!] send_recv
libusb_submit_transfer(-6)
[!] send_recv
2015-12-25T19:24:57 INFO src/stlink-common.c: Loading device parameters....
libusb_submit_transfer(-6)
[!] send_recv
libusb_submit_transfer(-6)
[!] send_recv
libusb_submit_transfer(-6)
[!] send_recv
2015-12-25T19:24:57 WARN src/stlink-common.c: unknown chip id! 0
fish: Job 1, './st-flash --reset erase' terminated by signal SIGSEGV (Address boundary error)
Also OpenOCD is unable to talk to the board.
openocd -f board/stm32ldiscovery.cfg
Open On-Chip Debugger 0.9.0 (2015-12-25-18:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 300 kHz
adapter_nsrst_delay: 100
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Unable to match requested speed 300 kHz, using 240 kHz
Info : Unable to match requested speed 300 kHz, using 240 kHz
Info : clock speed 240 kHz
Error: reset device failed
in procedure 'init'
in procedure 'ocd_bouncer'
The chip on board is STM32L152RCT6. I worked with STM32F0..4 before and had never such problems, but I did not worked with L series before, so I am not sure if this is board problem or I am skipping something important here.
EDIT: Using OpenOCD i found out not expected behaviour. At first run I am receiving error:
Error: init mode failed (unable to connect to the target)
At second run:
Error: reset device failed
Then device dissapears from the system, dmesg leaves messages:
[ 1336.080239] usb 2-1.1: reset full-speed USB device number 4 using ehci-pci
[ 1336.154250] usb 2-1.1: device descriptor read/64, error -32
[ 1336.329341] usb 2-1.1: device descriptor read/64, error -32
[ 1336.503334] usb 2-1.1: reset full-speed USB device number 4 using ehci-pci
[ 1336.566330] usb 2-1.1: device descriptor read/64, error -32
[ 1336.741385] usb 2-1.1: device descriptor read/64, error -32
[ 1336.915427] usb 2-1.1: reset full-speed USB device number 4 using ehci-pci
[ 1337.317517] usb 2-1.1: device not accepting address 4, error -32
[ 1337.390532] usb 2-1.1: reset full-speed USB device number 4 using ehci-pci
[ 1337.792623] usb 2-1.1: device not accepting address 4, error -32
[ 1337.793110] usb 2-1.1: USB disconnect, device number 4
[ 1337.855642] usb 2-1.1: new full-speed USB device number 5 using ehci-pci
[ 1337.918651] usb 2-1.1: device descriptor read/64, error -32
[ 1338.093691] usb 2-1.1: device descriptor read/64, error -32
[ 1338.267730] usb 2-1.1: new full-speed USB device number 6 using ehci-pci
[ 1338.330727] usb 2-1.1: device descriptor read/64, error -32
[ 1338.505783] usb 2-1.1: device descriptor read/64, error -32
[ 1338.679823] usb 2-1.1: new full-speed USB device number 7 using ehci-pci
[ 1339.081921] usb 2-1.1: device not accepting address 7, error -32
[ 1339.154935] usb 2-1.1: new full-speed USB device number 8 using ehci-pci
[ 1339.557024] usb 2-1.1: device not accepting address 8, error -32
[ 1339.557168] usb 2-1-port1: unable to enumerate USB device
I think there might be a problem with adapter speed, but I am not sure for now.
EDIT2: I tried with Windows ST Link Utility and I am not able to connect to the board, board causing "Detection Error" or "Connection Error", software suggests changing SWD frequency or mode. I tired with literally every combination but none works.
EDIT3: If this helps somebody, board was sent back, I have got information that it is actually broken and I have got new one. New one works flawlessly as expected.
Sometimes I work with the same L1 Discovery board on GNU/Linux. Both texane/stlink and OpenOCD detect it flawlessly without any modification. You can see the outputs:
$ st-util
2016-01-08T21:55:59 INFO src/stlink-common.c: Loading device parameters....
2016-01-08T21:55:59 INFO src/stlink-common.c: Device connected is: L1 Med-density device, id 0x10186416
2016-01-08T21:55:59 INFO src/stlink-common.c: SRAM size: 0x4000 bytes (16 KiB), Flash: 0x20000 bytes (128 KiB) in pages of 256 bytes
2016-01-08T21:55:59 INFO gdbserver/gdb-server.c: Chip ID is 00000416, Core ID is 2ba01477.
2016-01-08T21:55:59 INFO gdbserver/gdb-server.c: Target voltage is 2917 mV.
2016-01-08T21:55:59 INFO gdbserver/gdb-server.c: Listening at *:4242...
$ openocd -f board/stm32ldiscovery.cfg
GNU ARM Eclipse 64-bits Open On-Chip Debugger 0.10.0-dev-00141-g09aeb96-dirty (2015-10-28-11:56)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 300 kHz
adapter_nsrst_delay: 100
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Unable to match requested speed 300 kHz, using 240 kHz
Info : Unable to match requested speed 300 kHz, using 240 kHz
Info : clock speed 240 kHz
Info : STLINK v2 JTAG v25 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.913980
Info : stm32l1.cpu: hardware has 6 breakpoints, 4 watchpoints
Maybe your board is really broken but before recycle it I suggest you two different trials. (a) I think after your question you have another ST (as you mentioned STM32F0..4) board perhaps with ST-LINK adaptor. You can use it as an external ST-LINK (follow eg. this). (b) Try to upgrade your embedded ST-LINK firmware with the STSW-LINK005 which java version works also in GNU/Linux environment. The board performs well for me both before and after upgrade.

NetGear N150 wireless usb stick not working with Raspbian Wheezy on my PI

I am running a RaspberryPi with raspbian-wheezy:
uname -a
Linux raspberrypi 3.18.5+ #744 PREEMPT Fri Jan 30 18:19:07 GMT 2015 armv6l GNU/Linux
How i want to use a NetGear N150 Wireless USB stick as a wlan interface:
dmesg
[ 3.401856] usb 1-1.2: new high-speed USB device number 4 using dwc_otg
[ 3.523552] usb 1-1.2: New USB device found, idVendor=0846, idProduct=9043
[ 3.532493] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3.541771] usb 1-1.2: Product: WNA1000Mv2
[ 3.547744] usb 1-1.2: Manufacturer: Realtek
[ 3.553858] usb 1-1.2: SerialNumber: 00e04c000001
The device is not automatically detected. After plugging in the stick into a windows machine, it seems as the stick uses a Realtek rtl8192cu chip. Loading the 8192cu kernel module does not seem to work, there is still no wlan0 device.
Any ideas?
Never mind, I found a solution:
The usb id is not detected by the 8192cu kernel module as a supported device. After tweaking a bit and adding the following code to the rc.local file, everything works as expected:
modprobe 8192cu
echo "0846 9043" > /sys/bus/usb/drivers/rtl8192cu/new_id
ifdown wlan0
ifup wlan0
To have this handled automatically on module insertion, put the following line in /etc/modprobe.d/netgear_n150.conf:
install 8192cu /sbin/modprobe --ignore-install 8192cu; echo "0846 9043" > /sys/bus/usb/drivers/rtl8192cu/new_id
Going the extra mile: having it load automatically is more system specific, but on Arch Linux, adding a file in /etc/modules.load.d containing the module name is sufficient.

Not able to configure Idea-3g NetSetter in RHEL 6.1,System is taking it as mass staorage not as modem

I have installed Redhat(not purchased) 6.1 (New Redhat) and i am trying to connect Idea-3g NetSetter in it. I have already installed ppp & wvdial by Yum and have made necessary changes in /etc/wvdial.conf file But i am not able to configure it.
When i went through logs,i found my system is taking this device as mass staorge device & not taking it as a modem device.I went google but it also doesnt help me
In Wvdial.conf file i have to make an entry of /dev/ttyUSB0 but there is no file like ttyUSB under dev directory.There is tty1,tty2 etc. So how i can resolve this problem.Kindly help me..Some nessary infomration are here
[root#server ~]# wvdial
--> WvDial: Internet dialer version 1.60
--> Cannot open /dev/ttyUSB0: Inappropriate ioctl for device
--> Cannot open /dev/ttyUSB0: Inappropriate ioctl for device
--> Cannot open /dev/ttyUSB0: Inappropriate ioctl for device
[root#server ~]# lsusb
Bus 002 Device 003: ID 0bda:0138 Realtek Semiconductor Corp.
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 006: ID 12d1:1446 Huawei Technologies Co., Ltd. E1552 (HSPA modem)
Bus 001 Device 004: ID 0c45:643d Microdia
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[root#server ~]#vi /proc/version
Linux version 2.6.32-131.0.15.el6.i686 (mockbuild#x86-001.build.bos.redhat.com) (gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC) ) #1 SMP Tue May 10 15:42:28 EDT 2011
[root#server ~]# tail /var/log/messages (Last Few Lines)
May 4 22:49:18 server kernel: usb 1-1.2: USB disconnect, address 6
May 4 22:49:18 server kernel: scsi 15:0:0:0: rejecting I/O to dead device
May 4 22:49:19 server gnome-keyring-daemon[2212]: removing removable location: /media/20110811_0533
May 4 22:49:19 server gnome-keyring-daemon[2212]: no volume registered at: /media/20110811_0533
May 4 22:49:31 server kernel: usb 1-1.2: new high speed USB device using ehci_hcd and address 7
May 4 22:49:31 server kernel: usb 1-1.2: New USB device found, idVendor=12d1, idProduct=1446
May 4 22:49:31 server kernel: usb 1-1.2: New USB device strings: Mfr=3, Product=2, SerialNumber=0
May 4 22:49:31 server kernel: usb 1-1.2: Product: HUAWEI Mobile
May 4 22:49:31 server kernel: usb 1-1.2: Manufacturer: HUAWEI Technology
May 4 22:49:31 server kernel: usb 1-1.2: configuration #1 chosen from 1 choice
May 4 22:49:31 server kernel: scsi17 : SCSI emulation for USB Mass Storage devices
May 4 22:49:31 server kernel: scsi18 : SCSI emulation for USB Mass Storage devices
May 4 22:49:36 server kernel: scsi 17:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
May 4 22:49:36 server kernel: scsi 18:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
May 4 22:49:36 server kernel: sr1: scsi-1 drive
May 4 22:49:36 server kernel: sr 17:0:0:0: Attached scsi generic sg2 type 5
May 4 22:49:36 server kernel: sd 18:0:0:0: Attached scsi generic sg4 type 0
May 4 22:49:36 server kernel: sd 18:0:0:0: [sdc] Attached SCSI removable disk
[root#server ~]# cd /dev/
[root#server dev]# ls
agpgart log ram1 sda5 tty15 tty40 tty9
autofs loop0 ram10 sda6 tty16 tty41 ttyS0
block loop1 ram11 sda7 tty17 tty42 ttyS1
bsg loop2 ram12 sda8 tty18 tty43 ttyS2
bus loop3 ram13 sdb tty19 tty44 ttyS3
cdrom loop4 ram14 sdc tty2 tty45 urandom
cdrom2 loop5 ram15 sg0 tty20 tty46 usbmon0
cdrw loop6 ram2 sg1 tty21 tty47 usbmon1
char loop7 ram3 sg2 tty22 tty48 usbmon2
console lp0 ram4 sg3 tty23 tty49 v4l
core lp1 ram5 sg4 tty24 tty5 vcs
cpu lp2 ram6 shm tty25 tty50 vcs1
cpu_dma_latency lp3 ram7 snapshot tty26 tty51 vcs2
crash MAKEDEV ram8 snd tty27 tty52 vcs3
disk mapper ram9 sr0 tty28 tty53 vcs4
dri mcelog random sr1 tty29 tty54 vcs5
dvd mem raw stderr tty3 tty55 vcs6
dvdrw net rfkill stdin tty30 tty56 vcsa
fb network_latency root stdout tty31 tty57 vcsa1
fb0 network_throughput rtc systty tty32 tty58 vcsa2
fd null rtc0 tty tty33 tty59 vcsa3
full nvram scd0 tty0 tty34 tty6 vcsa4
fuse oldmem scd1 tty1 tty35 tty60 vcsa5
hpet port sda tty10 tty36 tty61 vcsa6
hugepages ppp sda1 tty11 tty37 tty62 vga_arbiter
hvc0 ptmx sda2 tty12 tty38 tty63 video0
input pts sda3 tty13 tty39 tty7 watchdog
kmsg ram0 sda4 tty14 tty4 tty8 zero
[root#server dev]#vi /etc/wvdial.congf
[Dialer Defaults]
Modem=/dev/ttyUSB0 ***what to write here***
Baud = 115200
Init 1 = AT+CGMM
Init 2 = AT+CMEE=1
Init 3 = ATE0
Init 4 = AT^HS=0,0
Init 5 = AT+CFUN?
Init 6 = AT+CLCK="SC",2
Init 7 = AT+CPIN?
Init 8 = AT+CLCK="SC",2
Modem Type = USB MODEM
Phone=*99#
Username =""
Password =""
New PPPD = yes
Dial Command=ATDT
Stupid Mode=1
ISDN=0
Kindly help me How i can troubleshoot it,Where & what changes should i made so that rhel 6 can take it as modem not a mass staorage device if i am thinking right
I am Giving output of wvdial coomand,it is restarting again and again and showing ppd error 16.I tried to figure out it and founf this error is for modem hang.I tried a lot but problem is as it is.
[root#server ~]# wvdial
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Sat May 5 07:25:25 2012
--> Pid of pppd: 2905
--> Using interface ppp0
--> Disconnecting at Sat May 5 07:25:27 2012
--> The PPP daemon has died: A modem hung up the phone (exit code = 16)
--> man pppd explains pppd error codes in more detail.
--> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.
--> Auto Reconnect will be attempted in 5 seconds
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Sat May 5 07:25:32 2012
--> Pid of pppd: 2925
--> Using interface ppp0
--> Disconnecting at Sat May 5 07:25:34 2012
--> The PPP daemon has died: A modem hung up the phone (exit code = 16)
--> man pppd explains pppd error codes in more detail.
--> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.
--> Auto Reconnect will be attempted in 10 seconds
[root#server ~]# vi /dev/tty
tty tty25 tty42 tty6
tty0 tty26 tty43 tty60
tty1 tty27 tty44 tty61
tty10 tty28 tty45 tty62
tty11 tty29 tty46 tty63
tty12 tty3 tty47 tty7
tty13 tty30 tty48 tty8
tty14 tty31 tty49 tty9
tty15 tty32 tty5 ttyS0
tty16 tty33 tty50 ttyS1
tty17 tty34 tty51 ttyS2
tty18 tty35 tty52 ttyS3
tty19 tty36 tty53 ttyUSB3
tty2 tty37 tty54 ttyUSB4
tty20 tty38 tty55 ttyUSB_utps_diag
tty21 tty39 tty56 ttyUSB_utps_modem
tty22 tty4 tty57 ttyUSB_utps_pcui
tty23 tty40 tty58
tty24 tty41 tty59
It's fairly common for such devices to first present themselves as a mass storage device, probably containing documentation and drivers.
Try ejecting the mass storage device first. The real modem device will probably turn up.
Automating this
Once you confirm that this is indeed the problem you can automate the ejection.
It's described reasonably well in this forum discussion, but in short you add a udev rule which calls eject or usb-modeswitch as soon as the device is detected.
That way the correct device node will be created and you don't need to worry about the problem in WvDial.