WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: usb-modeswitch  (Read 5366 times)

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 336
usb-modeswitch
« on: March 20, 2015, 12:19:18 PM »
Hi,

I sce-load usb-modeswitch for a dongle with modem 3g, that previously worked OK with TC4.7, but with ub-dcore-trusty 3.16.6 and 3.8.13 don't work with the message in dmesg:
Quote
usb 1-2: new high-speed USB device number 5 using ehci-pci
usb-storage 1-2:1.0: USB Mass Storage device detected
scsi5 : usb-storage 1-2:1.0
usb_modeswitch_[20912]: segfault at 0 ip b75a7891 sp bfc0732c error 4 in libc-2.19.so[b752c000+1a9000]
scsi 5:0:0:0: CD-ROM            USBModem MMC Storage      2.31 PQ: 0 ANSI: 2
sr2: scsi-1 drive
sr 5:0:0:0: Attached scsi CD-ROM sr2
sr 5:0:0:0: Attached scsi generic sg7 type 5

when in TC4.7 was:
Quote
usb 1-2: new high speed USB device number 5 using ehci_hcd
scsi5 : usb-storage 1-2:1.0
scsi 5:0:0:0: CD-ROM            USBModem MMC Storage      2.31 PQ: 0 ANSI: 2
sr2: scsi-1 drive
sr 5:0:0:0: Attached scsi CD-ROM sr2
sr 5:0:0:0: Attached scsi generic sg7 type 5
usb 1-2: USB disconnect, device number 5
usb 1-2: new high speed USB device number 6 using ehci_hcd
scsi6 : usb-storage 1-2:1.2
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for GSM modem (1-port)
option 1-2:1.0: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
option 1-2:1.1: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
option 1-2:1.3: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
scsi 6:0:0:0: Direct-Access     USBModem MMC Storage      2.31 PQ: 0 ANSI: 2
sd 6:0:0:0: Attached scsi generic sg7 type 0
sd 6:0:0:0: [sdf] Attached SCSI removable disk

seems that there is a segfault in usb-modeswitch (I have sce-imported it three different times with the same result in 3.8.13 and 3.16.6)


Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9659
Re: usb-modeswitch
« Reply #1 on: March 20, 2015, 01:16:02 PM »
I don't have the hardware to test, but I have googled many bug reports of this segfault issue.  If I find any pointers I will post them.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9659
Re: usb-modeswitch
« Reply #2 on: March 20, 2015, 06:15:18 PM »
I see the error mentions the file libc6-2.19.so, libc6 has been updated in trusty since the base has been last packed.

I have updated libc6 in the base image, in release candidates.  Give that a try and see if it was the issue.  My next task is to update the files in the base images of the x86 dCores.

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 336
Re: usb-modeswitch
« Reply #3 on: March 21, 2015, 04:20:24 AM »
Hi Jason,

With the new trusty-rc dCore.15.03.20 and re importing usb-modeswitch the dmesg is the same:
Quote
usb 1-2: new high-speed USB device number 5 using ehci-pci
usb-storage 1-2:1.0: USB Mass Storage device detected
scsi5 : usb-storage 1-2:1.0
usb_modeswitch_[16831]: segfault at 0 ip b75f7d51 sp bfd6968c error 4 in libc-2.19.so[b757d000+1a8000]
scsi 5:0:0:0: CD-ROM            USBModem MMC Storage      2.31 PQ: 0 ANSI: 2
sr2: scsi-1 drive
sr 5:0:0:0: Attached scsi CD-ROM sr2
sr 5:0:0:0: Attached scsi generic sg7 type 5

Can I do anything else?

Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6720
Re: usb-modeswitch
« Reply #4 on: March 21, 2015, 07:15:07 AM »
Code: [Select]
usb_modeswitch_[16831]: segfault at 0That sounds like something in the  usb-modeswitch  extension is passing a  NULL  pointer to  libc.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9659
Re: usb-modeswitch
« Reply #5 on: March 21, 2015, 09:39:11 AM »
Onyarian-
Could you try with the current Core 6.x and the 3.16.6 kernel and see if it works there?

That could help isolate it to being a userland issue.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9659
Re: usb-modeswitch
« Reply #6 on: March 21, 2015, 03:25:27 PM »
Also, could you try this in dCore-jessie or dCore-wheezy as to compare different builds of usb-modeswitch with the same kernel?

Thanks.

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 336
Re: usb-modeswitch
« Reply #7 on: March 22, 2015, 03:08:36 AM »
Hi,

The first prove with CorePlus-6.1: usb-modeswitch don't make the switch mode to modem:
tce-load usb-modeswitch-data.tcz, who loads usb-modeswitch.tcz

