On 2016/06/09 12:35, Bryan Vyhmeister wrote:
> On Wed, Jun 08, 2016 at 03:08:52PM +0200, Gerhard Roth wrote:
> > I would be glad to hear from some people trying this with a real MBIM
> > device.
> 
> I have a Sierra Wireless EM7455 MBIM device that I purchased with my
> ThinkPad X260. I am very excited for this driver to make it into
> OpenBSD. I am a little bit unclear as to how to connect to AT&T wireless
> in the United States thus far but I want to rule out an error in how I
> am using the driver. Perhaps I have a similar issue to what sthen@ has.
> I have been watching the driver discussion on the list and applied the
> most recent complete patch and then did the following sequence:

You're getting further than me.

Though, looking at list posts, it does seem that Lenovo is another
vendor which requires the command being referred to as "fcc auth"
in order to connect, at least in some of their cards.

> ifconfig umb0 pin 1234 apn broadband
> ifconfig umb0 inet 0.0.0.1 0.0.0.2
> route add -ifp umb0 default 0.0.0.2
> ifconfig umb0 up
> 
> I don't have a PIN set on this SIM card which seems to be needed? I'm
> not sure if it's different elsewhere but I've never had a SIM card with
> a PIN set before here. The output of ifconfig umb0:
> 
> umb0: flags=8811<UP,POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
>         index 4 priority 0
>         roaming disabled registration not registered
>         state open cell-class none
>         SIM not initialized PIN valid (3 attempts left)
                              ^^^^^^^^^
This suggests that you don't need to enter a PIN, otherwise
you would get "PIN required" instead of "PIN valid".

>         device EM7455 IMEI 014582000 firmware SWI9X30C_02.08.
>         APN broadband
>         groups: egress
>         status: down
>         inet 0.0.0.1 --> 0.0.0.2 netmask 0xff000000
> 
> From the console:
> 
> umb0: state going up from 'down' to 'open'
> umb0: PIN2 state locked (3 attempts left)

There are several PINs and unlock codes (PIN1 PIN2 PUK1 PUK2)
on a SIM card. A SIM can be setup so that a PIN1 is required to
make calls etc, or not required. PIN2 is for configuration
(setting call restrictions, editing the restricted numbers
list, etc).

Too many bad attempts to enter a PIN1 will result in the SIM
being locked and requiring the PUK1 to unlock. In most cases
these are fairly easy to obtain from the operator.

Too many bad attempts to enter a PIN2 will result in the SIM
being locked and requiring the PUK2 to unlock. These are
usually harder to obtain from the operator and at least
require more checks.

>From a phone or older-type WWAN device with AT command set
(or probably the vendor tools on Windows, and maybe libmbim
on linux) you can control which PINs the card asks for.
You'll need to know what a PIN is before you can lock it.
Most operators have a default PIN that they use (different
ones for different operators) though theoretically they
could use a different one per SIM.

If PIN1 is unlocked (no matter whether PIN2 is locked or not),
you shouldn't need to use a PIN to connect.

> umb0: SIM not initialized (PIN missing)
> umb0: SIM not initialized (PIN missing)

The description in the spec for the state which triggers this
message is,

        "The operation failed because the device is
        in the process of initializing. Retry the
        operation after the ReadyState of the device
        changes to MBIMSubscriberReadyStateInitialized."

Spec may differ from real-world devices, but from my reading
of the spec it doesn't seem to me that this indicates "PIN
missing".

I think you should rebuild with UMB_DEBUG (one simple way
is to just add "#define UMB_DEBUG" before #ifdef UMB_DEBUG
in if_umb.c) and see if you get more information. It's
probably worth changing the 'umb_debug = 0' to 2 or 4
while debugging too (this can be done using DDB, but if
you want to capture any possible messages starting at
boot then you probably want to chagne it in the code).

Reply via email to