[Ovmsdev] ota questions
Mark Webb-Johnson
mark at webb-johnson.net
Mon Mar 12 23:08:17 HKT 2018
I’ve added a ‘network status’ command. Can you try it, when you get DNS errors, to see what the DNS servers are set to?
Regards, Mark
> On 12 Mar 2018, at 10:29 AM, Mark Webb-Johnson <mark at webb-johnson.net> wrote:
>
>> Working on the OTA web UI.
>
> That will be very useful. Thanks.
>
>> a) Flashing and changing the boot partition outputs some irritating overflow and "??" log messages:
>
>> Can these safely be ignored? The flashed partitions seem to work correctly.
>
> Yes, I too find these ugly. It is a ‘make monitor weirdism:
>
> https://www.esp32.com/viewtopic.php?t=4199 <https://www.esp32.com/viewtopic.php?t=4199>
>
> No, no need to worry. Those are from the ``make monitor`` command. As soon as this sees a hex number scroll by that smells like an address in the ESP32 memory map, it tries to be helpful and converts it to a symbol. In some cases, this leads it to weird messages like this.
>
>> b) How do you get back to the factory partition if something went so wrong you can't use the "ota" command?
>
>
> Supposedly if the OTA partition doesn’t boot (or checksum mismatch, etc), the bootloader will boot factory.
>
> The selection of current boot partition is in the otadata partition:
>
> # OVMS 16MB flash ESP32 Partition Table
> # Name, Type, SubType, Offset, Size
> nvs, data, nvs, 0x9000, 0x4000
> otadata, data, ota, 0xd000, 0x2000
> phy_init, data, phy, 0xf000, 0x1000
> factory, app, factory, 0x10000, 4M
> ota_0, app, ota_0, , 4M
> ota_1, app, ota_1, , 4M
> store, data, fat, , 1M
>
> I guess zapping that would reset to defaults (factory boot)? I think erase_region may do that:
>
> esptool.py erase_region 0xd000 0x2000
>
> But, haven’t tried it myself.
>
>> c) ota flash http still gives me a DNS lookup error on any other host than api.openvehicles.com <http://api.openvehicles.com/> and fails to download from api.openvehicles.com, regardless of
>> the type of network (wifi/modem).
>
>
> I saw this a few months ago, but not recently.
>
> Line 107 of ovms_net.cpp. It just does a getaddrinfo() on the host.
>
> Regards, Mark.
>
>> On 12 Mar 2018, at 7:13 AM, Michael Balzer <dexter at expeedo.de <mailto:dexter at expeedo.de>> wrote:
>>
>> Working on the OTA web UI.
>>
>> Some questions:
>>
>> a) Flashing and changing the boot partition outputs some irritating overflow and "??" log messages:
>>
>> OVMS > ota flash vfs /sd/ovms3.done
>> Current running partition is: ota_0
>> Target partition is: ota_1
>> Source image is 1480592 bytes in size
>> Preparing flash partition...
>> Flashing image partition...
>> Setting boot partition...
>> OTA flash was successful
>> Flashed 1480592 bytes from /sd/ovms3.done
>> Next boot will be from 'ota_1'
>> I (1316956) esp_image: segment 0: paddr=0x00810020 vaddr=0x3f400020 size=0x5879c (362396) map
>> I (1317156) esp_image: segment 1: paddr=0x008687c4 vaddr=0x3ffb0000 size=0x0382c ( 14380)
>> I (1317156) esp_image: segment 2: paddr=0x0086bff8 vaddr=0x40080000 size=0x00400 ( 1024)
>> 0x40080000: _WindowOverflow4 at /home/balzer/esp/esp-idf/components/freertos/./xtensa_vectors.S:1685
>>
>> I (1317166) esp_image: segment 3: paddr=0x0086c400 vaddr=0x40080400 size=0x03c10 ( 15376)
>> I (1317176) esp_image: segment 4: paddr=0x00870018 vaddr=0x400d0018 size=0xfb154 (1028436) map
>> 0x400d0018: _flash_cache_start at ??:?
>>
>> I (1317746) esp_image: segment 5: paddr=0x0096b174 vaddr=0x40084010 size=0x0e5b4 ( 58804)
>> 0x40084010: spi_flash_mmap at /home/balzer/esp/esp-idf/components/spi_flash/./flash_mmap.c:293
>>
>> I (1317776) esp_image: segment 6: paddr=0x00979730 vaddr=0x400c0000 size=0x00034 ( 52)
>> I (1317776) esp_image: segment 0: paddr=0x00810020 vaddr=0x3f400020 size=0x5879c (362396) map
>> I (1317976) esp_image: segment 1: paddr=0x008687c4 vaddr=0x3ffb0000 size=0x0382c ( 14380)
>> I (1317986) esp_image: segment 2: paddr=0x0086bff8 vaddr=0x40080000 size=0x00400 ( 1024)
>> 0x40080000: _WindowOverflow4 at /home/balzer/esp/esp-idf/components/freertos/./xtensa_vectors.S:1685
>>
>> I (1317986) esp_image: segment 3: paddr=0x0086c400 vaddr=0x40080400 size=0x03c10 ( 15376)
>> I (1317996) esp_image: segment 4: paddr=0x00870018 vaddr=0x400d0018 size=0xfb154 (1028436) map
>> 0x400d0018: _flash_cache_start at ??:?
>>
>> I (1318566) esp_image: segment 5: paddr=0x0096b174 vaddr=0x40084010 size=0x0e5b4 ( 58804)
>> 0x40084010: spi_flash_mmap at /home/balzer/esp/esp-idf/components/spi_flash/./flash_mmap.c:293
>>
>> I (1318606) esp_image: segment 6: paddr=0x00979730 vaddr=0x400c0000 size=0x00034 ( 52)
>>
>> …
>>
>> OVMS > ota boot ota_1
>> Boot from ota_1 at 0x00810000 (size 0x00400000)
>> I (301766) esp_image: segment 0: paddr=0x00810020 vaddr=0x3f400020 size=0x5879c (362396) map
>> I (301966) esp_image: segment 1: paddr=0x008687c4 vaddr=0x3ffb0000 size=0x0382c ( 14380)
>> I (301976) esp_image: segment 2: paddr=0x0086bff8 vaddr=0x40080000 size=0x00400 ( 1024)
>> 0x40080000: _WindowOverflow4 at /home/balzer/esp/esp-idf/components/freertos/./xtensa_vectors.S:1685
>>
>> I (301976) esp_image: segment 3: paddr=0x0086c400 vaddr=0x40080400 size=0x03c10 ( 15376)
>> I (301986) esp_image: segment 4: paddr=0x00870018 vaddr=0x400d0018 size=0xfb154 (1028436) map
>> 0x400d0018: _flash_cache_start at ??:?
>>
>> I (302556) esp_image: segment 5: paddr=0x0096b174 vaddr=0x40084010 size=0x0e5b4 ( 58804)
>> 0x40084010: spi_flash_mmap at /home/balzer/esp/esp-idf/components/spi_flash/./flash_mmap.c:293
>>
>> I (302596) esp_image: segment 6: paddr=0x00979730 vaddr=0x400c0000 size=0x00034 ( 52)
>>
>>
>> Can these safely be ignored? The flashed partitions seem to work correctly.
>>
>>
>> b) How do you get back to the factory partition if something went so wrong you can't use the "ota" command?
>>
>> I would have expected "make flash" to reset the boot partition to "factory", as all flashes are only done there, but it doesn't.
>>
>> So if you're on another partition with a broken firmware, how do you recover? Is there a way to set the boot partition using esptool.py?
>>
>>
>> c) ota flash http still gives me a DNS lookup error on any other host than api.openvehicles.com <http://api.openvehicles.com/> and fails to download from api.openvehicles.com <http://api.openvehicles.com/>, regardless of
>> the type of network (wifi/modem).
>>
>> OVMS > ota flash http www.google.com/ovms3.bin <http://www.google.com/ovms3.bin>
>> Current running partition is: factory
>> Target partition is: ota_0
>> Download firmware from www.google.com/ovms3.bin <http://www.google.com/ovms3.bin> to ota_0
>> Error: Request failed
>> W (666891) net: DNS lookup on www.google.com <http://www.google.com/> failed err=200
>>
>> OVMS > ota flash http api.openvehicles.com/test.bin <http://api.openvehicles.com/test.bin>
>> Current running partition is: factory
>> Target partition is: ota_0
>> Download firmware from api.openvehicles.com/test.bin <http://api.openvehicles.com/test.bin> to ota_0
>> […dead, needs reset]
>>
>> Is this a local problem of mine?
>>
>>
>> Regards,
>> Michael
>>
>> --
>> 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 <mailto: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/20180312/53573cc0/attachment.htm>
More information about the OvmsDev
mailing list