openvehicles/Open-Vehicle-Monitoring-System

Car: Auto Provisioning

markwj opened this issue · 2 comments

Support an auto-provisioning mechanism.

The SIM phonebook is read, during startup, looking for O-- and OVMS-* entries.

O-- entries are treated as the first "" being the parameter number and the second "" being the value. The value is checked against the parameter store, and if different the store is updated. For these values the telephone number itself is ignored.

Any OVMS-AUTO entry found is assumed to be a profile for auto-provisioning. The telephone number stores a profile number, and several defined profiles will be used.

Profile 0: Is geosim. ICID=8923418*, APN=MOBILEDATA, USER=-, PASS=-
Profile 1: Is AT&T GoPhone. ICID=-, APN=WAP.CINGULAR , USER=-, PASS=-
Profile 2: Is ThreeHK. ICID=-, APN=imobile.three.com.hk, USER=, PASS=-

In addition, if the ICCID starts with the defined prefix, OVMS-AUTO is assumed (even if the OVMS-AUTO entry doesn't exist).

If the APN entry is not empty (ie; already defined), then auto-provisioning is not performed.

The auto-provisioning mechanism itself is a protocol extension and is discussed in the OVMS protocol reference manual.

Partial checkin of change made. The work has been quite extensive and will require a lot more testing and refinement.

The phonebook stuff is done, but the GPRS auto-provisioning has been shelved for the moment, as difficult to implement reliably.