Procedure for automatic provisioning using PIP ID

Hello,

Is there a description or tutorial for the automatic provisioning using PIP ID??

How do I write the APP_OTP flash area on a new blank device??

Thanks in Advance for your reply!

Cheers
Kaushik

Hello @kaushikgowrisankar

you can use the registryWriteString() function to write to registry memory blocks such as “rM2M_REG_APP_OTP” (see Context-sensitive help). How the automatic provisioning works is described e.g. in chapter "5.10.1 REG_APP_OTP of the myDatalogEASY IoTmini rev. 06.

“pipCustomer”, “pipCtx”, “pipAppId”, “pipAppVer” and “pipCtxAutocreate (optional)” are the names of the entries required for the automatic provisioning.

“pipAppId”, “pipAppVer” are taken from the settings of the rapidM2M Studio project and automatically written to the “rM2M_REG_APP_OTP” tab when the salve() function is used in the Device Logic.

The other entries you have to write yourself into the “rM2M_REG_APP_OTP” register using the registryWriteString() function.

Kind regards
Microtronics Engineering

1 Like

Hello @kaushikgowrisankar

Please note that if you want to use automatic provisioning in conjunction with IoT applications instead of application templates, at least the server version 49v045 is required. This only matters if you’re using a custom rapidM2M Portal Server.

Kind regards
Microtronics Engineering

1 Like

Hello,

Thank you for your reply.

From what I have now read, the relevant information have to be written on to the REG_OTP using a seperate pawn script. This will then be replaced when the actual application is loaded through the automatic provisioning. Am I on the right track here??

Cheers
Kaushik

Hello @kaushikgowrisankar,

it depends on what you want to achieve. By storing the “Product Identity Profile” (PIP) in the registration memory block, the automatic creation of a site can be triggered on the server. The new site and the device are linked to each other.

If you deliver devices without pre-installed Device Logic the first connection to the server is triggered by the firmware at PowerOn. If this device has a Product Identity Profile (PIP) in the “rM2M_REG_APP_OTP” register, the server creates a site for the device and assins the device to the site. During this process the Device Logic is loaded into the device. In this case you can use a seperate device logic that only creates the Product Identity Profile (PIP) and triggers a connection to the server or you delete the device logic from the devices before delivery (but you do not delete the Product Identity Profile).

If you want to deliver devices with pre-installed Device Logic, which is only updated if necessary when assining the device to a site, you can integrate the writing of the Product Identity Profile (PIP) into the Device Logic. The disadvantage is that in this case all devices can only be assigned to the same customer (pipCustomer) and the name of the site (pipCtx) must follow a certain pattern (e.g. xxx_<serial number>).

You can also combine option 1 and 2. First a seperate device logic that only creates the Product Identity Profile (PIP) and then install the device logic that should be installed in the delivery state.

Kind regards
Microtronics Engineering