This topic has 2 replies, 2 voices, and was last updated 2 months, 2 weeks ago by Pontus. This post has been viewed 182 times

  • Author
    Posts
  • #614
     tuvarambre
    Keymaster

    Hi!

    I am programming my FiPy to send UDP packages over the NB-IoT network and therefore trying to get the IMSI number from the SIM card installed.
    I am using AT commands in the REPL:

    >>> from network import LTE
    >>> lte = LTE()
    >>> lte.send_at_cmd(“AT+CIMI”)
    ‘\r\nERROR\r\n’

    I have tried changing to another SIM card, but remained unsuccessful in getting the IMSI.
    Anyone who can help?

    PS. The AT command to get the IMEI number works without difficulty.
    >>> lte.send_at_cmd(“AT+CGSN”)
    ‘\r\n354346093528684\r\n\r\nOK\r\n’

    #615
     tuvarambre
    Keymaster

    New update: I figured it out!

    I used a sequence in the REPL that I find fixes almost anything, and after this it worked.

    >>>from network import LTE
    >>>lte = LTE()
    >>>lte.deinit()
    >>>lte.init()
    >>>lte.attach()
    >>>lte.isattached()
    True
    >>>lte.send_at_cmd(“AT+CIMI”)
    ‘\r\nxxxxxxxxxxxxxxx\r\n\r\nOK\r\n’

    Hope this can be helpful for someone else as well. 🙂

    #616
     Pontus
    Keymaster

    Glad it worked out and thanks for sharing! 🙂

    I’ll add that it can also help to check that the SIM card is inserted and in the correct position whenever there is trouble with SIM related operations 😁

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

© 2020 Telenor Start IoT
 

Log in with your credentials

Forgot your details?