dmesg:
Quote
usb 1-2: new high-speed USB device number 5 using ehci-pci
usb-storage 1-2:1.0: USB Mass Storage device detected
scsi5 : usb-storage 1-2:1.0
scsi 5:0:0:0: CD-ROM            USBModem MMC Storage      2.31 PQ: 0 ANSI: 2
sr2: scsi-1 drive
sr 5:0:0:0: Attached scsi CD-ROM sr2
sr 5:0:0:0: Attached scsi generic sg7 type 5

Next prove with dCore-jessie

Offline jls

  • Hero Member
  • *****
  • Posts: 2133
Re: usb-modeswitch
« Reply #8 on: March 22, 2015, 06:11:39 AM »
Hi
if I remember well the extension should be loaded at boot time and the device already plugged.
U could also try to use the tczs in dCore since they are the same format as sce.
build scripts for core:
https://code.google.com/p/tc-ext-tools/source/browse/packages/usb-modeswitch
and
https://code.google.com/p/tc-ext-tools/source/browse/packages/usb-modeswitch-data
but should be adjusted for tc6.x
dCore user

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 336
Re: usb-modeswitch
« Reply #9 on: March 22, 2015, 06:15:22 AM »
Hi,

The second prove with dCore-jessie rc: sce-import usb-modeswitch, same result as CorePlus-6.1, don't make the switch to modem, but isn't the segfault from trusty

dmesg:
Quote
usb 1-2: new high-speed USB device number 5 using ehci-pci
[  112.917711] usb-storage 1-2:1.0: USB Mass Storage device detected
[  112.917860] scsi5 : usb-storage 1-2:1.0
[  113.922050] scsi 5:0:0:0: CD-ROM            USBModem MMC Storage      2.31 PQ: 0 ANSI: 2
[  113.924776] sr2: scsi-1 drive
[  113.925125] sr 5:0:0:0: Attached scsi CD-ROM sr2
[  113.925319] sr 5:0:0:0: Attached scsi generic sg7 type 5


Offline jls

  • Hero Member
  • *****
  • Posts: 2133
Re: usb-modeswitch
« Reply #10 on: March 22, 2015, 06:18:14 AM »
try
Code: [Select]
sudo udevadm trigger
dCore user

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 336
Re: usb-modeswitch
« Reply #11 on: March 22, 2015, 06:21:19 AM »
Hi jls_legalize,

Quote
if I remember well the extension should be loaded at boot time and the device already plugged.

In TC4.7 is not necessary to have it at boot and you can plug it after load usb-modeswitch

I will prove what you say at boot and plugged in CorePlus6.1, and "sudo udevadm trigger", and in dCore-jessie too.


« Last Edit: March 22, 2015, 06:23:38 AM by Onyarian »

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 336
Re: usb-modeswitch
« Reply #12 on: March 22, 2015, 08:36:06 AM »
Hi,

There are no differences with loading at boot and dongle plugged, and nothing happens in dmesg after "sudo udevadm trigger", by Core6.1 or by dCore-jessie.

No segfault but don't work either.


Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 336
Re: usb-modeswitch
« Reply #13 on: March 22, 2015, 02:14:10 PM »
Hi,

the problem is in usb-modeswitch.sce

I have converted and make the fusion of usb-modeswich.tcz and usb-modeswitch-data.tcz from the Core5.x repository to an usb-modeswitch5.sce and an usb-modeswitch5.sce.dep with:
Quote
usb-serial-3.16.6-tinycore
usbutils
wvdial
tk

Then the sce-import of usb-serial-3.16.6-tinycore, usbutils, wvdial and tk

then sce-load usb-modeswitch5.sce
plug the dongle, and the results of dmesg:
Quote
usb 1-2: new high-speed USB device number 5 using ehci-pci
usb-storage 1-2:1.0: USB Mass Storage device detected
scsi5 : usb-storage 1-2:1.0
usb 1-2: USB disconnect, device number 5
usb 1-2: new high-speed USB device number 6 using ehci-pci
usb-storage 1-2:1.2: USB Mass Storage device detected
scsi6 : usb-storage 1-2:1.2
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver option
usbserial: USB Serial support registered for GSM modem (1-port)
option 1-2:1.0: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
option 1-2:1.1: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
option 1-2:1.3: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2
scsi 6:0:0:0: Direct-Access     USBModem MMC Storage      2.31 PQ: 0 ANSI: 2
sd 6:0:0:0: Attached scsi generic sg7 type 0
sd 6:0:0:0: [sdf] Attached SCSI removable disk

and... Got it!

Of course this is not a very polite system to make or import an .sce but it says that the problem is in usb-modeswitch.sce from the ubuntu repository and that perhaps it is necessary adding some dependencies like tk (tcl and tk in Core5.x) and others that perhaps are not in the original .sce and probably in dCore-jessie too. That is the next prove.

At least, perhaps, it can be make a script to create this usb-modeswitch.


Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9659
Re: usb-modeswitch
« Reply #14 on: March 22, 2015, 04:38:57 PM »
Thanks for the testing, I will add the dependencies tk, usbutils, and wvdial to the usb-modeswitch dependency list for starters.