Re: OpenWrt package and udev rules

2019-11-15 Thread Enrico Mioso
Yeah. That mechanism may be useful for a built in package. OpenVPN uses that I 
think 
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: OpenWrt package and udev rules

2019-11-15 Thread Bjørn Mork
Enrico Mioso  writes:

> Or the keep.d directory... ?

Except that change won't survive sysupgrade.  /etc/sysupgrade.conf will


Bjørn
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: OpenWrt package and udev rules

2019-11-15 Thread Enrico Mioso
Or the keep.d directory... ?
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: OpenWrt package and udev rules

2019-11-15 Thread Bjørn Mork
Bjørn Mork  writes:
> Aleksander Morgado  writes:
>
>> Just add a ID_MM_DEVICE_IGNORE rule as you would have done with udev,
>> and restart the daemon.
>
> I should obviously have tried that first.  Worked perfectly.  After a
> reboot though. I believe the caching made it a noop on restart?

One problem with this, which is an argument for replacing the udev rules
with simpler config files, is that there is no way to add local
persistent (across system upgrades) udev rules in OpenWrt.  Unless I
missed that as well...

OK, I could of course add a file in /lib/udev/rules.d and add the name
of that file in /etc/sysupgrade.conf, but that's a little more than
should be needed for a local blacklist override IMHO.

I believe a nice addition to the OpenWrt packaging would be a
modemmanager UCI file, with any configurable stuff like log level, local
blacklists etc. Making such settings survive a sysupgrade is essential.

>> Also, could you please retry running ModemManager with
>> "--filter-policy=STRICT" (e.g. just edit the /etc/init.d/modemmanager
>> file to add that)? I would suggest we switch to that filter policy for
>> the defaults everywhere, including openwrt. When using that filter
>> policy, a USB device that only exposes ttyUSB ports would not be
>> probed automatically.
>
>
> Will do that later.  Don't have time for more testing right now.

Works perfectly, as expected.  I believe it's a good default, at least
for OpenWrt.  Right now, there is no install-base expecting current
behaviour.  And I don't think OpenWrt users want to edit any config
files outside /etc/config.  Defaulting to "--filter-policy=STRICT" will
reduce the need to do that.



Bjørn
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

RE: OpenWrt package and udev rules

2019-11-14 Thread Amol Lad
This rule is already in MM 1.12.0. You had to apply it separately?

root@OpenWrt:/lib/udev/rules.d# cat 77-mm-sierra.rules

# do not edit this file, it will be overwritten on update
ACTION!="add|change|move|bind", GOTO="mm_sierra_end"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1199", GOTO="mm_sierra"
GOTO="mm_sierra_end"

LABEL="mm_sierra"
SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", 
ENV{.MM_USBIFNUM}="$attr{bInterfaceNumber}"

# Netgear AC341U: enable connection status polling explicitly
ATTRS{idVendor}=="1199", ATTRS{idProduct}=="9057", 
ENV{ID_MM_QMI_CONNECTION_STATUS_POLLING_ENABLE}="1"

# MC74XX: Add port hints
#  if 03: primary port
#  if 02: raw NMEA port
#  if 00: diag/qcdm port
ATTRS{idVendor}=="1199", ATTRS{idProduct}=="9071", ENV{.MM_USBIFNUM}=="03", 
ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1"
ATTRS{idVendor}=="1199", ATTRS{idProduct}=="9071", ENV{.MM_USBIFNUM}=="02", 
ENV{ID_MM_PORT_TYPE_GPS}="1"
ATTRS{idVendor}=="1199", ATTRS{idProduct}=="9071", ENV{.MM_USBIFNUM}=="00", 
ENV{ID_MM_PORT_TYPE_QCDM}="1"

LABEL="mm_sierra_end"

From: ModemManager-devel  On 
Behalf Of Nick B
Sent: Friday, 15 November 2019 5:14 AM
To: Bjørn Mork 
Cc: ModemManager (development) ; 
Aleksander Morgado 
Subject: Re: OpenWrt package and udev rules

Hey,

FWIW, updating these rules definitely sped up the configuration of my MC7430 on 
OpenWrt by about 20 to 30 seconds. See:

https://www.mail-archive.com/modemmanager-devel@lists.freedesktop.org/msg05430.html


Best,
Nick

The information in this email communication (inclusive of attachments) is 
confidential to 4RF Limited and the intended recipient(s). If you are not the 
intended recipient(s), please note that any use, disclosure, distribution or 
copying of this information or any part thereof is strictly prohibited and that 
the author accepts no liability for the consequences of any action taken on the 
basis of the information provided. If you have received this email in error, 
please notify the sender immediately by return email and then delete all 
instances of this email from your system. 4RF Limited will not accept 
responsibility for any consequences associated with the use of this email 
(including, but not limited to, damages sustained as a result of any viruses 
and/or any action or lack of action taken in reliance on it).
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: OpenWrt package and udev rules

2019-11-14 Thread Nick B
Hey,

FWIW, updating these rules definitely sped up the configuration of my MC7430 on 
OpenWrt by about 20 to 30 seconds. See:

https://www.mail-archive.com/modemmanager-devel@lists.freedesktop.org/msg05430.html
 



Best,
Nick___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel