All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Nunes <philippe.nunes@linux.intel.com>
To: ofono@ofono.org
Subject: Re: [PATCH 0/3] oFono rules update
Date: Thu, 25 Aug 2011 15:48:57 +0200	[thread overview]
Message-ID: <4E5652C9.8000909@linux.intel.com> (raw)
In-Reply-To: <1314202864.3373.219.camel@aeonflux>

[-- Attachment #1: Type: text/plain, Size: 5628 bytes --]

On 08/24/2011 06:21 PM, Marcel Holtmann wrote:
> Hi Philippe,
>
>> Actually, with this dongle, we have 6 TTY (usb0 ->  usb5) and usb-devices
>> gives:
>>
>> T:  Bus=02 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 32 Spd=480 MxCh= 0
>> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
>> P:  Vendor=19d2 ProdID=0124 Rev=00.00
>> S:  Manufacturer=ZTE,Incorporated
>> S:  Product=ZTE WCDMA Technologies MSM
>> S:  SerialNumber=P671A2TMED010000
>> C:  #Ifs= 7 Cfg#= 1 Atr=e0 MxPwr=500mA
>> I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
>> I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
>> I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
>> I:  If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
>> I:  If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
>> I:  If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
>> I:  If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
>>
>> Now, ttyUSB5 is not responsive. So, for this particular dongle, the
>> modem interface won't be on the last interface. Anyway, as I'm just
>> looking to add the condition related to the interface number 04, it
>> doesn't really matter.
>
> so on which interfaces do we actually have the modem and the aux channel
> now.
>
Actually, with current udevng.c, aux channel is on ttyUSB1 and modem is 
on ttyUSB3. But in practice, modem should be on ttyUSB4.

> And more important now, do we use the right usb_modeswitch magic to
> switch it into this mode.

My configuration:
usb modeswitch Version 1.1.8, 2011/06/19
usb modeswitch data package 2011/07/14

Or is Windows using something different?

Windows Device Manager gives the following results:

Vendor Id: 19d2 / Product Id: 0124 (same as after usb_modeswitch)

ZTE Diagnostic port		 	- 00
ZTE AT port			 	- 01
ZTE ATExt2 port 			- 02
ZTE USB SmartCard Reader 		- 03
ZTE Proprietary USB Modem 		- 04
ZTE Mobile broadband Network manager 	- 05

So, it confirms that the modem port com is on ttyUSB4.
For ZTE, the proposed change (add the condition related to the interface 
number 04) seems relevant.


Now, I found an other mismatch with Speedup dongles:
In practice, enabling the dongle speedup SU-7300 fails actually in timeout.

Looking to the oFono traces, we have:
...
ofonod[32238]: plugins/udevng.c:setup_speedup() 
/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1
ofonod[32238]: plugins/udevng.c:setup_speedup() /dev/ttyUSB0 255/255/255 
00 (null)
ofonod[32238]: plugins/udevng.c:setup_speedup() /dev/ttyUSB1 255/255/255 
01 (null)
ofonod[32238]: plugins/udevng.c:setup_speedup() /dev/ttyUSB2 255/255/255 
02 (null)
ofonod[32238]: plugins/udevng.c:setup_speedup() /dev/ttyUSB3 255/255/255 
03 (null)
ofonod[32238]: plugins/udevng.c:setup_speedup() /dev/ttyUSB4 255/255/255 
04 (null)
ofonod[32238]: plugins/udevng.c:setup_speedup() aux=/dev/ttyUSB1 
modem=/dev/ttyUSB3

...

ofonod[32238]: plugins/speedupcdma.c:open_device() Modem /dev/ttyUSB3
ofonod[32238]: src/modem.c:get_modem_property() modem 0x9a0bc00 property Aux
ofonod[32238]: plugins/speedupcdma.c:open_device() Aux /dev/ttyUSB1
ofonod[32238]: Modem: > ATE0 &C0 +CMEE=1\r
ofonod[32238]: Aux: > ATE0 &C0 +CMEE=1\r
ofonod[32238]: Modem: < ATE0 &C0 +CMEE=1\r\r\nOK\r\n
ofonod[32238]: src/modem.c:set_powered_timeout() modem: 0x9a0bc00


Aux channel is not responsive.
As you can see, aux channel is now set to ttyUSB1 whereas it was set 
previously to ttyUSB3 (as stated by the rules below).

# SpeedUp 7300
ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9e00", 
ENV{ID_USB_INTERFACE_NUM}=="00", ENV{OFONO_SPEEDUP_TYPE}="modem"
ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9e00", 
ENV{ID_USB_INTERFACE_NUM}=="03", ENV{OFONO_SPEEDUP_TYPE}="aux"

Looking to the previous ofono rules related to speedup dongles, aux 
channel was always assigned to the last interface. Now, with udevng.c, 
aux channel is always assigned to ttyUSB1 and modem is set on the last 
interface.
So, currently, aux channel and modem channel are switched.

But in practice, this seems wrong.
I tried indeed with a Speedup 9800 and I could notice that the network 
registration unsolicited result codes (+CREG, +CGREG) were received on 
the modem channel instead of the aux channel. This issue is raised 
already by the bug #20553 (Meego)

Now, if the aux channel is set properly on the last interface, the 
remaining issue is that the modem channel can't be always assigned on 
ttyUSB1.
At least for speedup 7300 (and generally for speedup cdma dongles ?), 
modem channel should be assigned to ttyUSB0.

So, I propose the following change in udevng.c:

@@ -311,12 +311,17 @@ static gboolean setup_speedup(struct modem_info 
*modem)
  			if (aux != NULL)
  				break;
  		} else if (g_strcmp0(info->interface, "255/255/255") == 0) {
-			if (g_strcmp0(info->number, "01") == 0)
-				aux = info->devnode;
-			else if (g_strcmp0(info->number, "02") == 0)
+			if (g_strcmp0(info->number, "00") == 0 &&
+					g_strcmp0(modem->driver,
+							"speedupcdma") == 0)
  				mdm = info->devnode;
-			else if (g_strcmp0(info->number, "03") == 0)
+			else if (g_strcmp0(info->number, "01") == 0 &&
+					mdm == NULL)
  				mdm = info->devnode;
+			else if (g_strcmp0(info->number, "02") == 0)
+				aux = info->devnode;
+			else if (g_strcmp0(info->number, "03") == 0)
+				aux = info->devnode;
  		}
  	}

Please, let me know if I can go ahead with a proper patch.
Thanks,

Regards,

Philippe.







      reply	other threads:[~2011-08-25 13:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-11 15:38 [PATCH 0/3] oFono rules update Philippe Nunes
2011-08-11 15:38 ` [PATCH 1/3] udev: use ttyUSB3 for ZTE K3570 modem port Philippe Nunes
2011-08-11 15:38 ` [PATCH 2/3] udev: add support for Olive HSDPA modem Philippe Nunes
2011-08-12  0:49   ` Deng, Ying An
2011-08-11 15:38 ` [PATCH 3/3] udev: Use ttyUSB4 for Huawei E367 Pcui port Philippe Nunes
2011-08-11 16:21 ` [PATCH 0/3] oFono rules update Marcel Holtmann
2011-08-23 15:26   ` Philippe Nunes
2011-08-23 16:13     ` Marcel Holtmann
2011-08-24 10:34       ` Philippe Nunes
2011-08-24 16:21         ` Marcel Holtmann
2011-08-25 13:48           ` Philippe Nunes [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E5652C9.8000909@linux.intel.com \
    --to=philippe.nunes@linux.intel.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.