Tuesday 23 October 2012

USB modem connection in Ubuntu 12.04

Welcome to the world of Ubuntu!!

I had faced several issues to get internet connectivity on Ubuntu 12.04 using Tata Photon + usb modem. I was able to solve the issue with certain difficulty. Here I am giving the proper steps to make your life simpler.

First connect Photon + modem to your laptop using a USB port.

Case-1: If you connect Photon + (EC156), it would be detected automatically by the system.

(a) Go to the edit connections:
(b) Go to "Mobile Broadband" tab
(c) Click on "add" button to add Photon + : It would take inherently 4 more sub-steps to configure the device

It is simpler, and works absolutely fine.



Case-2: If you connect Photon + (EC156), it would not be detected automatically by the system.

This is bit time consuming one. But, don't worry, follow the steps mentioned below. 

(a) Open a terminal Ctrl + Alt + t
(b) type "lsusb"

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 007: ID 12d1:1505 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard
Bus 001 Device 006: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II]
Bus 001 Device 004: ID 413c:8197 Dell Computer Corp. 
Bus 001 Device 005: ID 1bcf:2895 Sunplus Innovation Technology Inc. 

(c) Observe USB Modem info.
(d) cd /etc/usb_modeswitch.d
(e) sudo vi 12d1:1505 (this is the detail shown in above command) and add below details.

##### usb photon + details
DefaultVendor= 0x12d1
DefaultProduct=0x1505

TargetVendor = 0x12d1
TargetProduct = 0x140b

TargetProductList = "140b"

MessageContent="55534243123456780000000000000011062000000100000000000000000000"

CheckSuccess = 20

(f) run this command to configure photon + usb modem. 
sudo usb_modeswitch -I -W -c /etc/usb_modeswitch.d/12d1\:1505

Reading config file: /etc/usb_modeswitch.d/12d1:1505
Warning: TargetProductList overrides TargetProduct!

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 1.2.3 (C) Josua Dietze 2012
 * Based on libusb0 (0.1.12 and above)

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x1505
TargetVendor=   0x12d1
TargetProduct=  not set
TargetClass=    not set
TargetProductList="140b"

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint=  not set
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
NeedResponse=0
ResponseEndpoint= not set

InquireDevice disabled
Success check enabled, max. wait time 20 seconds
System integration mode disabled


usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 001 on 004
skipping descriptor 0x30
skipped 1 class/vendor specific endpoint descriptors
usb_os_find_devices: Found 007 on 003
usb_os_find_devices: Found 001 on 003
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 002 on 002
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 006 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 4 class/vendor specific interface descriptors
usb_os_find_devices: Found 005 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 12 class/vendor specific interface descriptors
skipping descriptor 0xFF
skipped 1 class/vendor specific endpoint descriptors
usb_os_find_devices: Found 004 on 001
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
Looking for target devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1505
   found matching vendor ID
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04e8:6860
  searching devices, found USB ID 1bcf:2895
  searching devices, found USB ID 413c:8197
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 No devices in target mode or class found
Looking for default devices ...
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:1505
   found matching vendor ID
   found matching product ID
   adding device
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04e8:6860
  searching devices, found USB ID 1bcf:2895
  searching devices, found USB ID 413c:8197
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Found device in default mode, class or configuration (1)
Accessing device 007 on bus 003 ...
Getting the current device configuration ...
 OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x08 (out) and 0x87 (in)

USB description data (for identification)
-------------------------
Manufacturer: HUA�WEI TECHNOLOGIES
     Product: HUAWEI Mobile
  Serial No.: �������������������
-------------------------
Looking for active driver ...
USB error: could not get bound driver: No data available
 No driver found. Either detached before or never attached
Setting up communication with interface 0
Using endpoint 0x08 for message sending ...
Trying to send message 1 to endpoint 0x08 ...
 OK, message successfully sent
Resetting response endpoint 0x87
Resetting message endpoint 0x08
USB error: could not clear/halt ep 8: Protocol error
 Could not reset endpoint (probably harmless): -71
USB error: could not release intf 0: No such device
 Device is gone, skipping any further commands

Checking for mode switch (max. 20 times, once per second) ...
 Searching for target devices ...
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 001 on 004
skipping descriptor 0x30
skipped 1 class/vendor specific endpoint descriptors
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 002 on 002
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 006 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 4 class/vendor specific interface descriptors
usb_os_find_devices: Found 005 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 12 class/vendor specific interface descriptors
skipping descriptor 0xFF
skipped 1 class/vendor specific endpoint descriptors
usb_os_find_devices: Found 004 on 001
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04e8:6860
  searching devices, found USB ID 1bcf:2895
  searching devices, found USB ID 413c:8197
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 001 on 004
skipping descriptor 0x30
skipped 1 class/vendor specific endpoint descriptors
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 002 on 002
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 006 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 4 class/vendor specific interface descriptors
usb_os_find_devices: Found 005 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 12 class/vendor specific interface descriptors
skipping descriptor 0xFF
skipped 1 class/vendor specific endpoint descriptors
usb_os_find_devices: Found 004 on 001
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04e8:6860
  searching devices, found USB ID 1bcf:2895
  searching devices, found USB ID 413c:8197
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 001 on 004
skipping descriptor 0x30
skipped 1 class/vendor specific endpoint descriptors
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 002 on 002
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 006 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 4 class/vendor specific interface descriptors
usb_os_find_devices: Found 005 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 12 class/vendor specific interface descriptors
skipping descriptor 0xFF
skipped 1 class/vendor specific endpoint descriptors
usb_os_find_devices: Found 004 on 001
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04e8:6860
  searching devices, found USB ID 1bcf:2895
  searching devices, found USB ID 413c:8197
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
 Searching for target devices ...
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 001 on 004
skipping descriptor 0x30
skipped 1 class/vendor specific endpoint descriptors
usb_os_find_devices: Found 008 on 003
usb_os_find_devices: Found 001 on 003
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 002 on 002
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 006 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 4 class/vendor specific interface descriptors
usb_os_find_devices: Found 005 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 12 class/vendor specific interface descriptors
skipping descriptor 0xFF
skipped 1 class/vendor specific endpoint descriptors
usb_os_find_devices: Found 004 on 001
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
  searching devices, found USB ID 1d6b:0003
  searching devices, found USB ID 12d1:140b
   found matching vendor ID
   found matching product ID from list
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 04e8:6860
  searching devices, found USB ID 1bcf:2895
  searching devices, found USB ID 413c:8197
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 1d6b:0002

Found target device, now opening

Found target device 008 on bus 003

Target device description data
-------------------------
Manufacturer: HUA�WEI TECHNOLOGIES
     Product: HUAWEI Mobile
  Serial No.: �������������������
-------------------------
 Found correct target device

Mode switch succeeded. Bye.

(g) Now proceed to the case-1: of this post to connect to the internet world.



PS: You are required to run "sudo usb_modeswitch -I -W -c /etc/usb_modeswitch.d/12d1\:1505" each time to configure tata photon + modem.