[Ovmsdev] Moving to a production cycle
Mark Webb-Johnson
mark at webb-johnson.net
Thu Feb 22 11:22:08 HKT 2018
> OK. How about using separate branches for release and development. That way we can cherry-pick important fixes early into the release branch if necessary.
Yes, probably a good idea. I’ll do it just before the first release.
Note that we also have the menuconfig CONFIG_OVMS_VERSION_TAG (default: “main”). I plan to use that for OTA to be able to switch to different versions and different release priorities. So, we can have an OTA version X release for beta cars, and OTA version Y for everybody else.
> With automatic start of the vehicle module, wifi, modem & server connections, I think we need a rescue scheme. I.e. if the boot crashes, the reboot should automatically be done without any auto start -- otherwise the only option to get back to a working module would be to erase the config. I'll have a look at that.
When looking at the deep sleep stuff, I found there is a way to tag a global variable as ‘rtc’. That should survive a deep sleep (or reboot). For example:
https://github.com/espressif/esp-idf/blob/3ede9f011b50999b0560683f9419538c066dd09e/examples/system/deep_sleep/main/deep_sleep_example_main.c <https://github.com/espressif/esp-idf/blob/3ede9f011b50999b0560683f9419538c066dd09e/examples/system/deep_sleep/main/deep_sleep_example_main.c>
static RTC_DATA_ATTR struct timeval sleep_enter_time;
I did like the feature we had in v2 that recorded the number of resets, as well as the cause of the last reset. Perhaps we can do the same for v3 and store in a metric on boot?
Presumably we can set a flag during startup (in rtc ram) and clear it once the startup has been completed. Then when booting if that flag is set, don’t do this auto stuff. That should give us the rescue scheme.
I suggest to put this all in one RTC_DATA_ATTR structure in ovms.h (and ovms.cpp), then do the automation either in housekeeping or in a new ovms_auto.{h,cpp} component.
Should we create a ‘auto’ config area to store all this? Such as auto/vehicletype, etc...
> Btw, how about activating wifi AP mode as the factory default, i.e. with SSID "OVMS" and password derived from the MAC or ICCID? That way a new user can power the module on and directly connect to the OVMS AP and do the initial configuration with his/her browser.
Yes, that makes good sense. Again, it can go in ‘auto’ section, wifiap or something like that. Can default to on, and be explicitly disabled by config later.
Regarding the password, not all modules will have ICCID. The MAC address is not externally visible. Maybe just have the access point named OVMS.<last-bit-of-mac> and password OVMS? Then provide a facility in the web UI to be able to change that password?
P.S. Your work on the web UI is incredible. Really neat and powerful. Very impressed.
Regards, Mark.
> On 22 Feb 2018, at 4:21 AM, Michael Balzer <dexter at expeedo.de> wrote:
>
>
> Am 21.02.2018 um 03:05 schrieb Mark Webb-Johnson:
>> On the firmware side, we need to move to a production style release cycle, and I will need to provide the first ‘factory’ firmware around the second week of March. Accordingly, I’m setting up some clean build environments and OTA release repositories (so I can cleanly build v3.0 and v3.1 firmware and have it available for OTA download).
>>
>> I have created a changes.txt log file in the root of the project. I would appreciate it if those with commit access to master could update that file when they merge/commit changes to the project. The top of the file will contain an entry for the ‘next’ version, so the change text just needs to be added below that. When the version is ready to go, I will update changes.txt with the date and name, commit it, tag it, and then build OTA versions for release. Please only use tags for OTA versions - or just don’t tag at all for the moment and let me maintain this.
>
> OK. How about using separate branches for release and development. That way we can cherry-pick important fixes early into the release branch if necessary.
>
>> The last list of things I have for this build are:
>>
>> OTA via HTTP. SD CARD firmware updates seems to work fine today, as does serial flashing. I’ve still got to make the changes to HTTP firmware updates to use mongoose and support the new ESP IDF v2.1+ firmware arrangement of putting the checksum at the end of the firmware file.
>>
>> We need some simple high-level configs for auto-starting things. Stuff like vehicle type, whether the v2 server should auto-run, etc. Make it simpler for people to configure, without having to use scripts. This can be mapped to v2 protocol parameters/features.
>
> Config for vehicle type is there (added that for the web UI), but I haven't done the auto start on this.
>
> With automatic start of the vehicle module, wifi, modem & server connections, I think we need a rescue scheme. I.e. if the boot crashes, the reboot should automatically be done without any auto start -- otherwise the only option to get back to a working module would be to erase the config. I'll have a look at that.
>
> Btw, how about activating wifi AP mode as the factory default, i.e. with SSID "OVMS" and password derived from the MAC or ICCID? That way a new user can power the module on and directly connect to the OVMS AP and do the initial configuration with his/her browser.
>
> Regards,
> Michael
>
>
>>
>> SPI RAM support and stability for v3.1 hardware (as well as compatibility with v3.0 hardware).
>>
>> Finalise the partition sizes. I think we can squeeze a bit more (maybe 3x 5MB firmwares, plus 512KB store?).
>>
>> End-User Documentation.
>>
>> Real-world stability (in cars).
>>
>> My concern is to have a relatively stable firmware that is usable for technically capable end-users in their cars, but also to have a way for them to simply update the firmware to keep pace with the fast release cycle we expect (at least in the coming months).
>>
>> Anything I’ve missed?
>>
>> Regards, Mark.
>
> --
> Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
> Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20180222/8c1db6a2/attachment.htm>
More information about the OvmsDev
mailing list