May I commit binary files into MM project?

Slark Xiao slark_xiao at 163.com
Tue Apr 16 11:26:52 UTC 2024


Hi Aleksander,
Sorry bother you again. In our local another PC, the way previous I used
don't work by method 'sudo systemctl start ModemManager'.

But command method 'sudo ModemManager' works.
There are 2 attachments for reference.
ModemManager.log was generated by command
  'sudo ModemManager --debug --log-level=DEBUG'
And ModemManager.service.log was generated by command
 'sudo systemctl start ModemManager'



We can see modem can attach to NW in ModemManager.log since Fcc Lock
has been unlocked, even though there is no unlock message print(does it
reasonable?). But in another log, we can see modem was stuck in state3 and

state4.


Env as below:

Test platform: Uuntu 22.04.4 LTS
kernel version:6.5.0-27-generic

ModemManager version: 1.20.0



Hope to get your advice!
Thank you!

At 2024-04-15 11:16:09, "Slark Xiao" <slark_xiao at 163.com> wrote:
>Good news! We renamed this script with format vid:pid and then it works.
>Also, we can see the FCC lock related log with debug level now.
>Thanks!
>
>At 2024-04-13 17:28:45, "Slark Xiao" <slark_xiao at 163.com> wrote:
>>
>>Hi Aleksander,
>>Refer to your advice, and the FCC unlock procedure page,we were merging our
>>binary tool into the Debian test platform(Ubuntu). But we got a failure to
>> unlock FCC.
>>We put the script into the path /usr/lib/x86_64-linux-gnu/ModemManager/
>>fcc-unlock.d. And this script will call our binary file FccLock in /usr/bin. 
>>
>>below is the script contents:
>>
>>#!/bin/sh
>># require program name and at least 2 arguments
>>[ $# -lt 2 ] && exit 1
>>
>># first argument is DBus path, not needed here
>>shift
>>
>># second and next arguments are control port names
>>for PORT in "$@"; do
>>  # match port type in Linux 5.14 and newer
>>  grep -q MBIM "/sys/class/wwan/$PORT/type" 2>/dev/null && {
>>    MBIM_PORT=$PORT
>>    break
>>  }
>>  # match port name in Linux 5.13
>>  echo "$PORT" | grep -q MBIM && {
>>    MBIM_PORT=$PORT
>>    break
>>  }
>>done
>>
>># fail if no MBIM port exposed
>>[ -n "$MBIM_PORT" ] || exit 2
>>
>>UNLOCK_RESULT=1
>>/usr/bin/FccLock -d /dev/$MBIM_PORT
>>
>>UNLOCK_RESULT=$?
>>if [ $UNLOCK_RESULT -ne 0 ]; then
>>  echo "SDX65 FCC unlock FAILED" >&2
>>fi
>>
>>exit $UNLOCK_RESULT
>>
>>
>>And we set the user and group of this file as root. Permission is 700.
>>When we restart MM, we can find that device always being locked.
>>But if we call this script with sudo, fcc lock would be unlocked right now. 
>>I also checked the log of MM, and it seems no FCC related logs would be
>>printed. Could you help me with some guidance and assistance?
>>
>>
>>At 2023-09-22 21:09:45, "Aleksander Morgado" <aleksandermj at chromium.org> wrote:
>>>Hey
>>>
>>>> I have a concern about can we commit binary files into /data/dispatcher-fcc-unlock folder?
>>>
>>>All the FCC unlock scripts/programs shipped by ModemManager are
>>>GPLv2+. If you can distribute your program under the GPLv2+, we could
>>>set it up to build from source along with the ModemManager project.
>>>
>>>If you want to dump a proprietary precompiled binary in the fcc-unlock
>>>folder, the answer is "no" :)
>>>
>>>Cheers!
>>>
>>>-- 
>>>Aleksander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20240416/5b9c7ba9/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ModemManager.log
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20240416/5b9c7ba9/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ModemManager.service.log
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20240416/5b9c7ba9/attachment-0003.ksh>


More information about the ModemManager-devel mailing list