* commit "Fix Use hashtable to record udev path" breaks huawei
@ 2010-05-19 13:19 Kalle Valo
2010-05-19 15:23 ` Kalle Valo
0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2010-05-19 13:19 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 773 bytes --]
Hi,
while working on third version of my huawei gprs patches I noticed that
this commit breaks huawei:
commit af976f7e524746b1b55645967e11ab8250f593a8
Author: Zhenhua Zhang <zhenhua.zhang@intel.com>
Date: Tue May 11 09:04:28 2010 +0800
Fix Use hashtable to record udev path
Sometimes, Udev device 'remove' event could not report correct parent
node of current udev_device. Current code replies on the devpath
attached on the parent node to find modem and then remove it.
This fix is to change the way to store the devpath info into a
hashtable. So that we search hashtable to get devpath and remove the
modem.
I reverted the commit and huawei works again for me. More details later
today.
--
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: commit "Fix Use hashtable to record udev path" breaks huawei
2010-05-19 15:23 ` Kalle Valo
@ 2010-05-19 13:55 ` Denis Kenzior
2010-05-20 1:18 ` Zhang, Zhenhua
1 sibling, 0 replies; 5+ messages in thread
From: Denis Kenzior @ 2010-05-19 13:55 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2583 bytes --]
Hi Kalle,
> Sorry, I was too hasty. The patch is fine, I was just testing
> inproperly. After a bit more testing I found out that problem always
> happens when I plugin the usb modem:
>
> May 19 17:20:09 tukki connmand[30925]: plugins/ofono.c:modem_changed() path
> /huawei1 May 19 17:20:10 tukki ofonod[672]: < ATE0\r\r\nOK\r\n
> May 19 17:20:10 tukki ofonod[672]: > AT+CFUN=1\r
> May 19 17:20:10 tukki ofonod[672]: < \r\nOK\r\n
> May 19 17:20:10 tukki ofonod[672]: plugins/huawei.c:cfun_enable()
> May 19 17:20:10 tukki ofonod[672]: > AT+CRC=1\r
> May 19 17:20:10 tukki ofonod[672]: < \r\n+CME ERROR: SIM busy\r\n
> May 19 17:20:10 tukki ofonod[672]: > AT+CLIP=1\r
> May 19 17:20:10 tukki ofonod[672]: < \r\n+CME ERROR: SIM busy\r\n
> May 19 17:20:10 tukki ofonod[672]: > AT+COLP=1\r
> May 19 17:20:10 tukki ofonod[672]: < \r\n+CME ERROR: SIM busy\r\n
> May 19 17:20:10 tukki ofonod[672]: > AT+CCWA=1\r
> May 19 17:20:10 tukki ofonod[672]: < \r\n+CME ERROR: SIM busy\r\n
> May 19 17:20:10 tukki ofonod[672]:
> drivers/atmodem/voicecall.c:at_voicecall_initialized() voicecall_init:
> registering to notifications May 19 17:20:10 tukki ofonod[672]:
> src/sim.c:ofono_sim_add_state_watch() 0x132bcd0 May 19 17:20:10 tukki
> ofonod[672]: * < \r\n^STIN:0,0,0\r\n
> May 19 17:20:10 tukki ofonod[672]: > AT+CGMI\r
> May 19 17:20:10 tukki connmand[30925]: plugins/ofono.c:modem_changed() path
> /huawei1 May 19 17:20:10 tukki ofonod[672]: < \r\nhuawei\r\n\r\nOK\r\n
> May 19 17:20:10 tukki ofonod[672]: > AT+CRSM=176,28590,0,0,1\r
> May 19 17:20:10 tukki connmand[30925]: plugins/ofono.c:modem_changed() path
> /huawei1 May 19 17:20:10 tukki ofonod[672]: < \r\n+CME ERROR: SIM busy\r\n
> May 19 17:20:10 tukki ofonod[672]: > AT+CLCC\r
> May 19 17:20:10 tukki ofonod[672]: < \r\n+CME ERROR: SIM busy\r\n
> May 19 17:20:10 tukki ofonod[672]: > AT+CRSM=192,28599\r
> May 19 17:20:10 tukki ofonod[672]: < \r\n+CME ERROR: SIM busy\r\n
> May 19 17:20:10 tukki ofonod[672]: src/voicecall.c:ecc_g2_read_cb() 0
> May 19 17:20:10 tukki ofonod[672]: > AT+CGMM\r
> May 19 17:20:10 tukki ofonod[672]: < \r\nE1552\r\n\r\nOK\r\n
>
> But if I start ofono while the usb modem is plugged in it works fine.
> Also modem disable and then enable workarounds it. Oh well.
>
Sounds like the SIM needs some time to be initialized. Perhaps a Huawei
specific command might be required to figure out when the SIM is actually ready.
Try listening to ^SIMST or simply re-trying a particular command until you
don't get SIM busy error.
Regards,
-Denis
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: commit "Fix Use hashtable to record udev path" breaks huawei
2010-05-19 13:19 commit "Fix Use hashtable to record udev path" breaks huawei Kalle Valo
@ 2010-05-19 15:23 ` Kalle Valo
2010-05-19 13:55 ` Denis Kenzior
2010-05-20 1:18 ` Zhang, Zhenhua
0 siblings, 2 replies; 5+ messages in thread
From: Kalle Valo @ 2010-05-19 15:23 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 3049 bytes --]
Kalle Valo <kalle.valo@canonical.com> writes:
> while working on third version of my huawei gprs patches I noticed that
> this commit breaks huawei:
>
> commit af976f7e524746b1b55645967e11ab8250f593a8
> Author: Zhenhua Zhang <zhenhua.zhang@intel.com>
> Date: Tue May 11 09:04:28 2010 +0800
>
> Fix Use hashtable to record udev path
>
> Sometimes, Udev device 'remove' event could not report correct parent
> node of current udev_device. Current code replies on the devpath
> attached on the parent node to find modem and then remove it.
>
> This fix is to change the way to store the devpath info into a
> hashtable. So that we search hashtable to get devpath and remove the
> modem.
>
> I reverted the commit and huawei works again for me. More details later
> today.
Sorry, I was too hasty. The patch is fine, I was just testing
inproperly. After a bit more testing I found out that problem always
happens when I plugin the usb modem:
May 19 17:20:09 tukki connmand[30925]: plugins/ofono.c:modem_changed() path /huawei1
May 19 17:20:10 tukki ofonod[672]: < ATE0\r\r\nOK\r\n
May 19 17:20:10 tukki ofonod[672]: > AT+CFUN=1\r
May 19 17:20:10 tukki ofonod[672]: < \r\nOK\r\n
May 19 17:20:10 tukki ofonod[672]: plugins/huawei.c:cfun_enable()
May 19 17:20:10 tukki ofonod[672]: > AT+CRC=1\r
May 19 17:20:10 tukki ofonod[672]: < \r\n+CME ERROR: SIM busy\r\n
May 19 17:20:10 tukki ofonod[672]: > AT+CLIP=1\r
May 19 17:20:10 tukki ofonod[672]: < \r\n+CME ERROR: SIM busy\r\n
May 19 17:20:10 tukki ofonod[672]: > AT+COLP=1\r
May 19 17:20:10 tukki ofonod[672]: < \r\n+CME ERROR: SIM busy\r\n
May 19 17:20:10 tukki ofonod[672]: > AT+CCWA=1\r
May 19 17:20:10 tukki ofonod[672]: < \r\n+CME ERROR: SIM busy\r\n
May 19 17:20:10 tukki ofonod[672]: drivers/atmodem/voicecall.c:at_voicecall_initialized() voicecall_init: registering to notifications
May 19 17:20:10 tukki ofonod[672]: src/sim.c:ofono_sim_add_state_watch() 0x132bcd0
May 19 17:20:10 tukki ofonod[672]: * < \r\n^STIN:0,0,0\r\n
May 19 17:20:10 tukki ofonod[672]: > AT+CGMI\r
May 19 17:20:10 tukki connmand[30925]: plugins/ofono.c:modem_changed() path /huawei1
May 19 17:20:10 tukki ofonod[672]: < \r\nhuawei\r\n\r\nOK\r\n
May 19 17:20:10 tukki ofonod[672]: > AT+CRSM=176,28590,0,0,1\r
May 19 17:20:10 tukki connmand[30925]: plugins/ofono.c:modem_changed() path /huawei1
May 19 17:20:10 tukki ofonod[672]: < \r\n+CME ERROR: SIM busy\r\n
May 19 17:20:10 tukki ofonod[672]: > AT+CLCC\r
May 19 17:20:10 tukki ofonod[672]: < \r\n+CME ERROR: SIM busy\r\n
May 19 17:20:10 tukki ofonod[672]: > AT+CRSM=192,28599\r
May 19 17:20:10 tukki ofonod[672]: < \r\n+CME ERROR: SIM busy\r\n
May 19 17:20:10 tukki ofonod[672]: src/voicecall.c:ecc_g2_read_cb() 0
May 19 17:20:10 tukki ofonod[672]: > AT+CGMM\r
May 19 17:20:10 tukki ofonod[672]: < \r\nE1552\r\n\r\nOK\r\n
But if I start ofono while the usb modem is plugged in it works fine.
Also modem disable and then enable workarounds it. Oh well.
--
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: commit "Fix Use hashtable to record udev path" breaks huawei
2010-05-19 15:23 ` Kalle Valo
2010-05-19 13:55 ` Denis Kenzior
@ 2010-05-20 1:18 ` Zhang, Zhenhua
2010-05-20 5:13 ` Kalle Valo
1 sibling, 1 reply; 5+ messages in thread
From: Zhang, Zhenhua @ 2010-05-20 1:18 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 3691 bytes --]
Hi Kalle,
Kalle Valo wrote:
> Kalle Valo <kalle.valo@canonical.com> writes:
>
>> while working on third version of my huawei gprs patches I noticed
>> that this commit breaks huawei:
>>
>> commit af976f7e524746b1b55645967e11ab8250f593a8
>> Author: Zhenhua Zhang <zhenhua.zhang@intel.com>
>> Date: Tue May 11 09:04:28 2010 +0800
>>
>> Fix Use hashtable to record udev path
>>
>> Sometimes, Udev device 'remove' event could not report correct
>> parent node of current udev_device. Current code replies on the
>> devpath attached on the parent node to find modem and then
>> remove it.
>>
>> This fix is to change the way to store the devpath info into a
>> hashtable. So that we search hashtable to get devpath and remove
>> the modem.
>>
>> I reverted the commit and huawei works again for me. More details
>> later today.
>
> Sorry, I was too hasty. The patch is fine, I was just testing
> inproperly. After a bit more testing I found out that problem
> always happens when I plugin the usb modem:
>
> May 19 17:20:09 tukki connmand[30925]:
> plugins/ofono.c:modem_changed() path /huawei1 May 19 17:20:10
> tukki ofonod[672]: < ATE0\r\r\nOK\r\n May 19 17:20:10 tukki
> ofonod[672]: > AT+CFUN=1\r May 19 17:20:10 tukki ofonod[672]:
> < \r\nOK\r\n May 19 17:20:10 tukki ofonod[672]:
> plugins/huawei.c:cfun_enable() May 19 17:20:10 tukki
> ofonod[672]: > AT+CRC=1\r May 19 17:20:10 tukki ofonod[672]: <
> \r\n+CME ERROR: SIM busy\r\n May 19 17:20:10 tukki
> ofonod[672]: > AT+CLIP=1\r May 19 17:20:10 tukki ofonod[672]:
> < \r\n+CME ERROR: SIM busy\r\n May 19 17:20:10 tukki
> ofonod[672]: > AT+COLP=1\r May 19 17:20:10 tukki ofonod[672]:
> < \r\n+CME ERROR: SIM busy\r\n May 19 17:20:10 tukki
> ofonod[672]: > AT+CCWA=1\r May 19 17:20:10 tukki ofonod[672]:
> < \r\n+CME ERROR: SIM busy\r\n May 19 17:20:10 tukki
> ofonod[672]:
> drivers/atmodem/voicecall.c:at_voicecall_initialized()
> voicecall_init: registering to notifications May 19 17:20:10
> tukki ofonod[672]: src/sim.c:ofono_sim_add_state_watch()
> 0x132bcd0 May 19 17:20:10 tukki ofonod[672]: * <
> \r\n^STIN:0,0,0\r\n May 19 17:20:10 tukki ofonod[672]: >
> AT+CGMI\r May 19 17:20:10 tukki connmand[30925]:
> plugins/ofono.c:modem_changed() path /huawei1 May 19 17:20:10
> tukki ofonod[672]: < \r\nhuawei\r\n\r\nOK\r\n May 19 17:20:10
> tukki ofonod[672]: > AT+CRSM=176,28590,0,0,1\r May 19 17:20:10
> tukki connmand[30925]: plugins/ofono.c:modem_changed() path
> /huawei1 May 19 17:20:10 tukki ofonod[672]: < \r\n+CME ERROR:
> SIM busy\r\n May 19 17:20:10 tukki ofonod[672]: > AT+CLCC\r
> May 19 17:20:10 tukki ofonod[672]: < \r\n+CME ERROR: SIM
> busy\r\n May 19 17:20:10 tukki ofonod[672]: >
> AT+CRSM=192,28599\r May 19 17:20:10 tukki ofonod[672]: <
> \r\n+CME ERROR: SIM busy\r\n May 19 17:20:10 tukki
> ofonod[672]: src/voicecall.c:ecc_g2_read_cb() 0 May 19
> 17:20:10 tukki ofonod[672]: > AT+CGMM\r May 19 17:20:10 tukki
> ofonod[672]: < \r\nE1552\r\n\r\nOK\r\n
>
> But if I start ofono while the usb modem is plugged in it works fine.
> Also modem disable and then enable workarounds it. Oh well.
My commit af976f7e524 should not impact modem detection and power up stage. If you found huawei modem still exists in oFono after you unplug the dungle, I guess something maybe wrong in my patch. :-)
Maybe you need to wait until SIM is settled to power on it. As Denis said, listen '^SIMST' notification should be a good idea.
> --
> Kalle Valo
> _______________________________________________
> ofono mailing list
> ofono(a)ofono.org
> http://lists.ofono.org/listinfo/ofono
Regards,
Zhenhua
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: commit "Fix Use hashtable to record udev path" breaks huawei
2010-05-20 1:18 ` Zhang, Zhenhua
@ 2010-05-20 5:13 ` Kalle Valo
0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2010-05-20 5:13 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1091 bytes --]
"Zhang, Zhenhua" <zhenhua.zhang@intel.com> writes:
> Hi Kalle,
Hi Zhenhua,
> Kalle Valo wrote:
>> Kalle Valo <kalle.valo@canonical.com> writes:
>>
>>> while working on third version of my huawei gprs patches I noticed
>>> that this commit breaks huawei:
>>>
>>> commit af976f7e524746b1b55645967e11ab8250f593a8
>>> Author: Zhenhua Zhang <zhenhua.zhang@intel.com>
>>> Date: Tue May 11 09:04:28 2010 +0800
[...]
>> Sorry, I was too hasty. The patch is fine, I was just testing
>> inproperly. After a bit more testing I found out that problem
>> always happens when I plugin the usb modem:
>>
[...]
> My commit af976f7e524 should not impact modem detection and power up
> stage. If you found huawei modem still exists in oFono after you
> unplug the dungle, I guess something maybe wrong in my patch. :-)
Your patch is fine, I was just testing inproperly. I didn't use the
exactly the same test steps when I did the revert/unrevert cycle of your
patch, and that's why I falsely assumed that your patch broke it. Sorry
about that.
--
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-20 5:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-19 13:19 commit "Fix Use hashtable to record udev path" breaks huawei Kalle Valo
2010-05-19 15:23 ` Kalle Valo
2010-05-19 13:55 ` Denis Kenzior
2010-05-20 1:18 ` Zhang, Zhenhua
2010-05-20 5:13 ` Kalle Valo
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.