Skip to contentSkip to conversation

Enable hs 2330 MBM modem

PATCH In review Zhigang Li 3 participants 6 messages Jan 28, 2011 – Feb 23, 2011

lore
Share & tools
lore

Zhigang Li

author
#0 lore raw

PATCH 1/1 Enable hs 2330 MBM modem

---
 plugins/udev.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
plugins/udev.c +4 -0
index 202b225..810049a 100644
@@ -123,6 +123,7 @@ static void add_mbm(struct ofono_modem *modem,
 			g_str_has_suffix(desc, "Minicard Modem 2") ||
 			g_str_has_suffix(desc, "Mini-Card Modem") ||
 			g_str_has_suffix(desc, "Broadband Modem") ||
+			g_str_has_suffix(desc, "Module Modem") ||
 			g_str_has_suffix(desc, "Broadband USB Modem")) {
 		devnode = udev_device_get_devnode(udev_device);
 		if (ofono_modem_get_string(modem, MODEM_DEVICE) == NULL)
@@ -131,16 +132,19 @@ static void add_mbm(struct ofono_modem *modem,
 			ofono_modem_set_string(modem, DATA_DEVICE, devnode);
 	} else if (g_str_has_suffix(desc, "Minicard Data Modem") ||
 			g_str_has_suffix(desc, "Mini-Card Data Modem") ||
+			g_str_has_suffix(desc, "Data Modem") ||
 			g_str_has_suffix(desc, "Broadband Data Modem")) {
 		devnode = udev_device_get_devnode(udev_device);
 		ofono_modem_set_string(modem, DATA_DEVICE, devnode);
 	} else if (g_str_has_suffix(desc, "Minicard GPS Port") ||
 			g_str_has_suffix(desc, "Mini-Card GPRS Port") ||
+			g_str_has_suffix(desc, "Module NMEA") ||
 			g_str_has_suffix(desc, "Broadband GPS Port")) {
 		devnode = udev_device_get_devnode(udev_device);
 		ofono_modem_set_string(modem, GPS_DEVICE, devnode);
 	} else if (g_str_has_suffix(desc, "Minicard Network Adapter") ||
 			g_str_has_suffix(desc, "Mini-Card Network Adapter") ||
+			g_str_has_suffix(desc, "Module Network Adapter") ||
 			g_str_has_suffix(desc, "Broadband Network Adapter") ||
 			g_str_has_suffix(desc, "Minicard NetworkAdapter")) {
 		devnode = get_property(udev_device, "INTERFACE");
Signature · 1 line
1.7.2.3
#1 lore raw

Hi Zhigang,

Quoted 13 lines
plugins/udev.c +1 -0
index 202b225..810049a 100644
@@ -123,6 +123,7 @@ static void add_mbm(struct ofono_modem *modem,
 			g_str_has_suffix(desc, "Minicard Modem 2") ||
 			g_str_has_suffix(desc, "Mini-Card Modem") ||
 			g_str_has_suffix(desc, "Broadband Modem") ||
+			g_str_has_suffix(desc, "Module Modem") ||
 			g_str_has_suffix(desc, "Broadband USB Modem")) {
 		devnode = udev_device_get_devnode(udev_device);
 		if (ofono_modem_get_string(modem, MODEM_DEVICE) == NULL)

plugins/udev.c static void add_mbm(struct ofono_modem *modem, · line 135

Quoted 4 lines
plugins/udev.c +1 -0
@@ -131,16 +132,19 @@ static void add_mbm(struct ofono_modem *modem,
 			ofono_modem_set_string(modem, DATA_DEVICE, devnode);
 	} else if (g_str_has_suffix(desc, "Minicard Data Modem") ||
 			g_str_has_suffix(desc, "Mini-Card Data Modem") ||
+			g_str_has_suffix(desc, "Data Modem") ||

I think this should be "Module Data Modem".

Quoted 5 lines
plugins/udev.c +0 -0
 			g_str_has_suffix(desc, "Broadband Data Modem")) {
 		devnode = udev_device_get_devnode(udev_device);
 		ofono_modem_set_string(modem, DATA_DEVICE, devnode);
 	} else if (g_str_has_suffix(desc, "Minicard GPS Port") ||
 			g_str_has_suffix(desc, "Mini-Card GPRS Port") ||

plugins/udev.c static void add_mbm(struct ofono_modem *modem, · line 150

Quoted 10 lines
plugins/udev.c +2 -0
+			g_str_has_suffix(desc, "Module NMEA") ||
 			g_str_has_suffix(desc, "Broadband GPS Port")) {
 		devnode = udev_device_get_devnode(udev_device);
 		ofono_modem_set_string(modem, GPS_DEVICE, devnode);
 	} else if (g_str_has_suffix(desc, "Minicard Network Adapter") ||
 			g_str_has_suffix(desc, "Mini-Card Network Adapter") ||
+			g_str_has_suffix(desc, "Module Network Adapter") ||
 			g_str_has_suffix(desc, "Broadband Network Adapter") ||
 			g_str_has_suffix(desc, "Minicard NetworkAdapter")) {
 		devnode = get_property(udev_device, "INTERFACE");

Rest seems fine to me.

Regards

Marcel

#2 lore raw

Hi Marcel,

Quoted 3 lines

plugins/udev.c static void add_mbm(struct ofono_modem *modem, · line 135

Quoted 1 line
plugins/udev.c +1 -0
+			g_str_has_suffix(desc, "Data Modem") ||

I think this should be "Module Data Modem".

This is confusing part, with my test with this modem on MeeGo image, the Module Data Modem doesn't work and only Data Modem works.

So I think it should be ok.

Thanks
Zhigang

_______________________________________________
ofono mailing list
ofono(a)ofono.org
http://lists.ofono.org/listinfo/ofono

#3 lore raw

Hi Zhigan,

Quoted 7 lines
Quoted 3 lines

plugins/udev.c static void add_mbm(struct ofono_modem *modem, · line 135

Quoted 1 line
plugins/udev.c +1 -0
+			g_str_has_suffix(desc, "Data Modem") ||

I think this should be "Module Data Modem".

This is confusing part, with my test with this modem on MeeGo image, the Module Data Modem doesn't work and only Data Modem works.

So I think it should be ok.

looks wrong to me. Please get the lsusb -v out for this modem where it lists the interface strings.

Regards

Marcel

#4 lore raw
Quoted 5 lines
Quoted 1 line

I think this should be "Module Data Modem".

looks wrong to me. Please get the lsusb -v out for this modem where it lists the interface strings.

Interface Descriptor:

      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              6 HP hs2330 Mobile Broadband Module| Data Modem

CDC Header:
bcdCDC 1.10
CDC Union:
bMasterInterface 1
bSlaveInterface 2
CDC Call Management:
bmCapabilities 0x03
call management
use DataInterface
bDataInterface 2
CDC ACM:
bmCapabilities 0x07
sends break
line coding and serial state
get/set/clear comm features
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x8a EP 10 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 8
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 7 HP hs2330 Mobile Broadband Module| Data Modem
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0

_______________________________________________
ofono mailing list
ofono(a)ofono.org
http://lists.ofono.org/listinfo/ofono

#5 lore raw

Hi Marcel,

Base on your request, I get the lsusb -v result, according the interface result, the "Data Modem" is ok, besides, my test result also ok. In fact, I tried "Module Data Modem", "Broadband Module Data Modem" all are don't work.

Quoted 2 lines

looks wrong to me. Please get the lsusb -v out for this modem where it lists the interface strings.

Interface Descriptor:

      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              6 HP hs2330 Mobile Broadband Module| Data Modem

CDC Header:
bcdCDC 1.10
CDC Union:
bMasterInterface 1
bSlaveInterface 2
CDC Call Management:
bmCapabilities 0x03
call management
use DataInterface
bDataInterface 2
CDC ACM:
bmCapabilities 0x07
sends break
line coding and serial state
get/set/clear comm features
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x8a EP 10 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 8
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 7 HP hs2330 Mobile Broadband Module| Data Modem
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0

thanks
zhigang