<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div style="margin: 0;">Hi Aleksander,</div><div style="margin: 0;">Sorry bother you again. In our local another PC, the way previous I used</div><div style="margin: 0;">don't work by method 'sudo systemctl start ModemManager'. <br></div><div style="margin: 0;">But command method 'sudo ModemManager' works.</div><div style="margin: 0;">There are 2 attachments for reference.</div><div style="margin: 0;">ModemManager.log was generated by command</div><div style="margin: 0;">  'sudo ModemManager --debug --log-level=DEBUG'</div><div style="margin: 0;">And ModemManager.service.log was generated by command</div><div style="margin: 0;"> 'sudo systemctl start ModemManager'<br></div><div style="margin: 0;"><br></div><div style="margin: 0;">We can see modem can attach to NW in ModemManager.log since Fcc Lock</div><div style="margin: 0;">has been unlocked, even though there is no unlock message print(does it</div><div style="margin: 0;">reasonable?). But in another log, we can see modem was stuck in state3 and <br></div><div style="margin: 0;">state4.</div><div style="margin: 0;"><br></div><div style="margin: 0;">Env as below:<br></div><div style="margin: 0;">Test platform: Uuntu 22.04.4 LTS</div><div style="margin: 0;">kernel version:6.5.0-27-generic<br></div><div style="margin: 0;">ModemManager version: 1.20.0<br></div><div style="margin: 0;"><br></div><div style="margin: 0;">Hope to get your advice!</div><div style="margin: 0;">Thank you!<br></div><pre>At 2024-04-15 11:16:09, "Slark Xiao" <slark_xiao@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@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@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
</pre></div><img style="width:1px;height:1px" src="https://count.mail.163.com/beacon/webmail.gif?type=webmail_mailtrace&guid=pre_448da545def80d8a1688f2e1a384a93b">