Re: Telit HE910 not connecting with Modem Manager 1.6.4

2017-03-14 Thread Aleksander Morgado
Hey,

I've created a new bugreport, see:
https://bugs.freedesktop.org/show_bug.cgi?id=100205

Is this the same issue Salvador experienced?
https://bugs.freedesktop.org/attachment.cgi?id=130225

The previous logs are just after a SIM-PIN unlock; also modified the
after-sim-unlock step to wait 10s instead of 1s to make sure it wasn't
a timing issue.
It looks like after the SIM-PIN unlock, I lose completely the TTY, it
doesn't reply to any other AT command.

I have a patch that adds the CSIM=1 / CSIM=0 commands as Salvador
suggested, will send it to the list for review.



-- 
Aleksander
https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


RE: Telit HE910 not connecting with Modem Manager 1.6.4

2017-03-14 Thread Penalva, Salvador
Hi all,

We made some test applying Carlo’s patch and increasing the timeout of CSIM 
command as suggested, but when it does AT+CSIM=10,00210 after doing 
AT+CPIN=”pin” it gets stuck anyway (we even tried with a huge timeout but the 
driver timeout stops the execution before you can get any response). After this 
has happened you can even connect to the modem via microcom through the serial 
port but it doesn’t answer to any AT command.

In order to debug the problem, we removed from "mm-broadband-modem-telit.c" 
file the functions that used CSIM command ("MMUnlockRetrie and 
modem_load_unlock_retries"). These are the ones that ask the SIM how many 
retries of PIN and PUK it has. After disabling this functionality from the 
plugin, we were able to connect with a modem with an old FW without problem. 

I think it's quite clear that the problem is in that command and we also think 
that with a firmware update of the modem this doesn’t seem to happen anymore. 
We got this morning an update from telit and I will try it right now.  Anyway, 
it would be good a patch to this problems so that older versions of the FW of 
telit that used to work until now, could still work. Checking for which modems 
+CPINR works and use +CSIM on the rest as Aleksander suggested , could be a 
good solution. 

Thank you very much,

Salvador

-Original Message-
From: Aleksander Morgado [mailto:aleksan...@aleksander.es] 
Sent: martes, 14 de marzo de 2017 13:17
To: Carlo Lobrano
Cc: Reinhard Speyerer; Daniele Palmas; Penalva, Salvador; 
modemmanager-devel@lists.freedesktop.org
Subject: Re: Telit HE910 not connecting with Modem Manager 1.6.4

On Tue, Mar 14, 2017 at 10:30 AM, Carlo Lobrano <c.lobr...@gmail.com> wrote:
> Yes, +CPINR is not supported by all Telit modems (e.g. LE910 and LE910 
> V2), so I opted for the command with wider support. Changing the 
> timeout can be a solution and I'll made some tests.

We could always run +CPINR=? to look for support before using it, and otherwise 
fallback to +CSIM commands? If it's better to use +CPINR for any reason, why 
not do that?

--
Aleksander
https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: Telit HE910 not connecting with Modem Manager 1.6.4

2017-03-10 Thread Daniele Palmas
Hi Salvador,

2017-03-10 13:38 GMT+01:00 Penalva, Salvador :
> Hi Aleksander,
>
> Sorry for the delay but I was trying to debug a little more the logs to 
> isolate the problem.
>
> Answering to your question: We use SimpleConnect command inside a script but 
> we don't use network Manager.
>
> Finally, we got to the conclusion, that the problem could start when trying 
> to unlock the SIM. We tested just unlocking the SIM card with the pin in both 
> versions of ModemManager (1.4.12 and 1.6.4) and we think that the error could 
> be in this step that seem to have changed between both versions of 
> ModemManager. This part is just after sending the PIN to the SIM with CPIN in 
> MM 1.6.4:
>
> ModemManager[814]:  [1489145392.858937] 
> [../../ModemManager-1.6.4/src/mm-port-serial.c:1288] mm_port_serial_open(): 
> (ttyACM0) device open count is 1 (open)
> ModemManager[814]:  [1489145392.859398] 
> [../../ModemManager-1.6.4/src/mm-port-serial-at.c:459] debug_log(): 
> (ttyACM0): --> 'AT+CSIM=10,002100'
> ModemManager[814]:   [1489145396.334171] 
> [../../ModemManager-1.6.4/plugins/telit/mm-broadband-modem-telit.c:342] 
> csim_query_ready(): No respose for step 1: Serial command timed out
> ModemManager[814]:  [1489145396.334617] 
> [../../ModemManager-1.6.4/src/mm-port-serial.c:1288] mm_port_serial_open(): 
> (ttyACM0) device open count is 2 (open)
> ModemManager[814]:  [1489145396.334962] 
> [../../ModemManager-1.6.4/src/mm-port-serial.c:1345] _close_internal(): 
> (ttyACM0) device open count is 1 (close)
> ModemManager[814]:  [1489145396.335307] 
> [../../ModemManager-1.6.4/src/mm-port-serial-at.c:459] debug_log(): 
> (ttyACM0): --> 'AT+CSIM=10,002C000100'
> ModemManager[814]:   [1489145399.334315] 
> [../../ModemManager-1.6.4/plugins/telit/mm-broadband-modem-telit.c:342] 
> csim_query_ready(): No respose for step 2: Serial command timed out
> ModemManager[814]:  [1489145399.334760] 
> [../../ModemManager-1.6.4/src/mm-port-serial.c:1288] mm_port_serial_open(): 
> (ttyACM0) device open count is 2 (open)
> ModemManager[814]:  [1489145399.335107] 
> [../../ModemManager-1.6.4/src/mm-port-serial.c:1345] _close_internal(): 
> (ttyACM0) device open count is 1 (close)
> ModemManager[814]:  [1489145399.335456] 
> [../../ModemManager-1.6.4/src/mm-port-serial-at.c:459] debug_log(): 
> (ttyACM0): --> 'AT+CSIM=10,0020008100'
> ModemManager[814]:   [1489145402.811803] 
> [../../ModemManager-1.6.4/plugins/telit/mm-broadband-modem-telit.c:342] 
> csim_query_ready(): No respose for step 3: Sending command failed: 'Resource 
> tempora'
> ModemManager[814]:  [1489145402.812322] 
> [../../ModemManager-1.6.4/src/mm-port-serial.c:1288] mm_port_serial_open(): 
> (ttyACM0) device open count is 2 (open)
> ModemManager[814]:  [1489145402.812684] 
> [../../ModemManager-1.6.4/src/mm-port-serial.c:1345] _close_internal(): 
> (ttyACM0) device open count is 1 (close)
> ModemManager[814]:  [1489145402.813025] 
> [../../ModemManager-1.6.4/src/mm-port-serial-at.c:459] debug_log(): 
> (ttyACM0): --> 'AT+CSIM=10,002C008100'
> ModemManager[814]:   [1489145406.273564] 
> [../../ModemManager-1.6.4/plugins/telit/mm-broadband-modem-telit.c:342] 
> csim_query_ready(): No respose for step 4: Sending command failed: 'Resource 
> tempora'
> ModemManager[814]:   [1489145406.273995] 
> [../../ModemManager-1.6.4/src/mm-iface-modem.c:2960] 
> load_unlock_retries_ready(): Couldn't load unlock retries: 'Could not get any 
> of the SIM unlock retries'
> ModemManager[814]:  [1489145406.274272] 
> [../../ModemManager-1.6.4/src/mm-iface-modem.c:3110] 
> update_lock_info_context_step(): SIM is ready, and no need for the after SIM 
> unlock step...
> ModemManager[814]:  [1489145406.274795] 
> [../../ModemManager-1.6.4/src/mm-port-serial.c:1345] _close_internal(): 
> (ttyACM0) device open count is 0 (close)
> ModemManager[814]:  [1489145406.275051] 
> [../../ModemManager-1.6.4/src/mm-port-serial.c:1361] _close_internal(): 
> (ttyACM0) closing serial port...
> ModemManager[814]:  [1489145411.274803] 
> [../../ModemManager-1.6.4/src/mm-port-serial.c:1409] _close_internal(): 
> (ttyACM0) serial port closed
> ModemManager[814]:   [1489145411.277327] 
> [../../ModemManager-1.6.4/src/mm-iface-modem.c:1431] 
> __iface_modem_update_state_internal(): Modem 
> /org/freedesktop/ModemManager1/Modem/0: state changed (loc)
> ModemManager[814]:  [1489145411.282002] 
> [../../ModemManager-1.6.4/src/mm-port-serial.c:1158] mm_port_serial_open(): 
> (ttyACM0) opening serial port...
>

It seems to me that the modem got stuck and is not answering to AT
command. I see you are using firmware version 12.00.026: maybe it is
worth to contact Telit technical support for receiving latest firmware
to see if that makes a difference.

Regards,
Daniele

> Looking over the documentation of HE910 
> (http://www.telit.com/fileadmin/user_upload/products/Downloads/3G/Telit_3G_Modules_AT_Commands_Reference_Guide_r10.pdf
>  , page 115) which explains the CSIM command, it 

RE: Telit HE910 not connecting with Modem Manager 1.6.4

2017-03-10 Thread Penalva, Salvador
Hi Aleksander,

Sorry for the delay but I was trying to debug a little more the logs to isolate 
the problem.

Answering to your question: We use SimpleConnect command inside a script but we 
don't use network Manager.

Finally, we got to the conclusion, that the problem could start when trying to 
unlock the SIM. We tested just unlocking the SIM card with the pin in both 
versions of ModemManager (1.4.12 and 1.6.4) and we think that the error could 
be in this step that seem to have changed between both versions of 
ModemManager. This part is just after sending the PIN to the SIM with CPIN in 
MM 1.6.4:

ModemManager[814]:  [1489145392.858937] 
[../../ModemManager-1.6.4/src/mm-port-serial.c:1288] mm_port_serial_open(): 
(ttyACM0) device open count is 1 (open)
ModemManager[814]:  [1489145392.859398] 
[../../ModemManager-1.6.4/src/mm-port-serial-at.c:459] debug_log(): (ttyACM0): 
--> 'AT+CSIM=10,002100'
ModemManager[814]:   [1489145396.334171] 
[../../ModemManager-1.6.4/plugins/telit/mm-broadband-modem-telit.c:342] 
csim_query_ready(): No respose for step 1: Serial command timed out
ModemManager[814]:  [1489145396.334617] 
[../../ModemManager-1.6.4/src/mm-port-serial.c:1288] mm_port_serial_open(): 
(ttyACM0) device open count is 2 (open)
ModemManager[814]:  [1489145396.334962] 
[../../ModemManager-1.6.4/src/mm-port-serial.c:1345] _close_internal(): 
(ttyACM0) device open count is 1 (close)
ModemManager[814]:  [1489145396.335307] 
[../../ModemManager-1.6.4/src/mm-port-serial-at.c:459] debug_log(): (ttyACM0): 
--> 'AT+CSIM=10,002C000100'
ModemManager[814]:   [1489145399.334315] 
[../../ModemManager-1.6.4/plugins/telit/mm-broadband-modem-telit.c:342] 
csim_query_ready(): No respose for step 2: Serial command timed out
ModemManager[814]:  [1489145399.334760] 
[../../ModemManager-1.6.4/src/mm-port-serial.c:1288] mm_port_serial_open(): 
(ttyACM0) device open count is 2 (open)
ModemManager[814]:  [1489145399.335107] 
[../../ModemManager-1.6.4/src/mm-port-serial.c:1345] _close_internal(): 
(ttyACM0) device open count is 1 (close)
ModemManager[814]:  [1489145399.335456] 
[../../ModemManager-1.6.4/src/mm-port-serial-at.c:459] debug_log(): (ttyACM0): 
--> 'AT+CSIM=10,0020008100'
ModemManager[814]:   [1489145402.811803] 
[../../ModemManager-1.6.4/plugins/telit/mm-broadband-modem-telit.c:342] 
csim_query_ready(): No respose for step 3: Sending command failed: 'Resource 
tempora'
ModemManager[814]:  [1489145402.812322] 
[../../ModemManager-1.6.4/src/mm-port-serial.c:1288] mm_port_serial_open(): 
(ttyACM0) device open count is 2 (open)
ModemManager[814]:  [1489145402.812684] 
[../../ModemManager-1.6.4/src/mm-port-serial.c:1345] _close_internal(): 
(ttyACM0) device open count is 1 (close)
ModemManager[814]:  [1489145402.813025] 
[../../ModemManager-1.6.4/src/mm-port-serial-at.c:459] debug_log(): (ttyACM0): 
--> 'AT+CSIM=10,002C008100'
ModemManager[814]:   [1489145406.273564] 
[../../ModemManager-1.6.4/plugins/telit/mm-broadband-modem-telit.c:342] 
csim_query_ready(): No respose for step 4: Sending command failed: 'Resource 
tempora'
ModemManager[814]:   [1489145406.273995] 
[../../ModemManager-1.6.4/src/mm-iface-modem.c:2960] 
load_unlock_retries_ready(): Couldn't load unlock retries: 'Could not get any 
of the SIM unlock retries'
ModemManager[814]:  [1489145406.274272] 
[../../ModemManager-1.6.4/src/mm-iface-modem.c:3110] 
update_lock_info_context_step(): SIM is ready, and no need for the after SIM 
unlock step...
ModemManager[814]:  [1489145406.274795] 
[../../ModemManager-1.6.4/src/mm-port-serial.c:1345] _close_internal(): 
(ttyACM0) device open count is 0 (close)
ModemManager[814]:  [1489145406.275051] 
[../../ModemManager-1.6.4/src/mm-port-serial.c:1361] _close_internal(): 
(ttyACM0) closing serial port...
ModemManager[814]:  [1489145411.274803] 
[../../ModemManager-1.6.4/src/mm-port-serial.c:1409] _close_internal(): 
(ttyACM0) serial port closed
ModemManager[814]:   [1489145411.277327] 
[../../ModemManager-1.6.4/src/mm-iface-modem.c:1431] 
__iface_modem_update_state_internal(): Modem 
/org/freedesktop/ModemManager1/Modem/0: state changed (loc)
ModemManager[814]:  [1489145411.282002] 
[../../ModemManager-1.6.4/src/mm-port-serial.c:1158] mm_port_serial_open(): 
(ttyACM0) opening serial port...

Looking over the documentation of HE910 
(http://www.telit.com/fileadmin/user_upload/products/Downloads/3G/Telit_3G_Modules_AT_Commands_Reference_Guide_r10.pdf
 , page 115) which explains the CSIM command, it says that you have to do first 
 AT+CSIM=1 to lock the interface and after executing the rest of commands for 
CSIM you have to do AT+CSIM=0 to unlock the device. The problem could be that 
with this Modem if you don't do the unlock after doing 
"'AT+CSIM=10,002100", the SIM could remain locked and thus  no able to 
connect later.

Next you have the logs of both tests (with ModemManager 1.4.12 and 1.6.4) with 
the same device and doing the same operation (mmcli -i 0 --pin="").

MM 1.6.4 (Not working case)


Re: Telit HE910 not connecting with Modem Manager 1.6.4

2017-03-09 Thread Aleksander Morgado
Hey Salvador,

On Thu, Mar 9, 2017 at 4:39 PM, Penalva, Salvador
 wrote:
>
> root@ccimx6ulsbc:~# mmcli -m 0
>
>
>
> /org/freedesktop/ModemManager1/Modem/0 (device id 
> '6cb907e9b25fd81d9b144d3346b48cc89f489910')
>
>   -
>
>   Hardware |   manufacturer: 'Telit'
>
>|  model: 'HE910-D'
>
>|   revision: '12.00.026'
>
>|  supported: 'gsm-umts'
>
>|current: 'gsm-umts'
>
>|   equipment id: '356136076325358'
>
>   -
>
>   System   | device: 
> '/sys/devices/platform/soc/210.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3'
>
>|drivers: 'cdc_acm'
>
>| plugin: 'Telit'
>
>|   primary port: 'ttyACM0'
>
>|  ports: 'ttyACM3 (at), ttyACM4 (unknown), ttyACM5 
> (unknown), ttyACM0 (at), ttyACM1 (unknown), ttyACM2 (unknown)'
>
>   -
>
>   Numbers  |   own : 'unknown'
>
>   -
>
>   Status   |   lock: 'none'
>
>| unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), 
> sim-puk2 (10)'
>
>|  state: 'initializing'
>
>|power state: 'on'
>
>|access tech: 'unknown'
>
>| signal quality: '0' (cached)
>
>   -
>
>   Modes|  supported: 'allowed: 2g; preferred: none
>
>|  allowed: 3g; preferred: none
>
>|  allowed: 2g, 3g; preferred: none'
>
>|current: 'allowed: 2g, 3g; preferred: none'
>
>   -
>
>   Bands|  supported: 'egsm, dcs, pcs, g850, u2100, u1900, u850, u900, 
> u17iv'
>
>|current: 'egsm, dcs, u900'
>
>   -
>
>   IP   |  supported: 'none'
>
>   -
>
>   SIM  |   path: '/org/freedesktop/ModemManager1/SIM/0'
>
>
>
>   -
>
>   Bearers  |  paths: 'none'
>
>
>
> The thing is that when I use ModemManager 1.6.4 with libudev.so.1.6.3 and 
> libqmi-glib.so.5.1.0 and the default telit plugin from Modem Manager 1.6.4, 
> the device can’t connect.
>
>
>
> However, when I use ModemManager 1.6.4 with telit plugin from ModemManager 
> version 1.4.12 and libudev.so.0, libqmi-glib.so.1, the modem connects to the 
> network.
>
>
>
> Do you know which change between these two versions, could affect telit HE910 
> modem in this way?
>
>

From a quick look, I don't see any major difference in both runs, truth be told.

In the first run MM detects that the modem is SIM-PIN locked, and once
it gets exported to DBus you're calling Simple.Connect() including the
PIN number in the connection details, so the modem gets unlocked and
connected.

In the second run MM also detects that the modem is SIM-PIN locked,
and once it gets exported to DBus I see no logs saying that any
Simple.Connect() was performed.

Is this with NetworkManager? If so, how are you requesting the
connection to be started?


-- 
Aleksander
https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel