Cellular / 4G
Pre-requisite: The user has to be signed in to perform the following operations.
Overview
A cellular Trail camera carries a SIM and draws on a data pool shared by the space. DeviceModel.fourG reports the iccid, provider and current operatorValue; the cluster fourGProperties exposes the dataOff and lowDataMode switches through the cluster APIs.
The calls below validate a SIM, read the pool, list the data passes on offer and read the auto top-up plan. They are all on Factory.spaceService because the pool belongs to the space, not to one camera. The network-operator calls at the end are on Factory.deviceService.
Bootstrap (Activate) the SIM
To activate the camera’s embedded SIM before pairing, The following method can be used:
spaceId(required): The space ID of the User.request(required):BootstrapSimRequest(simNumber:)— the SIM number printed on the camera / QR code.
Factory.spaceService.bootstrapSim(
spaceId: String,
request: BootstrapSimRequest
) -> IVPublisher<Void>
Get Pool Data
To fetch pooled data information for the space, the following method can be called.
spaceId(Required): The id of the space.
Factory.spaceService.getPoolData(
spaceId: String
) -> IVPublisher<PoolDataModel>
Get Data Pass Info
To fetch available data pass details, the following method can be called.
spaceId(required): The id of the space.
Factory.spaceService.getDataPassInfo(
spaceId: String
) -> IVPublisher<[DataPassModel]>
Get Auto Top-up Plan Info
To get current auto top-up plan info, the following method can be called.
spaceId(required): The id of the space.
Factory.spaceService.getAutoTopUpInfo(spaceId: String) -> IVPublisher<AutoTopUpModel>
Get Operators List
To get available network operators, The following method can be used:
spaceId(required): The space ID of the device.providerId(required): The provider ID.iccid(required): The iccid of the device.
Factory.deviceService.getOperatorsList(
spaceId: String,
providerId: String,
iccid: String
) -> IVPublisher<OperatorsListModel>
Update Device Operator
To update device operator, The following method can be used:
spaceId(required): The space ID of the device.deviceId(required): The device ID.operatorValue(required): The operator of the device.wakeup(required): Whether to wake a battery camera so the change applies immediately.
Factory.deviceService.updateDeviceOperator(
spaceId: String,
deviceId: String,
operatorValue: String,
wakeup: Bool
) -> IVPublisher<DeviceModel>
A stream left running on a cellular camera drains the shared pool — always set autoDisconnectTime on live view.