Denis,
I noticed from the logs that 'net' should have been probed by
huawei_cdc_ncm module instead of plain cdc_ncm. I managed getting sysfs
lines after "net finished" line in ofonod log after changing cdc_ncm to
huawei_cdc_ncm (below):
..plugins/udev.c:udev_event() subsystem net finished
..plugins/udevng.c:check_usb_device() huawei_cdc_ncm [12d1:1506]
..plugins/udevng.c:add_device()
/sys/devices/platform/ocp/47400000.usb/47401c00.usb/musb-hdrc.1.auto/usb2/2-1
..plugins/udevng.c:add_device()
/sys/devices/platform/ocp/47400000.usb/47401c00.usb/musb-hdrc.1.auto/usb2/2-1/2-1:1.1/net/wwan0
..plugins/udevng.c:add_device() wwan0 (huawei) 255/2/22 ==> (null) (null)
I also got net record from setup_huawei() printout:
..plugins/udevng.c:setup_huawei() mdm=/dev/ttyUSB0 pcui=/dev/ttyUSB2
diag=/dev/ttyUSB1 qmi=(null) net=wwan0
Now this process proceeded further providing printout from
provision_get_settings():
..plugins/provision.c:provision_get_settings() Provisioning for MCC 244,
MNC 05, SPN 'elisa'
..plugins/provision.c:provision_get_settings() Found 1 APs
..plugins/provision.c:provision_get_settings() Name: '(null)'
..plugins/provision.c:provision_get_settings() APN: 'internet'
..plugins/provision.c:provision_get_settings() Type:
OFONO_GPRS_CONTEXT_TYPE_INTERNET
..plugins/provision.c:provision_get_settings() Username: '(null)'
..plugins/provision.c:provision_get_settings() Password: '(null)'
After that came some errors:
..src/sim.c:ofono_sim_remove_spn_watch() 0x11cf60
ofonod: PCUI: > AT+CPBS=?\r
ofonod: PCUI: < \r\n+CME ERROR: 14\r\n
ofonod: PCUI: > AT+CPBS=?\r
ofonod: PCUI: < \r\n+CME ERROR: 14\r\n
ofonod: PCUI: > AT+CPBS=?\r
ofonod: PCUI: < \r\n+CPBS: ("SM","EN","ON")\r\n\r\nOK\r\n
I did not see any progress on connman side.
Modifications in plugins/udevng.c
vendor_list[]:
{ "huawei", "huawei_cdc_ncm", "12d1" },
setup_huawei():
g_strcmp0(info->interface, "255/2/22") == 0 ||
g_strcmp0(info->interface, "255/1/56") == 0) {
net = info->devnode;
Where should I look next?
I could provide full log, but I am not sure if attachments/messages with
attachments pass through.
Thanks,
Matti
2016-01-08 17:36 GMT+02:00 matti kaasinen <[email protected]>:
> Denis,
> It was not that easy as adding that "255/2/22" -line ( without '(' ) for
> net detection.
> It still returns null for net. Ofono.log attached.
>
> -Matti
>
> 2016-01-08 15:59 GMT+02:00 matti kaasinen <[email protected]>:
>
>> Denis,
>>
>> I studied both my desktop operation (ModemManager & NetworkManager) and
>> Cortex A8 board operation with ofono & connaman. I took logs from both of
>> them (attached). I also took lsusb listing and verified sysfs with my
>> desktop logs.
>> From ModemManager logs it seems that ModemManager does not suppoer
>> cdc-wdm interface. It finds three interfaces:
>> tty/ttyUSB2 at (primary)
>> net/wwan0 data (primary)
>> tty/ttyUSB0 data (secondary)
>>
>> Cortex A8 board sysfs seems have following nodes:
>>
>> /sys/devices/platform/ocp/47400000.usb/47401c00.usb/musb-hdrc.1.auto/usb2/2-1/2-1:1.0/ttyUSB0
>>
>> /sys/devices/platform/ocp/47400000.usb/47401c00.usb/musb-hdrc.1.auto/usb2/2-1/2-1:1.1/net/wwan0
>>
>> /sys/devices/platform/ocp/47400000.usb/47401c00.usb/musb-hdrc.1.auto/usb2/2-1/2-1:1.2/ttyUSB1
>>
>> /sys/devices/platform/ocp/47400000.usb/47401c00.usb/musb-hdrc.1.auto/usb2/2-1/2-1:1.3/ttyUSB2
>>
>> Thereafter it seems using ttuUSB2 for communication (AT commands anyway).
>> Compared to sysfs/lsusb and ofono.log
>> ttyUSB2 and ttyUSB0 match (bDeviceSubClass/bDeviceProtocol). Both use
>> ttyUSB2. However ofono does not get setup_huawei()/net, so it does not have
>> net/wwan0=net. As you noted, most likely setup_huawei() logic requires
>> following modification:
>> } else if (g_strcmp0(info->interface, "255/1/8") == 0 ||
>> (g_strcmp0(info->interface, "255/2/22") == 0 ||
>> g_strcmp0(info->interface, "255/1/56") == 0) {
>> net = info->devnode;
>>
>> I'll try that and see how it works.
>> -Matti
>>
>> 2016-01-07 18:39 GMT+02:00 Denis Kenzior <[email protected]>:
>>
>>> Matti,
>>>
>>> On 01/07/2016 03:54 AM, matti kaasinen wrote:
>>>
>>>> Denis,
>>>>
>>>> I inserted that line to vendor_list[]. Unfortunately it did not make any
>>>> difference.
>>>> I need to execute /usr/lib/ofono/
>>>> enable-modem
>>>> online-modem
>>>>
>>>> After that cellular_...._context1 becomes powered on
>>>> connmanctl monitor reports these events. It also reports Strength
>>>> changes.
>>>>
>>>
>>> Sounds like the modem is being detected
>>>
>>>
>>>> When I try to execute:
>>>> connmanctl connect cellular_244052161781216_context1
>>>>
>>>> I get:
>>>> Error /net/connman/service/cellular_244052161781216_context1:
>>>> Input/output error
>>>>
>>>>
>>> It is hard to say anything without detailed oFono logs. Can you enable
>>> AT command logging and debug information using:
>>>
>>> as root:
>>> export OFONO_AT_DEBUG=1
>>> src/ofonod -n -d
>>>
>>> When I try to execute:
>>>> connmanctl config cellular_244052161781216_context1 --autoconnect yes
>>>>
>>>> I get:
>>>> Error cellular_244052161781216_context1: Invalid service
>>>>
>>>> This is just like it used to be before change.
>>>>
>>>> Supposing that I can somehow get this modem connected,
>>>> is it so that I need to create some agent as followes:
>>>> 1) Monitoring modem presence, e.g using
>>>> /usr/lib/ofono/test/list-contexts command.
>>>> 2) When above command returns proper context execute enable-modem and
>>>> online-modem.
>>>>
>>>> After that there should be a new service available for connaman.
>>>> Should I also write an agent monitoring/excuting connect from that event
>>>> or is there some more advanced way of doing that. Or should it work as
>>>> smoothly as it works with older version of this modem using cdc_ether
>>>> when some (hopefully minor problem gets solved) - just plug modem in and
>>>> it gets connected?
>>>>
>>>>
>>> It should work the same as older devices.
>>>
>>> I think the issue is that the NetworkInterface associated with the
>>> context is not being detected properly. E.g. rules in plugins/udevng.c
>>> need to be updated. Check out setup_huawei() function and make sure that
>>> the logic that assigns "net" is correct for your device.
>>>
>>> Regards,
>>> -Denis
>>>
>>>
>>
>
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono