The C Source, Patches and (shudder!) Bugs
Post Reply
dan66
Posts: 1
Joined: 04 Mar 2015, 21:33

usb_modswitch causes Segmentation fault

Post by dan66 » 04 Mar 2015, 23:14

Hi All,

I'm trying to get usb_modeswitch running in an embedded environment. My problem is that when I run usb_modeswitch I get a Segmentation fault. I'm using Xilinx Petalinux development tools, my kernel is 3.8.11 and I'm targeting a Xilinx Zynq SoC. The modem I'm working with is a Verizon Pantech UMW190. I have cross-compiled usb_modeswitch and libusb-1.0 and installed them on my target.

Because I'm working with an embedded target, I don't have udev so I'm trying to tun usb_modeswitch in manual mode. The command is based on the following information from the device reference file:

#######################################################
# Pantech / UTStarcom UMW190 (Verizon)
#
# Contributor: Noel J. Bergman, Gus Esquivel

DefaultVendor= 0x106c
DefaultProduct=0x3b05

TargetVendor= 0x106c
TargetProduct= 0x3716

MessageContent="555342431234567824000000800008ff020000000000000000000000000000"

The actual command base on the above info is:

usb_modeswitch -v 106c -p 3716 -M 555342431234567824000000800008ff020000000000000000000000000000

Here's what I see when I remove and insert the modem and run the command:

root@Anritsu:/lib#
root@Anritsu:/lib# usb 1-1.3: USB disconnect, device number 8
usb 1-1.3: new high-speed USB device number 9 using xusbps-ehci
usb 1-1.3: New USB device found, idVendor=106c, idProduct=3b05
usb 1-1.3: New USB device strings: Mfr=3, Product=2, SerialNumber=0
usb 1-1.3: Product: UMW190 USB Modem
usb 1-1.3: Manufacturer: Pantech, Incorporated
scsi6 : usb-storage 1-1.3:1.0
scsi 6:0:0:0: CD-ROM UMW190 CD-ROM 2.31 PQ: 0 ANSI: 2
sr0: scsi3-mmc drive: 24x/24x xa/form2 caddy
sr 6:0:0:0: Attached scsi generic sg0 type 5
<4567824000000800008ff020000000000000000000000000000 (beginning of command hidden by TeraTerm)
Take all parameters from the command line


* usb_modeswitch: handle USB devices with multiple modes
* Version 2.2.0 (C) Josua Dietze 2014
* Based on libusb1/libusbx

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x106c
DefaultProduct= 0x3716
MessageContent="555342431234567824000000800008ff020000000000000000000000000000"
NeedResponse=0

Segmentation fault

Regards,

Dan

otila
Posts: 6
Joined: 12 Feb 2015, 20:59

Re: usb_modswitch causes Segmentation fault

Post by otila » 17 Mar 2015, 01:52

dan66 wrote:Hi All,

I'm trying to get usb_modeswitch running in an embedded environment. My problem is that when I run usb_modeswitch I get a Segmentation fault.
Try the patch at
http://www.draisberghof.de/usb_modeswit ... f=2&t=2219

Post Reply