On 29/04/2016 18:46, Martin Chaplet wrote:


Does libqmi actually have low-level sim read capability?

Yes, it seems so :

$ qmicli -d /dev/cdc-wdm0 --help-uim
UIM options
  --uim-read-transparent=[0xNNNN,0xNNNN,...]                                            Read a transparent file given the file path
  --uim-get-file-attributes=[0xNNNN,0xNNNN,...]                                         Get the attributes of a given file
  --uim-get-card-status                                                                 Get card status
  --uim-reset                                                                           Reset the service state
  --uim-noop   

I'm not used to QMI but I will try to compare libqmi and ofono's read_transparent implementations.


Another thing to try would be to implement read_imsi() method for drivers/qmimodem/sim.c.  This should get you to the point where gprs is initialized even if all low-level reads from the SIM fail.

It seems a great idea.



It's an excellent idea !
Looking for read_imsi implementation, I found qmimodem-legacy which fit prefectly to my modem.
After a few fix because first Sierra net interface is buggy (wwan0), I'm now enable to use fully "Connman - ofono"  features

I will try to cleanup my work, find a way to force use of qmimodem-legacy for this Sierra chip and submit all these modifications.

Thanks again Denis

Best regards,

Martin