module microcat1

This module provides a high-level interface for the MicroCat.1 board.

Example usage:

import microcat1

m = microcat1.modem()
m.active(True)
m.connect('your_apn', 'your_apn_username', 'your_apn_password')
# ... send/receive data ...
m.disconnect()
microcat1.modem(cls=<class 'SIM7672.modem'>, *args, **kwargs)

Create and return a modem instance for MicroCat.1.

By default this instantiates SIM7672.modem; pass a compatible class via cls to use a different implementation. Any additional positional and keyword arguments are forwarded to the modem constructor.

Parameters:
  • cls – Modem class to instantiate (default: SIM7672.modem)

  • args – Positional arguments forwarded to the modem constructor

  • kwargs – Keyword arguments forwarded to the modem constructor

Returns:

A modem instance (by default a SIM7672.modem)

Constants

Security types are re-exported from network.PPP. The STATE_* values name the PPP connection states reported by modem.status().

microcat1.SEC_NONE = 0

No authentication (alias of network.PPP.SEC_NONE).

microcat1.SEC_PAP = 1

PAP authentication (alias of network.PPP.SEC_PAP).

microcat1.SEC_CHAP = 2

CHAP authentication (alias of network.PPP.SEC_CHAP).

microcat1.STATE_INACTIVE = 0

Modem is inactive (value: 0).

microcat1.STATE_ACTIVE = 1

Modem is active but not connected (value: 1).

microcat1.STATE_ERROR = 2

Modem is in an error state (value: 2).

microcat1.STATE_CONNECTING = 3

Connection is being established (value: 3).

microcat1.STATE_CONNECTED = 4

Connected to the network (value: 4).