I have a problem with flashing proc using https://github.com/stlink-org.
Using windows STM32-Utility all works fine on every programer.
I also using debug which works correctly
Tried on other version v1.6.1.8x or 1.5.1 - this same problem
My setup:
Raspbbery Pi 4 with NOOBs
STM32F723, also i tried on Nucleo programer and ST-LINK / V2
stlink version - v1.6.1-201-g4bfaab0
At this moment I can erase memory, but that's all. When I tried to flash it crashes.
./st-flash write test.bin 0x8000000
------------------------------------
2021-02-05T10:26:04 INFO common.c: Flash page at addr: 0x08011480 erased
2021-02-05T10:26:04 INFO common.c: Flash page at addr: 0x08011500 erased
2021-02-05T10:26:04 INFO common.c: Flash page at addr: 0x08011580 erased
2021-02-05T10:26:04 INFO common.c: Flash page at addr: 0x08011600 erased
2021-02-05T10:26:04 INFO common.c: Flash page at addr: 0x08011680 erased
2021-02-05T10:26:04 INFO common.c: Flash page at addr: 0x08011700 erased
2021-02-05T10:26:04 INFO common.c: Finished erasing 559 pages of 128 (0x80) bytes
2021-02-05T10:26:04 INFO common.c: Starting Flash write for L0
2021-02-05T10:26:04 INFO common.c: Starting Half page flash write for STM32L core id
2021-02-05T10:26:04 INFO flash_loader.c: Successfully loaded flash loader in sram
2021-02-05T10:26:04 INFO common.c: Go to Thumb mode
2021-02-05T10:26:05 ERROR flash_loader.c: Flash loader run error (R2 0xF1000003 R15 0xF1000003 DHCSR 0x01080001 DFSR 0x0000000B)
2021-02-05T10:26:05 WARN common.c: l1_stlink_flash_loader_run(0x8000000) failed! == -1
2021-02-05T10:26:05 WARN common.c:
write_half_pages failed == -1
^C[!] send_recv send request failed: LIBUSB_ERROR_BUSY
[!] send_recv STLINK_DEBUG_READREG
2021-02-05T10:26:16 INFO common.c: Go to Thumb mode
[!] send_recv send request failed: LIBUSB_ERROR_BUSY
[!] send_recv STLINK_DEBUG_WRITEREG
[!] send_recv send request failed: LIBUSB_ERROR_BUSY
[!] send_recv STLINK_JTAG_WRITEDEBUG_32BIT
[!] send_recv send request failed: LIBUSB_ERROR_BUSY
[!] send_recv STLINK_JTAG_WRITEDEBUG_32BIT
lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 060: ID 0483:374f STMicroelectronics STLINK-V3
Bus 001 Device 007: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
./st-info --probe
Found 1 stlink programmers
version: V3J7S1
serial: 303034343030333033303339353130353334333933383338
hla-serial: "\x30\x30\x34\x34\x30\x30\x33\x30\x33\x30\x33\x39\x35\x31\x30\x35\x33\x34\x33\x39\x33\x38\x33\x38"
flash: 196608 (pagesize: 128)
sram: 20480
chipid: 0x0447
descr: L0xx Category 5
Related
I'm trying to access the data stream from my Solar inverter. The inverter device is recognised in lsusb (Bus 002 Device 007) but it is disconnected as seen from dmesg. Can anyone help me with this, please?
$ lsusb
Bus 002 Device 003: ID 0bda:0138 Realtek Semiconductor Corp. RTS5138 Card Reader Controller
Bus 002 Device 007: ID 0665:5161 Cypress Semiconductor USB to Serial
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 0bda:58c1 Realtek Semiconductor Corp.
Bus 001 Device 005: ID 0a5c:21bc Broadcom Corp. BCM2070 Bluetooth 2.1 + EDR
Bus 001 Device 008: ID 0000:3825
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`
$ dmesg|grep tty
[ 0.000000] console [tty0] enabled
[ 460.175426] usb 2-1.2: pl2303 converter now attached to ttyUSB0
[ 478.375365] pl2303 ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32
[ 478.375732] pl2303 ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32
[ 478.672989] pl2303 ttyUSB0: pl2303_set_control_lines - failed: -19
[ 478.673006] pl2303 ttyUSB0: error sending break = -19
[ 478.673382] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
[ 479.442249] usb 2-1.2: pl2303 converter now attached to ttyUSB1
[ 480.719091] pl2303 ttyUSB1: pl2303 converter now disconnected from ttyUSB1
You may ask about this information:
$ uname -a
Linux kumar54-Laptop-home 4.15.0-101-generic #102~16.04.1-Ubuntu SMP Mon May 11 11:44:23 UTC 2020 i686 i686 i686 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 18.3 Sylvia
Release: 18.3
Codename: sylvia
I have a Segger J-Link which I am trying to use on a Macbook running MacOS Catalina 10.15.4, with openocd and GDB against an ESP32 board. The problem is that I can not seen the device:
$ ls /dev/cu.*
/dev/cu.Bluetooth-Incoming-Port /dev/cu.JimsiPhone-WirelessiAP /dev/cu.SLAB_USBtoUART /dev/cu.usbserial-0001
None of these is the J-Link. If I run lsusb I can see it:
$ lsusb
Bus 020 Device 002: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 020 Device 003: ID 1366:0101 SEGGER J-Link ARM
I have installed the "J-Link Software and Documentation Pack" downloaded from Segger. I have checked the Mac "Security and privacy" settings and it does not report that it blocked any drivers or programs from being installed or run.
On the J-Link, the green LED is on, with a very brief flash about twice per second.
I'm sure I have a piece missing, and would appreciate some help.
UPDATE: I have been following instructions here:
OpenOCD Instructions
It all works until I get to step 6, and I follow these instructions:
Serial driver instructions
The problem is, a path for the driver never shows up, as I described above. I don't think I can run OpenOCD if I can't make it talk to my J-link.
When I run openocd-esp32, I get (full paste from openocd-esp32 output is below):
Error: No J-Link device found.
The contents of esp32-wroom-32.cfg is:
echo "WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release."
set ESP32_FLASH_VOLTAGE 3.3
source [find target/esp32.cfg]
Here is the full paste:
Jims-MacBook-Pro-486:~ jim$ openocd -f interface/jlink.cfg -f board/esp-wroom-32.cfg -c "program_esp32 build/hello-world.bin 0x10000 verify exit"
Open On-Chip Debugger v0.10.0-esp32-20200420 (2020-04-20-16:15)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
Info : Configured 2 cores
Error: No J-Link device found.
** OpenOCD init failed **
shutdown command invoked
Assertion failed: (jtag_trst == 0), function jtag_checks, file src/jtag/core.c, line 343.
Abort trap: 6
Running JLinkExe does find the J-Link:
Jims-MacBook-Pro-486:~ jim$ JLinkExe
SEGGER J-Link Commander V6.80b (Compiled Jun 5 2020 17:42:04)
DLL version V6.80b, compiled Jun 5 2020 17:41:46
Connecting to J-Link via USB...Updating firmware: J-Link V11 compiled Apr 23 2020 16:49:23
Replacing firmware: J-Link V11 compiled Aug 14 2019 16:21:09
Waiting for new firmware to boot
New firmware booted successfully
O.K.
Firmware: J-Link V11 compiled Apr 23 2020 16:49:23
Hardware version: V11.00
S/N: 51000936
License(s): GDB
VTref=0.000V
Type "connect" to establish a target connection, '?' for help
J-Link>
After doing the above I now get a different error message when running openocd-esp32 (perhaps because of the J-Link FW upgrade?). Initially it complained that there was not an adapter speed set, so I modified interface/jlink.cfg and added:
adapter_khz 3000
I now get a different error:
Error: JTAG scan chain interrogation failed: all ones
Which I have been Googling, and which could mean a bad board or still another configuration issue. There is no SD card in the SD card socket and no other SPI devices on the board, although the ESP32-WROVER-32U has SPI flash on it.
Here is the complete output from openocd-esp32:
Jims-MacBook-Pro-486:~ jim$ openocd -f interface/jlink.cfg -f board/esp-wroom-32.cfg -c "program_esp32 build/hello-world.bin 0x10000 verify exit"
Open On-Chip Debugger v0.10.0-esp32-20200420 (2020-04-20-16:15)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 3000 kHz
WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
Info : Configured 2 cores
Info : J-Link V11 compiled Apr 23 2020 16:49:23
Info : Hardware version: 11.00
Info : VTarget = 0.000 V
Info : clock speed 3000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : Listening on port 3333 for gdb connections
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : cpu0: Debug controller 0 was reset.
Info : cpu0: Core 0 was reset.
Error: esp32_soc_reset: Couldn't halt target before SoC reset
embedded:startup.tcl:449: Error: ** Unable to reset target **
in procedure 'program_esp32'
in procedure 'program_esp' called at file "/Users/jim/.espressif/tools/openocd-esp32/v0.10.0-esp32-20200420/openocd-esp32/share/openocd/scripts/target/esp32.cfg", line 64
in procedure 'program_error' called at file "/Users/jim/.espressif/tools/openocd-esp32/v0.10.0-esp32-20200420/openocd-esp32/share/openocd/scripts/target/esp_common.cfg", line 75
at file "embedded:startup.tcl", line 449
Warn : Flash driver of esp32.flash does not support free_driver_priv()
Warn : Flash driver of esp32.irom does not support free_driver_priv()
Warn : Flash driver of esp32.drom does not support free_driver_priv()
Success! This circuit used the Segger 10 pin needle connector. On that connector pin 1 is VTREF and on my board it was left floating, when it should have been connected to V3.3. I connected it and:
Jims-MacBook-Pro-486:~ jim$ openocd -f interface/jlink.cfg -f board/esp32-wrover.cfg
Open On-Chip Debugger v0.10.0-esp32-20200420 (2020-04-20-16:15)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz
WARNING: boards/esp32-wrover.cfg is deprecated, and may be removed in a future release.
If your board is ESP32-WROVER-KIT, use board/esp32-wrover-kit-1.8v.cfg instead.
Info : Configured 2 cores
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : J-Link V11 compiled Apr 23 2020 16:49:23
Info : Hardware version: 11.00
Info : VTarget = 3.290 V
Info : clock speed 1000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32: Debug controller 0 was reset.
Info : esp32: Core 0 was reset.
Info : esp32: Debug controller 1 was reset.
Info : esp32: Core 1 was reset.
Info : Listening on port 3333 for gdb connections
I would suggest to validate your setup step by step - I personally do not like big bang integrations.
Verify that your the Segger software can see your JLink probe - the good thing is that lsusb can see it. JLink Commander should provide some useful information.
Launch openocd without any executable-related arguments: openocd -f interface/jlink.cfg -f board/esp-wroom-32.cfg
Verify that basic commands are working, i.e. resetting the CPU, displaying registers, reading/writing memory.
If you you are still experimenting issues, double-check your wiring - see here for more information.
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.
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.
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.