Re: [LEDE-DEV] [PATCH] uqmi: Set data format after clearing previous autoconnect state.
Hi. Any interest? 2016-12-30 14:12 GMT+03:00 Nickolay Ledovskikh <nledovsk...@gmail.com>: > Clearing previous autoconnect state when using Sierra Airprime MC7304 > drops data format to 'raw-ip' (MC7710 is not behave the same). This > leads to dhcp freeze. So data format must be set after stopping > previous network. > > Signed-off-by: Nickolay Ledovskikh <nledovsk...@gmail.com> > --- > package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh > b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh > index 35de6c5..47475f6 100755 > --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh > +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh > @@ -96,8 +96,6 @@ proto_qmi_setup() { > } > } > > - uqmi -s -d "$device" --set-data-format 802.3 > - uqmi -s -d "$device" --wda-set-data-format 802.3 > uqmi -s -d "$device" --sync > > echo "Waiting for network registration" > @@ -134,6 +132,9 @@ proto_qmi_setup() { > --stop-network 0x \ > --autoconnect > /dev/null > > + uqmi -s -d "$device" --set-data-format 802.3 > + uqmi -s -d "$device" --wda-set-data-format 802.3 > + > pdh_4=`uqmi -s -d "$device" --set-client-id wds,"$cid_4" \ > --start-network \ > ${apn:+--apn $apn} \ > @@ -165,6 +166,9 @@ proto_qmi_setup() { > --stop-network 0x \ > --autoconnect > /dev/null > > + uqmi -s -d "$device" --set-data-format 802.3 > + uqmi -s -d "$device" --wda-set-data-format 802.3 > + > pdh_6=`uqmi -s -d "$device" --set-client-id wds,"$cid_6" \ > --start-network \ > ${apn:+--apn $apn} \ > -- > 2.7.3 > -- Best regards, Nikolay Ledovskikh. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [LEDE-DEV v3] Add support of using device symlinks.
> The patch is missing the subject prefix. please make sure to add it next > time. I have fixed it for you while merging the patch into my staging tree. Thank you very much. You mean subject prefix (after ..v3] and before "Add support ...")? What should I write if there are more than one targets to patch, this case comgt, uqmi? And it seems that I misunderstood the meaning of --subject-prefix. It should be something like "PATCH V3" (not LEDE-DEV v3)? -- Best regards, Nikolay Ledovskikh. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [LEDE-DEV v3] Add support of using device symlinks.
> pong ... > > "weekend, that thing where people rest" OK. I'll wait for that wonderful moment -- Best regards, Nikolay Ledovskikh. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [LEDE-DEV v3] Add support of using device symlinks.
> It's useful when using multiple usb devices that should be bound to > certain usb ports. Symlinks are created by hotplug handlers. Ping. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [LEDE-DEV, 3/3, v2] uqmi: Prevent 'POLICY MISMATH' error.
Thanks for your comments. I'll update patches with your tips and send new versions. 2016-12-16 11:41 GMT+03:00 Matti Laakso <malaa...@elisanet.fi>: >> On 07/12/2016 18:13, Nickolay Ledovskikh wrote: >> >/Add uqmi 'sync' command call to release stalled cid when preparing to >> > />/setup new connection. As a result it prevents 'POLICY MISMATCH' errors. >> > />//>/Signed-off-by: Nickolay Ledovskikh > > <http://lists.infradead.org/mailman/listinfo/lede-dev>> />/--- >> > />/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 1 + />/1 file >> > changed, 1 insertion(+) />//>/diff --git >> > a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh >> > b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh />/index >> > fb4c339..3b24539 100755 />/--- >> > a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh />/+++ >> > b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh />/@@ -85,6 >> > +85,7 >> > @@ proto_qmi_setup() { />//>/# try to clear previous autoconnect state />/# >> > do not reuse previous wds client id to prevent hangs caused by stale data >> > />/+ uqmi -s -d "$device" --sync />/uqmi -s -d "$device" \ >> > />/--stop-network >> > 0x \ />/--autoconnect > /dev/null />// >> patch does not apply anymore after the latest series from Matti >> >> John > > > And you also need to bump up the uqmi version in the Makefile. > > Otherwise I think calling sync in the beginning is a good idea. > > Matti -- Best regards, Nikolay Ledovskikh. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [LEDE-DEV, 2/3, v2] Add support of using device symlinks.
> still pending not had time to look into this. it'll take me a moment as > i am not familiar with the code so i need to find a free moment to > properly review this, sorry for the delay > > John OK. I just offer to use 'readlink' onto 'device', so as a result we always get a real device if it were symlink or not. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [LEDE-DEV, 3/3, v3] uqmi: Prevent 'POLICY MISMATCH' error.
So. What about patch? 'sync' call allows us not to save cids in interface state. And every time interface is up, it will be prepared correctly. 2016-12-12 12:28 GMT+03:00 Bjørn Mork <bj...@mork.no>: > Matti Laakso <malaa...@elisanet.fi> writes: >> On 12.12.2016 08:52, Petr Štetiar wrote: >>> Matti Laakso <malaa...@elisanet.fi> [2016-12-09 11:35:35]: >>> >>>> On 09.12.2016 11:27, Petr Štetiar wrote: >>>>> I knew, that there's only one profile defined, operator has deleted all >>>>> other >>>>> profiles, there's currently only one APN defined. >>>>> >>>>>AT+CGDCONT? >>>>>+CGDCONT: 1,"IPV4V6","","0.0.0.0",0,0 >>>> Well, there's no APN defined (it's an empty string), and who knows, >>>> maybe the modem ignores the APN provided via QMI when enabling >>>> autoconnect... Does your working Czech SIM card have a valid APN string? >>> It's getting quite strange as my Czech SIM gives me the same reply: >>> >>>+CGDCONT: 1,"IPV4V6","","0.0.0.0",0,0 >>> >>> -- ynezz >> >> Just shooting in the dark here, but maybe this operator accepts empty >> APN and somehow maps it to the correct one? > > Some operators do, and some don't. Which is why the empty APN string > *may* work. It's generally not a good idea to depend on it, though. > The APN string often selects a specific service, with specific > bandwidth, QoS, firewall rules etc. So even in cases where the empty > string "works", the result might be suboptimal. > > In any case: Testing with empty or random APN strings will give > inconsistent results. It can for example be the reason why > autoconnect fails, while a manual connection with an explicit APN > works. Or why autoconnect works with one operator but not with another. > > For some background and better understanding of how the APN mapping in > an operator network is done, it might be useful to look at the config > examples for typical PGW/GGSNs (this is for StarOS, which is now owned > by Cisco): > http://www.cisco.com/c/en/us/td/docs/wireless/asr_5000/20/MME/b_20_MME_Admin/b_20_MME_Admin_chapter_0101.pdf > > > > Bjørn -- Best regards, Nikolay Ledovskikh. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [LEDE-DEV, 2/3, v2] Add support of using device symlinks.
So what? It's more general and useful when, for example you want to bind modem tty to certain usb port. 2016-12-07 20:13 GMT+03:00 Nickolay Ledovskikh <nledovsk...@gmail.com>: > It's useful when using multiple usb devices that should be bound to > certain usb ports. Symlinks are created by hotplug handlers. > > Signed-off-by: Nickolay Ledovskikh <nledovsk...@gmail.com> > --- > package/network/utils/comgt/files/directip.sh| 1 + > package/network/utils/comgt/files/ncm.sh | 2 ++ > package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 3 +++ > 3 files changed, 6 insertions(+) > > diff --git a/package/network/utils/comgt/files/directip.sh > b/package/network/utils/comgt/files/directip.sh > index 79b8c32..4dcbd70 100644 > --- a/package/network/utils/comgt/files/directip.sh > +++ b/package/network/utils/comgt/files/directip.sh > @@ -33,6 +33,7 @@ proto_directip_setup() { > return 1 > } > > + device="$(readlink -f $device)" > devname="$(basename "$device")" > devpath="$(readlink -f /sys/class/tty/$devname/device)" > ifname="$( ls "$devpath"/../../*/net )" > diff --git a/package/network/utils/comgt/files/ncm.sh > b/package/network/utils/comgt/files/ncm.sh > index 14b6347..917a8c5 100644 > --- a/package/network/utils/comgt/files/ncm.sh > +++ b/package/network/utils/comgt/files/ncm.sh > @@ -63,7 +63,9 @@ proto_ncm_setup() { > return 1 > } > > + device="$(readlink -f $device)" > devname="$(basename "$device")" > + > case "$devname" in > 'tty'*) > devpath="$(readlink -f /sys/class/tty/$devname/device)" > diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh > b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh > index 1235698..fb4c339 100755 > --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh > +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh > @@ -51,6 +51,7 @@ proto_qmi_setup() { > return 1 > } > > + device="$(readlink -f $device)" > devname="$(basename "$device")" > devpath="$(readlink -f /sys/class/usbmisc/$devname/device/)" > ifname="$( ls "$devpath"/net )" > @@ -213,6 +214,8 @@ qmi_wds_stop() { > > [ -n "$cid" ] || return > > + device="$(readlink -f $device)" > + > # disable previous autoconnect state using the global handle > uqmi -s -d "$device" --set-client-id wds,"$cid" --stop-network > "0x" > > -- > 2.7.3 > -- Best regards, Nikolay Ledovskikh. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] uqmi: Add support for specifying profile index
Tested your patch. It's working, but only after startup. When you disconnect modem from usb we have old cids saved. Then we connect modems back, modems won't bring up automatically (and I suppose they souldn't). And when we try to bring interface up we are falling into situation with locked up uqmi: 4912 root 1000 Suqmi -s -d /dev/cdc-wdm0 --set-client-id wds 2 --stop-network 0x --autoconnect 4980 root 1000 Suqmi -s -d /dev/cdc-wdm0 --get-pin-status 5020 root 1000 Suqmi -s -d /dev/cdc-wdm1 --set-client-id wds 2 --stop-network 0x --autoconnect 5090 root 992 Suqmi -s -d /dev/cdc-wdm1 --get-pin-status If we now kill all this uqmi processes, we then bring interfaces up :( Maybe it's all because of saved cids? Other case, when only modem's usb data lines are disconnected, without loosing power. This case we don't have locked up uqmi and manual 'ifup $iface' works. Saved cids released successfully. 2016-12-09 15:02 GMT+03:00 Felix Fietkau <n...@nbd.name>: > On 2016-12-03 23:05, Matti Laakso wrote: >> Update uqmi to latest version, which brings about support for >> specifying a call profile index instead of APN. A specific index >> different from 1 must be used for some service provider and modem >> combinations. >> >> Also make autoconnect optional and default it to off due to it not >> working with statically configured IPv6. >> >> Signed-off-by: Matti Laakso <malaa...@elisanet.fi> > I think autoconnect should default to on for IPv4, as long as we don't > have anything running on the host to replace it. > > If the autoconnect does not work with the device for some reason, you at > least notice it immediately (and realize you have to do some monitoring > of the connection). > > If autoconnect defaults to off and the device will simply stay > disconnected on the first network outage, that's a pretty bad default, > especially in cases where the device could just reconnect on its own. > > - Felix > > ___ > Lede-dev mailing list > Lede-dev@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/lede-dev -- Best regards, Nikolay Ledovskikh. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [LEDE-DEV, 3/3, v3] uqmi: Prevent 'POLICY MISMATCH' error.
OK. It seems I missed something when doing cleanup. Your patch is working, but only after startup. When you disconnect modem from usb we have old cids saved. Then we connect modems back, modems won't bring up automatically (and I suppose they souldn't). And when we try to bring interface up we are falling into situation with locked up uqmi: 4912 root 1000 Suqmi -s -d /dev/cdc-wdm0 --set-client-id wds 2 --stop-network 0x --autoconnect 4980 root 1000 Suqmi -s -d /dev/cdc-wdm0 --get-pin-status 5020 root 1000 Suqmi -s -d /dev/cdc-wdm1 --set-client-id wds 2 --stop-network 0x --autoconnect 5090 root 992 Suqmi -s -d /dev/cdc-wdm1 --get-pin-status If we now kill all this uqmi processes, we then bring interfaces up :( Maybe it's all because of saved cids? Other case, when only modem's usb data lines are disconnected, without loosing power. This case we don't have locked up uqmi and manual 'ifup $iface' works. Saved cids released successfully. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [LEDE-DEV, 3/3, v3] uqmi: Prevent 'POLICY MISMATCH' error.
> Are all modems the same? Do they have same firmware versions? Are you sure > that the mapping of different /dev/cdc-wdmX nodes always stay the same? It > could be that on some boot the modem with the Megafon SIM gets /dev/cdc-wdm0 > and on the second boot it gets /dev/cdc-wdm1 or some other number. Using > autoconnect may ignore the APN, and the modems seem to work correctly. If > you remove the APN options, does it work then? Yes, all the same hw and fw. And mapping is not changing. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [LEDE-DEV, 3/3, v3] uqmi: Prevent 'POLICY MISMATCH' error.
We are using sierra MC7710, MC7304. 2016-12-09 14:41 GMT+03:00 Nikolay Ledovskikh <nledovsk...@gmail.com>: >> I agree fully. That's why I added the autoconnect option in my last patch >> and defaulted it to disabled. >> >> Matti > > So, what we get: uqmi exit with 'Call failed'. > > -- > Best regards, Nikolay Ledovskikh. -- Best regards, Nikolay Ledovskikh. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [LEDE-DEV, 3/3, v3] uqmi: Prevent 'POLICY MISMATCH' error.
> I agree fully. That's why I added the autoconnect option in my last patch > and defaulted it to disabled. > > Matti So, what we get: uqmi exit with 'Call failed'. -- Best regards, Nikolay Ledovskikh. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [LEDE-DEV, 3/3, v3] uqmi: Prevent 'POLICY MISMATCH' error.
I'm using multiple modems config interface 'wan1' option proto 'qmi' option device '/dev/cdc-wdm0' option apn 'internet.megafon.ru' option ipv6 '0' option metric '1' config interface 'wan2' option proto 'qmi' option device '/dev/cdc-wdm1' option apn 'internet.beeline.ru' option ipv6 '0' option metric '2' And 2 more modems And with your patch logread shows endlessly: Fri Dec 9 09:38:15 2016 daemon.notice netifd: wan3 (18612): Command failed: Permission denied Fri Dec 9 09:38:15 2016 daemon.notice netifd: Interface 'wan3' is now down Fri Dec 9 09:38:15 2016 daemon.notice netifd: Interface 'wan3' is setting up now Fri Dec 9 09:38:15 2016 daemon.notice netifd: wan4 (18611): Waiting for network registration Fri Dec 9 09:38:16 2016 daemon.notice netifd: wan4 (18611): Starting network wan4 Fri Dec 9 09:38:16 2016 daemon.notice netifd: wan3 (18625): Waiting for network registration Fri Dec 9 09:38:16 2016 daemon.notice netifd: wan4 (18611): Unable to connect IPv4 Fri Dec 9 09:38:16 2016 daemon.notice netifd: wan3 (18625): Starting network wan3 Fri Dec 9 09:38:16 2016 daemon.notice netifd: wan4 (18655): Stopping network wan4 Fri Dec 9 09:38:16 2016 daemon.notice netifd: wan4 (18655): Command failed: Permission denied About cgdcont: 1'st modem: at+cgdcont? +CGDCONT: 1,"IP","internet.megafon.ru","0.0.0.0",0,0 +CGDCONT: 3,"IP","internet.megafon.ru","0.0.0.0",0,0 2'nd modem: at+cgdcont? +CGDCONT: 1,"IP","internet.beeline.ru","0.0.0.0",0,0 +CGDCONT: 3,"IP","internet.beeline.ru","0.0.0.0",0,0 And 2 more modems Only one (wan2) gets up and connected to network. What I'm doing wrong? 2016-12-09 12:35 GMT+03:00 Matti Laakso <malaa...@elisanet.fi>: > On 09.12.2016 11:27, Petr Štetiar wrote: >> >> Matti Laakso <malaa...@elisanet.fi> [2016-12-09 10:23:24]: >> >>> I don't think that the autoconnect setting is "transferred" to the >>> network, rather it could be tied to a specific call profile index, which >>> has the wrong APN. If your Slovakian SIM card has several predefined >>> profiles, this could be the case. If your modem exposes a virtual serial >>> port which accepts AT-commands, you could use AT+CGDCONT? to check. >> >> Thanks for the additional hints. Details about my modem: >> >> ATI >> Quectel >> EC20 >> Revision: EC20EQAR02A05E2G >> >> I knew, that there's only one profile defined, operator has deleted all >> other >> profiles, there's currently only one APN defined. >> >> AT+CGDCONT? >> +CGDCONT: 1,"IPV4V6","","0.0.0.0",0,0 > > > Well, there's no APN defined (it's an empty string), and who knows, maybe > the modem ignores the APN provided via QMI when enabling autoconnect... Does > your working Czech SIM card have a valid APN string? > > Matti > > >> >>> I agree fully. That's why I added the autoconnect option in my last >>> patch and defaulted it to disabled. >> >> Great, I've missed this patch. Going to take a look at it. >> >> -- ynezz > > -- Best regards, Nikolay Ledovskikh. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [LEDE-DEV, 3/3, v3] uqmi: Prevent 'POLICY MISMATCH' error.
No. All this is not working if cid is not released for some reason. For example: we have multiple modems with external power source, if usb DATA cable connection is broken for some reason, the cid will not be released and new network connection will not be established until you release the cid manually. 2016-12-08 16:39 GMT+03:00 Matti Laakso <malaa...@elisanet.fi>: >> >> Add uqmi 'sync' command call to release stalled cid when preparing to >> setup new connection. As a result it prevents 'POLICY MISMATCH' errors. >> >> Signed-off-by: Nickolay Ledovskikh > <http://lists.infradead.org/mailman/listinfo/lede-dev>> >> --- >> package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh >> b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh >> index fb4c339..3b24539 100755 >> --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh >> +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh >> @@ -85,6 +85,7 @@ proto_qmi_setup() { >> >> # try to clear previous autoconnect state >> # do not reuse previous wds client id to prevent hangs caused by stale >> data >> + uqmi -s -d "$device" --sync >> uqmi -s -d "$device" \ >> --stop-network 0x \ >> --autoconnect > /dev/null >> -- >> 2.7.3 >> >> > > I think my latest patch, > http://lists.infradead.org/pipermail/lede-dev/2016-December/004433.html > , should also fix this, since this is typically caused by IPv6 > autoconnect being enabled and trying to disable it with IPv4 client or > vice versa. My patch adds separate commands for IPv4 and IPv6. That > said, I don't like the autoconnect at all, it being so unpredictable > across various models. > > Matti -- Best regards, Nikolay Ledovskikh. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev