The crash below occurred right upon startup. I have not done anything with the auto start mechanism yet; I just have a script that starts wifi in client mode. I did not dig into this, and after a reset it did not repeat. I have not done more tests. -- Steve I (39) ovms_main: Set default logging level for * to WARN W (744) esp32wifi: AutoInit: using module password as AP password Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console OVMS > CORRUPT HEAP: Bad head at 0x3ffec1f0. Expected 0xabba1234 got 0x3ffec2c8 assertion "head != NULL" failed: file "/Users/casner/src/github/esp-idf/components/heap/./multi_heap_poisoning.c", line 201, function: multi_heap_free abort() was called at PC 0x400fb243 on core 1 0x400fb243: __assert_func at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8) Backtrace: 0x4008f5d4:0x3ffeb990 0x4008f777:0x3ffeb9b0 0x400fb243:0x3ffeb9d0 0x4008f235:0x3ffeba00 0x40082712:0x3ffeba20 0x40082ca1:0x3ffeba40 0x4000bec7:0x3ffeba60 0x400dbeb9:0x3ffeba80 0x401f2105:0x3ffebaa0 0x401f212b:0x3ffebac0 0x401f4c9c:0x3ffebb00 0x401167eb:0x3ffebb30 0x4011681d:0x3ffebb50 0x40116c3c:0x3ffebb70 0x400e88a9:0x3ffebbb0 0x400e8b45:0x3ffebbe0 0x400ed570:0x3ffebc70 0x400ed591:0x3ffebcc0 0x4008f5d4: invoke_abort at /Users/casner/src/github/esp-idf/components/esp32/./panic.c:648 0x4008f777: abort at /Users/casner/src/github/esp-idf/components/esp32/./panic.c:648 0x400fb243: __assert_func at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8) 0x4008f235: multi_heap_free at /Users/casner/src/github/esp-idf/components/heap/./multi_heap_poisoning.c:326 0x40082712: heap_caps_free at /Users/casner/src/github/esp-idf/components/heap/./heap_caps.c:388 0x40082ca1: _free_r at /Users/casner/src/github/esp-idf/components/newlib/./syscalls.c:42 0x400dbeb9: esp_timer_delete at /Users/casner/src/github/esp-idf/components/esp32/./esp_timer.c:162 0x401f2105: _mdns_stop_timer at /Users/casner/src/github/esp-idf/components/mdns/./mdns.c:4510 0x401f212b: _mdns_service_task_stop at /Users/casner/src/github/esp-idf/components/mdns/./mdns.c:4510 0x401f4c9c: mdns_free at /Users/casner/src/github/esp-idf/components/mdns/./mdns.c:4185 0x401167eb: OvmsMDNS::StopMDNS() at /Users/casner/src/github/ovms/vehicle/OVMS.V3/components/ovms_mdns/src/ovms_mdns.cpp:111 0x4011681d: OvmsMDNS::NetworkDown(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*) at /Users/casner/src/github/ovms/vehicle/OVMS.V3/components/ovms_mdns/src/ovms_mdns.cpp:64 0x40116c3c: void std::_Mem_fn_base<void (OvmsMDNS::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*), true>::operator()<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*, void>(OvmsMDNS*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&) const at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:600 (inlined by) void std::_Bind<std::_Mem_fn<void (OvmsMDNS::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)> (OvmsMDNS*, std::_Placeholder<1>, std::_Placeholder<2>)>::__call<void, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&, 0u, 1u, 2u>(std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&>&&, std::_Index_tuple<0u, 1u, 2u>) at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:1074 (inlined by) void std::_Bind<std::_Mem_fn<void (OvmsMDNS::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)> (OvmsMDNS*, std::_Placeholder<1>, std::_Placeholder<2>)>::operator()<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*, void>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&) at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:1133 (inlined by) std::_Function_handler<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*), std::_Bind<std::_Mem_fn<void (OvmsMDNS::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)> (OvmsMDNS*, std::_Placeholder<1>, std::_Placeholder<2>)> >::_M_invoke(std::_Any_data const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&) at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:1871 0x400e88a9: std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)>::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*) const at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:2271 0x400e8b45: OvmsEvents::SignalEvent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*) at /Users/casner/src/github/ovms/vehicle/OVMS.V3/main/./ovms_events.cpp:155 0x400ed570: OvmsNetManager::MongooseTask() at /Users/casner/src/github/ovms/vehicle/OVMS.V3/main/./ovms_netmanager.cpp:322 0x400ed591: MongooseRawTask(void*) at /Users/casner/src/github/ovms/vehicle/OVMS.V3/main/./ovms_netmanager.cpp:306 Entering gdb stub now. $T0b#e6GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 7.10 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-build_apple-darwin16.3.0 --target=xtensa-esp32-elf". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /Users/casner/src/github/ovms/vehicle/OVMS.V3/build/ovms3.elf...done. Remote debugging using /dev/cu.SLAB_USBtoUART 0x4008f5d4 in invoke_abort () at /Users/casner/src/github/esp-idf/components/esp32/./panic.c:139 139 *((int *) 0) = 0; (gdb) bt #0 0x4008f5d4 in invoke_abort () at /Users/casner/src/github/esp-idf/components/esp32/./panic.c:139 #1 0x4008f77a in abort () at /Users/casner/src/github/esp-idf/components/esp32/./panic.c:148 #2 0x400fb246 in __assert_func ( file=0x3ffb3730 "/Users/casner/src/github/esp-idf/components/heap/./multi_heap_poisoning.c", line=201, func=<optimized out>, failedexpr=0x3ffb3720 "head != NULL") at ../../../.././newlib/libc/stdlib/assert.c:63 #3 0x4008f238 in multi_heap_free (heap=0x3ffe4350, p=0x3ffec1fc) at /Users/casner/src/github/esp-idf/components/heap/./multi_heap_poisoning.c:201 #4 0x40082715 in heap_caps_free (ptr=0x3ffec1fc) at /Users/casner/src/github/esp-idf/components/heap/./heap_caps.c:262 #5 0x40082ca4 in _free_r (r=0x3ffebdd4, ptr=0x3ffec1fc) at /Users/casner/src/github/esp-idf/components/newlib/./syscalls.c:42 #6 0x4000beca in ?? () #7 0x400dbebc in esp_timer_delete (timer=0x3ffec1fc) at /Users/casner/src/github/esp-idf/components/esp32/./esp_timer.c:162 #8 0x401f2108 in _mdns_stop_timer () at /Users/casner/src/github/esp-idf/components/mdns/./mdns.c:4032 #9 0x401f212e in _mdns_service_task_stop () at /Users/casner/src/github/esp-idf/components/mdns/./mdns.c:4081 #10 0x401f4c9f in mdns_free () at /Users/casner/src/github/esp-idf/components/mdns/./mdns.c:4185 #11 0x401167ee in OvmsMDNS::StopMDNS (this=0x3ffb45c8 <MyMDNS>) at /Users/casner/src/github/ovms/vehicle/OVMS.V3/components/ovms_mdns/src/ovms_mdns.cpp:111 #12 0x40116820 in OvmsMDNS::NetworkDown (this=0x3ffb45c8 <MyMDNS>, event=..., data=0x0) at /Users/casner/src/github/ovms/vehicle/OVMS.V3/components/ovms_mdns/src/ovms_mdns.cpp:64 #13 0x40116c3f in std::_Mem_fn_base<void (OvmsMDNS::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*), true>::operator()<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*, void>(OvmsMDNS*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&) const (__object=<optimized out>, this=<optimized out>) at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:600 #14 std::_Bind<std::_Mem_fn<void (OvmsMDNS::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)> (OvmsMDNS*, std::_Placeholder<1>, std::_Placeholder<2>)>::__call<void, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&, 0u, 1u, 2u>(std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&>&&, std::_Index_tuple<0u, 1u, 2u>) ( __args=<unknown type in /Users/casner/src/github/ovms/vehicle/OVMS.V3/build/ovms3.elf, CU 0x2f4c41, DIE 0x3048f6>, this=<optimized out>) at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:1074 #15 std::_Bind<std::_Mem_fn<void (OvmsMDNS::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)> (OvmsMDNS*, std::_Placeholder<1>, std::_Placeholder<2>)>::operator()<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*, void>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&) (this=<optimized out>) at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:1133 #16 std::_Function_handler<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*), std::_Bind<std::_Mem_fn<void (OvmsMDNS::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)> (OvmsMDNS*, std::_Placeholder<1>, std::_Placeholder<2>)> >::_M_invoke(std::_Any_data const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&) (__functor=..., __args#0=<optimized out>, __args#1=<optimized out>) at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:1871 #17 0x400e88ac in std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)>::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*) const ( this=0x3ffcaef0, __args#0=..., __args#1=0x0) at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:2271 #18 0x400e8b48 in OvmsEvents::SignalEvent (this=0x3ffb4290 <MyEvents>, event=..., data=0x0) at /Users/casner/src/github/ovms/vehicle/OVMS.V3/main/./ovms_events.cpp:155 #19 0x400ed573 in OvmsNetManager::MongooseTask (this=0x3ffb4314 <MyNetManager>) ---Type <return> to continue, or q <return> to quit--- at /Users/casner/src/github/ovms/vehicle/OVMS.V3/main/./ovms_netmanager.cpp:322 #20 0x400ed594 in MongooseRawTask (pvParameters=0x3ffb4314 <MyNetManager>) at /Users/casner/src/github/ovms/vehicle/OVMS.V3/main/./ovms_netmanager.cpp:306 (gdb)
From a first look at the mdns code in your backtrace, I would guess that's a double free() for the timer, it seems the timer_handle never gets NULLed. Regards, Michael Am 18.03.2018 um 20:59 schrieb Stephen Casner:
The crash below occurred right upon startup. I have not done anything with the auto start mechanism yet; I just have a script that starts wifi in client mode. I did not dig into this, and after a reset it did not repeat. I have not done more tests.
-- Steve
I (39) ovms_main: Set default logging level for * to WARN W (744) esp32wifi: AutoInit: using module password as AP password
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console OVMS > CORRUPT HEAP: Bad head at 0x3ffec1f0. Expected 0xabba1234 got 0x3ffec2c8 assertion "head != NULL" failed: file "/Users/casner/src/github/esp-idf/components/heap/./multi_heap_poisoning.c", line 201, function: multi_heap_free abort() was called at PC 0x400fb243 on core 1 0x400fb243: __assert_func at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8)
Backtrace: 0x4008f5d4:0x3ffeb990 0x4008f777:0x3ffeb9b0 0x400fb243:0x3ffeb9d0 0x4008f235:0x3ffeba00 0x40082712:0x3ffeba20 0x40082ca1:0x3ffeba40 0x4000bec7:0x3ffeba60 0x400dbeb9:0x3ffeba80 0x401f2105:0x3ffebaa0 0x401f212b:0x3ffebac0 0x401f4c9c:0x3ffebb00 0x401167eb:0x3ffebb30 0x4011681d:0x3ffebb50 0x40116c3c:0x3ffebb70 0x400e88a9:0x3ffebbb0 0x400e8b45:0x3ffebbe0 0x400ed570:0x3ffebc70 0x400ed591:0x3ffebcc0 0x4008f5d4: invoke_abort at /Users/casner/src/github/esp-idf/components/esp32/./panic.c:648
0x4008f777: abort at /Users/casner/src/github/esp-idf/components/esp32/./panic.c:648
0x400fb243: __assert_func at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8)
0x4008f235: multi_heap_free at /Users/casner/src/github/esp-idf/components/heap/./multi_heap_poisoning.c:326
0x40082712: heap_caps_free at /Users/casner/src/github/esp-idf/components/heap/./heap_caps.c:388
0x40082ca1: _free_r at /Users/casner/src/github/esp-idf/components/newlib/./syscalls.c:42
0x400dbeb9: esp_timer_delete at /Users/casner/src/github/esp-idf/components/esp32/./esp_timer.c:162
0x401f2105: _mdns_stop_timer at /Users/casner/src/github/esp-idf/components/mdns/./mdns.c:4510
0x401f212b: _mdns_service_task_stop at /Users/casner/src/github/esp-idf/components/mdns/./mdns.c:4510
0x401f4c9c: mdns_free at /Users/casner/src/github/esp-idf/components/mdns/./mdns.c:4185
0x401167eb: OvmsMDNS::StopMDNS() at /Users/casner/src/github/ovms/vehicle/OVMS.V3/components/ovms_mdns/src/ovms_mdns.cpp:111
0x4011681d: OvmsMDNS::NetworkDown(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*) at /Users/casner/src/github/ovms/vehicle/OVMS.V3/components/ovms_mdns/src/ovms_mdns.cpp:64
0x40116c3c: void std::_Mem_fn_base<void (OvmsMDNS::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*), true>::operator()<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*, void>(OvmsMDNS*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&) const at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:600 (inlined by) void std::_Bind<std::_Mem_fn<void (OvmsMDNS::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)> (OvmsMDNS*, std::_Placeholder<1>, std::_Placeholder<2>)>::__call<void, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&, 0u, 1u, 2u>(std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&>&&, std::_Index_tuple<0u, 1u, 2u>) at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:1074 (inlined by) void std::_Bind<std::_Mem_fn<void (OvmsMDNS::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)> (OvmsMDNS*, std::_Placeholder<1>, std::_Placeholder<2>)>::operator()<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*, void>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&) at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:1133 (inlined by) std::_Function_handler<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*), std::_Bind<std::_Mem_fn<void (OvmsMDNS::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)> (OvmsMDNS*, std::_Placeholder<1>, std::_Placeholder<2>)> >::_M_invoke(std::_Any_data const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&) at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:1871
0x400e88a9: std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)>::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*) const at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:2271
0x400e8b45: OvmsEvents::SignalEvent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*) at /Users/casner/src/github/ovms/vehicle/OVMS.V3/main/./ovms_events.cpp:155
0x400ed570: OvmsNetManager::MongooseTask() at /Users/casner/src/github/ovms/vehicle/OVMS.V3/main/./ovms_netmanager.cpp:322
0x400ed591: MongooseRawTask(void*) at /Users/casner/src/github/ovms/vehicle/OVMS.V3/main/./ovms_netmanager.cpp:306
Entering gdb stub now. $T0b#e6GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 7.10 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-build_apple-darwin16.3.0 --target=xtensa-esp32-elf". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /Users/casner/src/github/ovms/vehicle/OVMS.V3/build/ovms3.elf...done. Remote debugging using /dev/cu.SLAB_USBtoUART 0x4008f5d4 in invoke_abort () at /Users/casner/src/github/esp-idf/components/esp32/./panic.c:139 139 *((int *) 0) = 0; (gdb) bt #0 0x4008f5d4 in invoke_abort () at /Users/casner/src/github/esp-idf/components/esp32/./panic.c:139 #1 0x4008f77a in abort () at /Users/casner/src/github/esp-idf/components/esp32/./panic.c:148 #2 0x400fb246 in __assert_func ( file=0x3ffb3730 "/Users/casner/src/github/esp-idf/components/heap/./multi_heap_poisoning.c", line=201, func=<optimized out>, failedexpr=0x3ffb3720 "head != NULL") at ../../../.././newlib/libc/stdlib/assert.c:63 #3 0x4008f238 in multi_heap_free (heap=0x3ffe4350, p=0x3ffec1fc) at /Users/casner/src/github/esp-idf/components/heap/./multi_heap_poisoning.c:201 #4 0x40082715 in heap_caps_free (ptr=0x3ffec1fc) at /Users/casner/src/github/esp-idf/components/heap/./heap_caps.c:262 #5 0x40082ca4 in _free_r (r=0x3ffebdd4, ptr=0x3ffec1fc) at /Users/casner/src/github/esp-idf/components/newlib/./syscalls.c:42 #6 0x4000beca in ?? () #7 0x400dbebc in esp_timer_delete (timer=0x3ffec1fc) at /Users/casner/src/github/esp-idf/components/esp32/./esp_timer.c:162 #8 0x401f2108 in _mdns_stop_timer () at /Users/casner/src/github/esp-idf/components/mdns/./mdns.c:4032 #9 0x401f212e in _mdns_service_task_stop () at /Users/casner/src/github/esp-idf/components/mdns/./mdns.c:4081 #10 0x401f4c9f in mdns_free () at /Users/casner/src/github/esp-idf/components/mdns/./mdns.c:4185 #11 0x401167ee in OvmsMDNS::StopMDNS (this=0x3ffb45c8 <MyMDNS>) at /Users/casner/src/github/ovms/vehicle/OVMS.V3/components/ovms_mdns/src/ovms_mdns.cpp:111 #12 0x40116820 in OvmsMDNS::NetworkDown (this=0x3ffb45c8 <MyMDNS>, event=..., data=0x0) at /Users/casner/src/github/ovms/vehicle/OVMS.V3/components/ovms_mdns/src/ovms_mdns.cpp:64 #13 0x40116c3f in std::_Mem_fn_base<void (OvmsMDNS::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*), true>::operator()<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*, void>(OvmsMDNS*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&) const (__object=<optimized out>, this=<optimized out>) at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:600 #14 std::_Bind<std::_Mem_fn<void (OvmsMDNS::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)> (OvmsMDNS*, std::_Placeholder<1>, std::_Placeholder<2>)>::__call<void, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&, 0u, 1u, 2u>(std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&>&&, std::_Index_tuple<0u, 1u, 2u>) ( __args=<unknown type in /Users/casner/src/github/ovms/vehicle/OVMS.V3/build/ovms3.elf, CU 0x2f4c41, DIE 0x3048f6>, this=<optimized out>) at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:1074 #15 std::_Bind<std::_Mem_fn<void (OvmsMDNS::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)> (OvmsMDNS*, std::_Placeholder<1>, std::_Placeholder<2>)>::operator()<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*, void>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&) (this=<optimized out>) at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:1133 #16 std::_Function_handler<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*), std::_Bind<std::_Mem_fn<void (OvmsMDNS::*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)> (OvmsMDNS*, std::_Placeholder<1>, std::_Placeholder<2>)> >::_M_invoke(std::_Any_data const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, void*&&) (__functor=..., __args#0=<optimized out>, __args#1=<optimized out>) at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:1871 #17 0x400e88ac in std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)>::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*) const ( this=0x3ffcaef0, __args#0=..., __args#1=0x0) at /Users/casner/src/github/esp-idf/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/5.2.0/functional:2271 #18 0x400e8b48 in OvmsEvents::SignalEvent (this=0x3ffb4290 <MyEvents>, event=..., data=0x0) at /Users/casner/src/github/ovms/vehicle/OVMS.V3/main/./ovms_events.cpp:155 #19 0x400ed573 in OvmsNetManager::MongooseTask (this=0x3ffb4314 <MyNetManager>) ---Type <return> to continue, or q <return> to quit--- at /Users/casner/src/github/ovms/vehicle/OVMS.V3/main/./ovms_netmanager.cpp:322 #20 0x400ed594 in MongooseRawTask (pvParameters=0x3ffb4314 <MyNetManager>) at /Users/casner/src/github/ovms/vehicle/OVMS.V3/main/./ovms_netmanager.cpp:306 (gdb) _______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
On Sun, 18 Mar 2018, Michael Balzer wrote:
From a first look at the mdns code in your backtrace, I would guess that's a double free() for the timer, it seems the timer_handle never gets NULLed.
That may be a bug (deficiency) in the esp-idf mDNS code. Perhaps I hit it because OvmsMDNS::StopMDNS was called without everything coming up correctly first? -- Steve
It seems that mdns_free is being called, while mdns_free is running… It is trivial to fix it in the timer deletion code, but that just delays the problem until a bit later (the hostname free). I am looking at this now. Regards, Mark.
On 19 Mar 2018, at 9:40 AM, Stephen Casner <casner@acm.org> wrote:
On Sun, 18 Mar 2018, Michael Balzer wrote:
From a first look at the mdns code in your backtrace, I would guess that's a double free() for the timer, it seems the timer_handle never gets NULLed.
That may be a bug (deficiency) in the esp-idf mDNS code.
Perhaps I hit it because OvmsMDNS::StopMDNS was called without everything coming up correctly first?
-- Steve _______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
Messy. The issue is the restarting of mdns, coupled with AP/STA coming up/down in different threads. That could result in a mdns_free while another mdns_free or mdns_init is in progress. The mdns library is not thread safe. In particular, they mutex protect some internal stuff but not all of mdns_free or any of mdns_init. I introduced an ovms_mutex library to main. This contains some helpful wrapper functions to make mutexes easy and safe to use: class OvmsMutex Encapsulates a mutex. Provides Lock() and Unlock() functions to access it. class OvmsMutexLock Encapsulates a mutex lock in a safer manner. Constructor locks it, and destructor unlocks it. Using this is as simple as creating a mutex for the object to be protected, and then creating a OvmsMutexLock(&mutex) over that. When the OvmsMutexLock comes in scope, it will lock the mutex, and when it goes out of scope it will unlock it. I’ve done this in other projects, with great success. Using OvmsMutexLock objects means you never forget to unlock the mutex (no matter how weird and wonderful your code paths are). I then used OvmsMutex and OvmsMutexLock in ovms_mdns. The mdns stuff seems ok for me now. Regards, Mark.
On 19 Mar 2018, at 9:51 AM, Mark Webb-Johnson <mark@webb-johnson.net> wrote:
It seems that mdns_free is being called, while mdns_free is running…
It is trivial to fix it in the timer deletion code, but that just delays the problem until a bit later (the hostname free).
I am looking at this now.
Regards, Mark.
On 19 Mar 2018, at 9:40 AM, Stephen Casner <casner@acm.org> wrote:
On Sun, 18 Mar 2018, Michael Balzer wrote:
From a first look at the mdns code in your backtrace, I would guess that's a double free() for the timer, it seems the timer_handle never gets NULLed.
That may be a bug (deficiency) in the esp-idf mDNS code.
Perhaps I hit it because OvmsMDNS::StopMDNS was called without everything coming up correctly first?
-- Steve _______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
It is a task mutex lock, so for mdns I have used them in ‘wait forever’ mode. This is for the code I just submitted a few minutes ago. Looking at the esp-idf mdns code, I think using AP or CLIENT modes would have been ok. Only one interface coming up/down then. But for APCLIENT mode, or when switch between AP and CLIENT modes, the fault will be triggered. Regards, Mark.
On 19 Mar 2018, at 11:40 AM, Greg D. <gregd2350@gmail.com> wrote:
I wonder if those locks are the cause of the hangs I'm getting. Do they have timers on them, or will they wait forever?
Greg
Mark Webb-Johnson wrote:
Messy. The issue is the restarting of mdns, coupled with AP/STA coming up/down in different threads. That could result in a mdns_free while another mdns_free or mdns_init is in progress. The mdns library is not thread safe. In particular, they mutex protect some internal stuff but not all of mdns_free or any of mdns_init.
I introduced an ovms_mutex library to main. This contains some helpful wrapper functions to make mutexes easy and safe to use:
class OvmsMutex Encapsulates a mutex. Provides Lock() and Unlock() functions to access it.
class OvmsMutexLock Encapsulates a mutex lock in a safer manner. Constructor locks it, and destructor unlocks it. Using this is as simple as creating a mutex for the object to be protected, and then creating a OvmsMutexLock(&mutex) over that. When the OvmsMutexLock comes in scope, it will lock the mutex, and when it goes out of scope it will unlock it.
I’ve done this in other projects, with great success. Using OvmsMutexLock objects means you never forget to unlock the mutex (no matter how weird and wonderful your code paths are).
I then used OvmsMutex and OvmsMutexLock in ovms_mdns. The mdns stuff seems ok for me now.
Regards, Mark.
On 19 Mar 2018, at 9:51 AM, Mark Webb-Johnson <mark@webb-johnson.net <mailto:mark@webb-johnson.net>> wrote:
It seems that mdns_free is being called, while mdns_free is running…
It is trivial to fix it in the timer deletion code, but that just delays the problem until a bit later (the hostname free).
I am looking at this now.
Regards, Mark.
On 19 Mar 2018, at 9:40 AM, Stephen Casner <casner@acm.org <mailto:casner@acm.org>> wrote:
On Sun, 18 Mar 2018, Michael Balzer wrote:
From a first look at the mdns code in your backtrace, I would guess that's a double free() for the timer, it seems the timer_handle never gets NULLed.
That may be a bug (deficiency) in the esp-idf mDNS code.
Perhaps I hit it because OvmsMDNS::StopMDNS was called without everything coming up correctly first?
-- Steve _______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev <http://lists.teslaclub.hk/mailman/listinfo/ovmsdev>
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev <http://lists.teslaclub.hk/mailman/listinfo/ovmsdev>
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev <http://lists.teslaclub.hk/mailman/listinfo/ovmsdev>
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
Greg, the async console is a separate task that should be able to look at some things as long as they don't depend upon the networking tasks or objects. Is it hung also? -- Steve On Sun, 18 Mar 2018, Greg D. wrote:
Ok, so not *in* SNTP, but related to SNTP. After a minute's wait, I saw a pair of records get "sent" to the v2 server. They never arrived. After that, I tried the stop/start of the server, and that's where it hung. Sounds like a missing mutex unlock somewhere. What resources does starting the server make use of, that might have also been used by SNTP?
Greg
Greg D. wrote: Ok, but I'm in ap+client mode, but don't have anything attaching to the AP side of things.
AP+Client, hotspot running. Boot. Client gets an IP address, server connects, metrics sent. Some time later (minutes or so), the modem finally connects. Wifi is still connected, and is still the primary interface, but the server is no longer getting updates from module. server stop, server start, hang. The last thing to the console this past time before the phone client no longer got updates was "starting SNTP client"
Not 100% repeatable, but close to it. I think partly it depends on the modem's luck in getting a good cell connection; it's kind of iffy here. Or, is the deadlock in the SNTP client instead of MDNS?
Greg
Mark Webb-Johnson wrote: It is a task mutex lock, so for mdns I have used them in ‘wait forever’ mode. This is for the code I just submitted a few minutes ago.
Looking at the esp-idf mdns code, I think using AP or CLIENT modes would have been ok. Only one interface coming up/down then. But for APCLIENT mode, or when switch between AP and CLIENT modes, the fault will be triggered.
Regards, Mark.
On 19 Mar 2018, at 11:40 AM, Greg D. <gregd2350@gmail.com> wrote:
I wonder if those locks are the cause of the hangs I'm getting. Do they have timers on them, or will they wait forever?
Greg
Mark Webb-Johnson wrote: Messy. The issue is the restarting of mdns, coupled with AP/STA coming up/down in different threads. That could result in a mdns_free while another mdns_free or mdns_init is in progress. The mdns library is not thread safe. In particular, they mutex protect some internal stuff but not all of mdns_free or any of mdns_init. I introduced an ovms_mutex library to main. This contains some helpful wrapper functions to make mutexes easy and safe to use:
class OvmsMutex
Encapsulates a mutex. Provides Lock() and Unlock() functions to access it.
class OvmsMutexLock
Encapsulates a mutex lock in a safer manner.
Constructor locks it, and destructor unlocks it.
Using this is as simple as creating a mutex for the object to be protected, and then creating a OvmsMutexLock(&mutex) over that. When the OvmsMutexLock comes in scope, it will lock the mutex, and when it goes out of scope it will unlock it.
I’ve done this in other projects, with great success. Using OvmsMutexLock objects means you never forget to unlock the mutex (no matter how weird and wonderful your code paths are).
I then used OvmsMutex and OvmsMutexLock in ovms_mdns. The mdns stuff seems ok for me now.
Regards, Mark.
On 19 Mar 2018, at 9:51 AM, Mark Webb-Johnson <mark@webb-johnson.net> wrote:
It seems that mdns_free is being called, while mdns_free is running…
It is trivial to fix it in the timer deletion code, but that just delays the problem until a bit later (the hostname free).
I am looking at this now.
Regards, Mark.
On 19 Mar 2018, at 9:40 AM, Stephen Casner <casner@acm.org> wrote:
On Sun, 18 Mar 2018, Michael Balzer wrote:
From a first look at the mdns code in your backtrace, I would guess that's a double free() for the timer, it seems the timer_handle never gets NULLed.
That may be a bug (deficiency) in the esp-idf mDNS code.
Perhaps I hit it because OvmsMDNS::StopMDNS was called without everything coming up correctly first?
-- Steve _______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
There seems to be something going on internally in lwip regarding this. It is such a dumb implementation anyway, with a separate task and static initialisation of the interface list at the time of startup; really not ideal for a dynamically changing environment. It would be much more sensible to just have a timer and every N seconds iterate through the current interface list to send out MDNS broadcasts on each active one that is suitable for MDNS (wifi only, really). I think safest for the moment to just disable MDNS. I’ve done that now, and it is running live. That seems to be pretty good for me. Can you see if that works better for you? I’m still seeing some issues with ssh/telnet startup that I’m looking at now. Given where we are, I’m going to tell China that we need another 48 hours to confirm the firmware, before I send to them. That buys us some time to get this as stable as we can. Regards, Mark.
On 19 Mar 2018, at 12:27 PM, Greg D. <gregd2350@gmail.com> wrote:
Stephen Casner wrote:
Greg, the async console is a separate task that should be able to look at some things as long as they don't depend upon the networking tasks or objects. Is it hung also?
Async console? So, not USB. Don't have a connection for that.
So, tried it again... Note that the wifi connection gets dropped in the middle, but I didn't turn off the hotspot!
Network status, however, says that it's still connected. That's wrong.
Stop the server, then start, and this time instead of a hang I get a crash.
Greg
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console OVMS> OVMS> OVMS> I (4185) wifi: n:1 1, o:1 0, ap:1 1, sta:1 0, prof:1 I (4835) wifi: state: init -> auth (b0) I (4845) wifi: state: auth -> assoc (0) I (4855) wifi: state: assoc -> run (10) I (4875) wifi: connected with gregnet3, channel 1 I (4985) simcom: State: Enter PoweredOn state I (5915) event: sta ip: 192.168.43.49, mask: 255.255.255.0, gw: 192.168.43.1 I (5915) netmanager: Set DNS#0 9.9.9.9 I (5915) netmanager: Set DNS#1 8.8.8.8 I (5915) netmanager: Interface priority is st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) I (5915) time: Starting SNTP client I (5925) ovms-server-v2: Network is up, so attempt network connection I (5925) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (5925) ovms-server-v2: Status: Connecting... I (5935) ovms-mdns: Stopped MDNS service I (5935) ovms-mdns: Started MDNS service I (5955) esp32wifi: WiFi UP with SSID: gregnet3, MAC: 30:ae:a4:37:1b:64, IP: 192.168.43.49, mask: 255.255.255.0, gw: 192.168.43.1 I (6395) ovms-server-v2: Connection successful I (6395) ovms-server-v2: Status: Logging in... I (6395) ovms-server-v2: Sending server login: MP-C 0 gDAm8Tas7ISVuhmQ8zGDfh hygW8au7zuXDV5qkWYvMIA== ROADSTER_834 I (6635) ovms-server-v2: Got server response: MP-S 0 ubeiHXgCpUtGX1f6XRXlQK BB2JuaR9oc8TL6Ame7qkEg== I (6645) ovms-server-v2: Server token is ubeiHXgCpUtGX1f6XRXlQK and digest is BB2JuaR9oc8TL6Ame7qkEg== I (6645) ovms-server-v2: Status: Server auth ok. Now priming crypto. I (6645) ovms-server-v2: Shared secret key is ubeiHXgCpUtGX1f6XRXlQKgDAm8Tas7ISVuhmQ8zGDfh (44 bytes) I (6645) ovms-server-v2: Status: OVMS V2 login successful, and crypto channel established I (6655) ovms-server-v2: Incoming Msg: MP-0 Z0 I (7445) ovms-server-v2: Send MP-0 S0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (7445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,7,0,0,0,0,0.269231,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,0,1,TR,gregnet3 I (12625) housekeeping: System considered stable (free: 37872 bytes) I (22225) ovms-server-v2: Incoming Msg: MP-0 Z1 I (22225) ovms-server-v2: One or more peers have connected I (22445) ovms-server-v2: Send MP-0 S0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (22445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,22,0,0,0,0,0.351648,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,9,1,TR,gregnet3 I (24475) simcom: State: Enter MuxStart state I (24475) gsm-mux: Start MUX I (24485) gsm-mux: Channel #0 is open I (24495) gsm-mux: Channel #1 is open I (24505) gsm-mux: Channel #2 is open I (24515) gsm-mux: Channel #3 is open I (24525) gsm-mux: Channel #4 is open I (25445) simcom: State: Enter NetWait state I (25745) ovms-server-v2: Incoming Msg: MP-0 Z0 OVMS> metric set v.b.soc 44 Metric set I (35485) simcom: CREG Network Registration: RegisteredRoaming I (36445) simcom: State: Enter NetStart state I (37585) simcom: PPP Connection is ready to start I (38445) simcom: State: Enter NetMode state I (38445) gsm-ppp: Initialising... I (40145) ovms-server-v2: Incoming Msg: MP-0 Z1 I (40145) ovms-server-v2: One or more peers have connected I (40445) ovms-server-v2: Send MP-0 S44.0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (40445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,40,0,0,0,0,0.28022,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,9,1,TR,T-Mobile Hologram E (40645) ovms-server-v2: Status: Error: Disconnected from OVMS Server V2 I (41895) gsm-ppp: StatusCallBack: None I (41895) gsm-ppp: status_cb: Connected I (41895) gsm-ppp: our_ipaddr = 10.170.146.142 I (41895) gsm-ppp: his_ipaddr = 10.64.64.64 I (41895) gsm-ppp: netmask = 255.255.255.255 I (41895) gsm-ppp: our6_ipaddr = :: I (41895) netmanager: Set DNS#0 9.9.9.9 I (41895) netmanager: Set DNS#1 8.8.8.8 I (41895) netmanager: Interface priority is st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) I (41895) time: Starting SNTP client I (41895) ovms-server-v2: Network is up, so attempt network connection I (41895) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (41895) ovms-server-v2: Status: Connecting... I (60445) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (60445) ovms-server-v2: Status: Connecting... I (62565) wifi: bcn_timout,ap_probe_send_start I (65065) wifi: ap_probe_send over, resett wifi status to disassoc I (65065) wifi: state: run -> init (1) I (65065) wifi: n:1 0, o:1 1, ap:1 1, sta:1 0, prof:1 OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> server v2 status Connecting... OVMS> network Interface#3: pp3 (ifup=1 linkup=1) IPv4: 10.170.146.142/255.255.255.255 <http://10.170.146.142/255.255.255.255> gateway 10.64.64.64
Interface#2: ap2 (ifup=1 linkup=1) IPv4: 192.168.4.1/255.255.255.0 <http://192.168.4.1/255.255.255.0> gateway 192.168.4.1
Interface#1: st1 (ifup=1 linkup=1) IPv4: 192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1
Interface#0: lo0 (ifup=1 linkup=1) IPv4: 127.0.0.1/255.0.0.0 <http://127.0.0.1/255.0.0.0> gateway 127.0.0.1
DNS: 9.9.9.9 8.8.8.8
Default Interface: st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) OVMS> simcom SIMCOM Network Registration: RegisteredRoaming State: NetMode Ticker: 22 User Data: 0
Mux Status: up Open Channels: 4 Framing Errors: 0 Last RX frame: 19 sec(s) ago RX frames: 18 TX frames: 18
PPP Connected on channel: #2 Last Error: None
GPS Status: disabled Time: disabled NMEA: GPS/GLONASS Not Connected OVMS> wifi WiFi Power: on Mode: Access-Point + Client mode
STA SSID: gregnet3 MAC: 30:ae:a4:37:1b:64 IP: 192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> GW: 192.168.43.1
AP SSID: ovms MAC: 30:ae:a4:37:1b:65 IP: 192.168.4.1 AP Stations: 0 OVMS> server v2 stop Stopping OVMS Server V2 connection (oscv2) OVMS> server v2 status OVMS v2 server has not been started OVMS> server v2 start Launching OVMS Server V2 connection (oscv2) Guru Meditation Error: Core 1 panic'ed (LoadProhibited) . Exception was unhandled. Core 1 register dump: PC : 0x400ee17d PS : 0x00060630 A0 : 0x800ef642 A1 : 0x3fff5020 A2 : 0xffffffff A3 : 0x3fff2540 A4 : 0x00000000 A5 : 0x3fff5100 A6 : 0x3fff50e0 A7 : 0x0000000c A8 : 0x800ee179 A9 : 0x3fff4ff0 A10 : 0xffffffff A11 : 0x3f411528 A12 : 0x3fff5100 A13 : 0x3fff50e0 A14 : 0x0000000c A15 : 0x3fff1ea4 SAR : 0x00000004 EXCCAUSE: 0x0000001c EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff
Backtrace: 0x400ee17d:0x3fff5020 0x400ef63f:0x3fff5060 0x400f04c5:0x3fff50a0 0x40082c71:0x3fff50d0 0x40115696:0x3fff5120 0x401161ef:0x3fff5140 0x40116a7d:0x3fff5330 0x40116aa5:0x3fff5960 0x400eeeb2:0x3fff5980 0x400eefa9:0x3fff59b0 0x400eef9b:0x3fff59e0 0x400eef9b:0x3fff5a10 0x400eefd1:0x3fff5a40 0x400e534c:0x3fff5a60 0x400f1809:0x3fff5a80 0x400f1870:0x3fff5ae0 0x400e537b:0x3fff5b20 0x401eb64f:0x3fff5b40 0x400f0575:0x3fff5b60 0x400ebf8d:0x3fff5b90 0x400ec179:0x3fff5bc0 0x400f0421:0x3fff5be0 0x400f0430:0x3fff5c00 0x400e3295:0x3fff5c20
Rebooting... ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT) configsip: 156795334, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:4560 ho 0 tail 12 room 4 load:0x40078000,len:0 load:0x40078000,len:13176 entry 0x40078d38 I (647) cpu_start: Pro cpu up. I (647) cpu_start: Starting app cpu, entry point is 0x40081300 I (632) cpu_start: App cpu up. I (651) heap_init: Initializing. RAM available for dynamic allocation: I (657) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (664) heap_init: At 3FFBBAC0 len 00024540 (145 KiB): DRAM I (670) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM I (676) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (684) heap_init: At 40091FDC len 0000E024 (56 KiB): IRAM I (689) cpu_start: Pro cpu start user code I (35) ovms_main: Set default logging level for * to INFO I (35) command: Initialising COMMAND (1000) I (36) boot: Initialising BOOT (1100) I (40) boot: Boot #1 reasons for CPU0=12 and CPU1=12 E (46) boot: Crash #1 detected I (49) events: Initialising EVENTS (1200) I (54) config: Initialising CONFIG (1400) I (59) time: Initialising TIME (1500) I (64) script: Initialising SCRIPTS (1600) I (68) script: Using DUKTAPE javascript engine I (74) metrics: Initialising METRICS (1810) I (78) metrics: OvmsMetric is 28 bytes I (82) metrics: OvmsMetricBool is 32 bytes I (87) metrics: Expanding DUKTAPE javascript engine I (97) notify: Initialising NOTIFICATIONS (1820) I (99) notify: Registered notification type info I (103) notify: Registered notification type error I (109) notify: Registered notification type alert I (114) notify: Registered notification type data I (120) location: Initialising LOCATIONS (1900) I (126) location: Expanding DUKTAPE javascript engine I (131) vehicle: Initialising VEHICLE Factory (2000) I (137) pcp: Initialising POWER (4000) I (141) max7317: Initialising MAX7317 EGPIO (4200) I (146) sdcard: Initialising SD CARD (4400) I (151) ota: Initialising OTA (4400) I (156) can: Initialising CAN (4500) I (161) simcom: Initialising SIMCOM (4600) I (165) test: Initialising TEST (5000) I (169) ovms-module: Initialising MODULE (5100) I (174) vfs: Initialising VFS (5200) I (179) ovms-server: Initialising OVMS Server (6000) I (184) ovms-server-v2: Initialising OVMS V2 Server (6100) I (190) ovms-server-v3: Initialising OVMS V3 Server (6200) I (196) obd2ecu: Initialising OBD2ECU (7000) I (202) canopen: Initialising CANopen (7000) I (207) esp32wifi: Initialising ESP32WIFI (8000) I (212) ovms-mdns: Initialising MDNS (8100) I (217) webserver: Initialising WEBSERVER (8200) I (223) telnet: Initialising Telnet (8300) I (227) ssh: Initialising SSH (8300) I (231) re: Initialising RE Tools (8800) I (236) netmanager: Initialising NETMANAGER (8999) I (242) v-track: Registering Vehicle: TRACK (9000) I (246) v-teslaroadster: Registering Vehicle: Tesla Roadster (9000) I (253) v-teslamodels: Registering Vehicle: Tesla Model S (9000) I (260) v-obdii: Registering Vehicle: OBDII (9000) I (265) v-none: Registering Vehicle: NONE (9000) I (271) v-demo: Registering Vehicle: DEMO (9000) I (276) version: Initialising Versioning (9900) I (285) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (331) ovms_main: Executing on CPU core 0 I (331) ovms_main: Mounting CONFIG... W (381) webserver: UpdateGlobalAuthFile: no password set => no auth for web console I (391) ovms_main: Registering default configs... I (391) ovms_main: Starting HOUSEKEEPING... I (391) housekeeping: Initialising HOUSEKEEPING Framework... I (451) housekeeping: Executing on CPU core 1 I (451) housekeeping: reset_reason: cpu0=12, cpu1=12 I (451) housekeeping: Starting PERIPHERALS... I (461) peripherals: Initialising OVMS Peripherals... I (461) peripherals: TCP/IP Adaptor I (471) peripherals: ESP32 system I (471) peripherals: SPI bus I (471) peripherals: MAX7317 I/O Expander I (481) peripherals: ESP32 CAN I (481) peripherals: ESP32 WIFI I (491) peripherals: ESP32 BLUETOOTH I (491) peripherals: ESP32 ADC I (491) peripherals: MCP2515 CAN 1/2 I (511) peripherals: MCP2515 CAN 2/2 I (521) peripherals: SD CARD I (521) peripherals: SIMCOM MODEM I (521) gpio: GPIO[16]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (531) gpio: GPIO[17]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (541) uart: queue free spaces: 10 I (541) ext12v: Powering off external 12V devices I (551) housekeeping: Auto init ext12v (free: 112436 bytes) I (551) ext12v: Powering on external 12V devices I (561) housekeeping: Auto init wifi (free: 112436 bytes) I (561) wifi: wifi firmware version: ebd3e5d I (571) wifi: config NVS flash: enabled I (571) wifi: config nano formating: disabled I (571) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (581) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (601) wifi: Init dynamic tx buffer num: 16 I (601) wifi: Init data frame dynamic rx buffer num: 16 I (601) wifi: Init management frame dynamic rx buffer num: 16 I (601) wifi: wifi driver task: 3ffe61dc, prio:23, stack:4096 I (611) wifi: Init static rx buffer num: 4 I (611) wifi: Init dynamic rx buffer num: 16 I (611) wifi: wifi power manager task: 0x3ffe8974 prio: 21 stack: 2560 I (1331) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 0 I (1331) wifi: mode : sta (30:ae:a4:37:1b:64) + softAP (30:ae:a4:37:1b:65) I (1341) housekeeping: Auto init modem (free: 90292 bytes) I (1351) simcom: State: Enter PoweringOn state I (1351) simcom: Power Cycle I (1351) ovms-mdns: Started MDNS service I (1381) webserver: Launching Web Server I (1381) esp32wifi: AP started with SSID: ovms, MAC: 30:ae:a4:37:1b:65, IP: 192.168.4.1 I (1461) simcom: State: Enter PoweredOn state I (2351) housekeeping: Auto init vehicle (free: 75064 bytes) I (2351) v-teslaroadster: Tesla Roadster v1.x, v2.x and v3.0 vehicle module I (2361) housekeeping: Auto init obd2ecu (free: 69332 bytes) I (2561) housekeeping: Auto init server v2 (free: 60676 bytes) I (2561) ovms-server-v2: OVMS Server V2 registered metric modifier is #1 I (2571) ovms-server-v2: Status: Starting I (2571) ovms-server-v2: OVMS Server v2 running I (2581) housekeeping: Auto init server v3 (free: 56364 bytes) I (2581) housekeeping: Auto init done (free: 56364 bytes) I (2591) housekeeping: Starting USB console... I (2591) uart: queue free spaces: 30 I (2601) version: Set version
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
And MDNS is back. I looked through the source code and found a mdns_handle_system_event() call that is used to pass all the system events through to MDNS. That then dynamically adds/removed wifi STA and AP interfaces as they come up/down. No need to init and free the mdns system the whole time. Went back to the documentation, and found it right at the bottom… Good grief. Anyway, I migrated the code to use that. Now, MDNS starts at boot time and stays up all the time. Seems reliable to me, so I committed it. Regards, Mark
On 19 Mar 2018, at 12:57 PM, Mark Webb-Johnson <mark@webb-johnson.net> wrote:
There seems to be something going on internally in lwip regarding this. It is such a dumb implementation anyway, with a separate task and static initialisation of the interface list at the time of startup; really not ideal for a dynamically changing environment. It would be much more sensible to just have a timer and every N seconds iterate through the current interface list to send out MDNS broadcasts on each active one that is suitable for MDNS (wifi only, really).
I think safest for the moment to just disable MDNS. I’ve done that now, and it is running live. That seems to be pretty good for me. Can you see if that works better for you?
I’m still seeing some issues with ssh/telnet startup that I’m looking at now.
Given where we are, I’m going to tell China that we need another 48 hours to confirm the firmware, before I send to them. That buys us some time to get this as stable as we can.
Regards, Mark.
On 19 Mar 2018, at 12:27 PM, Greg D. <gregd2350@gmail.com <mailto:gregd2350@gmail.com>> wrote:
Stephen Casner wrote:
Greg, the async console is a separate task that should be able to look at some things as long as they don't depend upon the networking tasks or objects. Is it hung also?
Async console? So, not USB. Don't have a connection for that.
So, tried it again... Note that the wifi connection gets dropped in the middle, but I didn't turn off the hotspot!
Network status, however, says that it's still connected. That's wrong.
Stop the server, then start, and this time instead of a hang I get a crash.
Greg
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console OVMS> OVMS> OVMS> I (4185) wifi: n:1 1, o:1 0, ap:1 1, sta:1 0, prof:1 I (4835) wifi: state: init -> auth (b0) I (4845) wifi: state: auth -> assoc (0) I (4855) wifi: state: assoc -> run (10) I (4875) wifi: connected with gregnet3, channel 1 I (4985) simcom: State: Enter PoweredOn state I (5915) event: sta ip: 192.168.43.49, mask: 255.255.255.0, gw: 192.168.43.1 I (5915) netmanager: Set DNS#0 9.9.9.9 I (5915) netmanager: Set DNS#1 8.8.8.8 I (5915) netmanager: Interface priority is st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) I (5915) time: Starting SNTP client I (5925) ovms-server-v2: Network is up, so attempt network connection I (5925) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (5925) ovms-server-v2: Status: Connecting... I (5935) ovms-mdns: Stopped MDNS service I (5935) ovms-mdns: Started MDNS service I (5955) esp32wifi: WiFi UP with SSID: gregnet3, MAC: 30:ae:a4:37:1b:64, IP: 192.168.43.49, mask: 255.255.255.0, gw: 192.168.43.1 I (6395) ovms-server-v2: Connection successful I (6395) ovms-server-v2: Status: Logging in... I (6395) ovms-server-v2: Sending server login: MP-C 0 gDAm8Tas7ISVuhmQ8zGDfh hygW8au7zuXDV5qkWYvMIA== ROADSTER_834 I (6635) ovms-server-v2: Got server response: MP-S 0 ubeiHXgCpUtGX1f6XRXlQK BB2JuaR9oc8TL6Ame7qkEg== I (6645) ovms-server-v2: Server token is ubeiHXgCpUtGX1f6XRXlQK and digest is BB2JuaR9oc8TL6Ame7qkEg== I (6645) ovms-server-v2: Status: Server auth ok. Now priming crypto. I (6645) ovms-server-v2: Shared secret key is ubeiHXgCpUtGX1f6XRXlQKgDAm8Tas7ISVuhmQ8zGDfh (44 bytes) I (6645) ovms-server-v2: Status: OVMS V2 login successful, and crypto channel established I (6655) ovms-server-v2: Incoming Msg: MP-0 Z0 I (7445) ovms-server-v2: Send MP-0 S0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (7445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,7,0,0,0,0,0.269231,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,0,1,TR,gregnet3 I (12625) housekeeping: System considered stable (free: 37872 bytes) I (22225) ovms-server-v2: Incoming Msg: MP-0 Z1 I (22225) ovms-server-v2: One or more peers have connected I (22445) ovms-server-v2: Send MP-0 S0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (22445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,22,0,0,0,0,0.351648,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,9,1,TR,gregnet3 I (24475) simcom: State: Enter MuxStart state I (24475) gsm-mux: Start MUX I (24485) gsm-mux: Channel #0 is open I (24495) gsm-mux: Channel #1 is open I (24505) gsm-mux: Channel #2 is open I (24515) gsm-mux: Channel #3 is open I (24525) gsm-mux: Channel #4 is open I (25445) simcom: State: Enter NetWait state I (25745) ovms-server-v2: Incoming Msg: MP-0 Z0 OVMS> metric set v.b.soc 44 Metric set I (35485) simcom: CREG Network Registration: RegisteredRoaming I (36445) simcom: State: Enter NetStart state I (37585) simcom: PPP Connection is ready to start I (38445) simcom: State: Enter NetMode state I (38445) gsm-ppp: Initialising... I (40145) ovms-server-v2: Incoming Msg: MP-0 Z1 I (40145) ovms-server-v2: One or more peers have connected I (40445) ovms-server-v2: Send MP-0 S44.0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (40445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,40,0,0,0,0,0.28022,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,9,1,TR,T-Mobile Hologram E (40645) ovms-server-v2: Status: Error: Disconnected from OVMS Server V2 I (41895) gsm-ppp: StatusCallBack: None I (41895) gsm-ppp: status_cb: Connected I (41895) gsm-ppp: our_ipaddr = 10.170.146.142 I (41895) gsm-ppp: his_ipaddr = 10.64.64.64 I (41895) gsm-ppp: netmask = 255.255.255.255 I (41895) gsm-ppp: our6_ipaddr = :: I (41895) netmanager: Set DNS#0 9.9.9.9 I (41895) netmanager: Set DNS#1 8.8.8.8 I (41895) netmanager: Interface priority is st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) I (41895) time: Starting SNTP client I (41895) ovms-server-v2: Network is up, so attempt network connection I (41895) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (41895) ovms-server-v2: Status: Connecting... I (60445) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (60445) ovms-server-v2: Status: Connecting... I (62565) wifi: bcn_timout,ap_probe_send_start I (65065) wifi: ap_probe_send over, resett wifi status to disassoc I (65065) wifi: state: run -> init (1) I (65065) wifi: n:1 0, o:1 1, ap:1 1, sta:1 0, prof:1 OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> server v2 status Connecting... OVMS> network Interface#3: pp3 (ifup=1 linkup=1) IPv4: 10.170.146.142/255.255.255.255 <http://10.170.146.142/255.255.255.255> gateway 10.64.64.64
Interface#2: ap2 (ifup=1 linkup=1) IPv4: 192.168.4.1/255.255.255.0 <http://192.168.4.1/255.255.255.0> gateway 192.168.4.1
Interface#1: st1 (ifup=1 linkup=1) IPv4: 192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1
Interface#0: lo0 (ifup=1 linkup=1) IPv4: 127.0.0.1/255.0.0.0 <http://127.0.0.1/255.0.0.0> gateway 127.0.0.1
DNS: 9.9.9.9 8.8.8.8
Default Interface: st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) OVMS> simcom SIMCOM Network Registration: RegisteredRoaming State: NetMode Ticker: 22 User Data: 0
Mux Status: up Open Channels: 4 Framing Errors: 0 Last RX frame: 19 sec(s) ago RX frames: 18 TX frames: 18
PPP Connected on channel: #2 Last Error: None
GPS Status: disabled Time: disabled NMEA: GPS/GLONASS Not Connected OVMS> wifi WiFi Power: on Mode: Access-Point + Client mode
STA SSID: gregnet3 MAC: 30:ae:a4:37:1b:64 IP: 192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> GW: 192.168.43.1
AP SSID: ovms MAC: 30:ae:a4:37:1b:65 IP: 192.168.4.1 AP Stations: 0 OVMS> server v2 stop Stopping OVMS Server V2 connection (oscv2) OVMS> server v2 status OVMS v2 server has not been started OVMS> server v2 start Launching OVMS Server V2 connection (oscv2) Guru Meditation Error: Core 1 panic'ed (LoadProhibited) . Exception was unhandled. Core 1 register dump: PC : 0x400ee17d PS : 0x00060630 A0 : 0x800ef642 A1 : 0x3fff5020 A2 : 0xffffffff A3 : 0x3fff2540 A4 : 0x00000000 A5 : 0x3fff5100 A6 : 0x3fff50e0 A7 : 0x0000000c A8 : 0x800ee179 A9 : 0x3fff4ff0 A10 : 0xffffffff A11 : 0x3f411528 A12 : 0x3fff5100 A13 : 0x3fff50e0 A14 : 0x0000000c A15 : 0x3fff1ea4 SAR : 0x00000004 EXCCAUSE: 0x0000001c EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff
Backtrace: 0x400ee17d:0x3fff5020 0x400ef63f:0x3fff5060 0x400f04c5:0x3fff50a0 0x40082c71:0x3fff50d0 0x40115696:0x3fff5120 0x401161ef:0x3fff5140 0x40116a7d:0x3fff5330 0x40116aa5:0x3fff5960 0x400eeeb2:0x3fff5980 0x400eefa9:0x3fff59b0 0x400eef9b:0x3fff59e0 0x400eef9b:0x3fff5a10 0x400eefd1:0x3fff5a40 0x400e534c:0x3fff5a60 0x400f1809:0x3fff5a80 0x400f1870:0x3fff5ae0 0x400e537b:0x3fff5b20 0x401eb64f:0x3fff5b40 0x400f0575:0x3fff5b60 0x400ebf8d:0x3fff5b90 0x400ec179:0x3fff5bc0 0x400f0421:0x3fff5be0 0x400f0430:0x3fff5c00 0x400e3295:0x3fff5c20
Rebooting... ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT) configsip: 156795334, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:4560 ho 0 tail 12 room 4 load:0x40078000,len:0 load:0x40078000,len:13176 entry 0x40078d38 I (647) cpu_start: Pro cpu up. I (647) cpu_start: Starting app cpu, entry point is 0x40081300 I (632) cpu_start: App cpu up. I (651) heap_init: Initializing. RAM available for dynamic allocation: I (657) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (664) heap_init: At 3FFBBAC0 len 00024540 (145 KiB): DRAM I (670) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM I (676) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (684) heap_init: At 40091FDC len 0000E024 (56 KiB): IRAM I (689) cpu_start: Pro cpu start user code I (35) ovms_main: Set default logging level for * to INFO I (35) command: Initialising COMMAND (1000) I (36) boot: Initialising BOOT (1100) I (40) boot: Boot #1 reasons for CPU0=12 and CPU1=12 E (46) boot: Crash #1 detected I (49) events: Initialising EVENTS (1200) I (54) config: Initialising CONFIG (1400) I (59) time: Initialising TIME (1500) I (64) script: Initialising SCRIPTS (1600) I (68) script: Using DUKTAPE javascript engine I (74) metrics: Initialising METRICS (1810) I (78) metrics: OvmsMetric is 28 bytes I (82) metrics: OvmsMetricBool is 32 bytes I (87) metrics: Expanding DUKTAPE javascript engine I (97) notify: Initialising NOTIFICATIONS (1820) I (99) notify: Registered notification type info I (103) notify: Registered notification type error I (109) notify: Registered notification type alert I (114) notify: Registered notification type data I (120) location: Initialising LOCATIONS (1900) I (126) location: Expanding DUKTAPE javascript engine I (131) vehicle: Initialising VEHICLE Factory (2000) I (137) pcp: Initialising POWER (4000) I (141) max7317: Initialising MAX7317 EGPIO (4200) I (146) sdcard: Initialising SD CARD (4400) I (151) ota: Initialising OTA (4400) I (156) can: Initialising CAN (4500) I (161) simcom: Initialising SIMCOM (4600) I (165) test: Initialising TEST (5000) I (169) ovms-module: Initialising MODULE (5100) I (174) vfs: Initialising VFS (5200) I (179) ovms-server: Initialising OVMS Server (6000) I (184) ovms-server-v2: Initialising OVMS V2 Server (6100) I (190) ovms-server-v3: Initialising OVMS V3 Server (6200) I (196) obd2ecu: Initialising OBD2ECU (7000) I (202) canopen: Initialising CANopen (7000) I (207) esp32wifi: Initialising ESP32WIFI (8000) I (212) ovms-mdns: Initialising MDNS (8100) I (217) webserver: Initialising WEBSERVER (8200) I (223) telnet: Initialising Telnet (8300) I (227) ssh: Initialising SSH (8300) I (231) re: Initialising RE Tools (8800) I (236) netmanager: Initialising NETMANAGER (8999) I (242) v-track: Registering Vehicle: TRACK (9000) I (246) v-teslaroadster: Registering Vehicle: Tesla Roadster (9000) I (253) v-teslamodels: Registering Vehicle: Tesla Model S (9000) I (260) v-obdii: Registering Vehicle: OBDII (9000) I (265) v-none: Registering Vehicle: NONE (9000) I (271) v-demo: Registering Vehicle: DEMO (9000) I (276) version: Initialising Versioning (9900) I (285) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (331) ovms_main: Executing on CPU core 0 I (331) ovms_main: Mounting CONFIG... W (381) webserver: UpdateGlobalAuthFile: no password set => no auth for web console I (391) ovms_main: Registering default configs... I (391) ovms_main: Starting HOUSEKEEPING... I (391) housekeeping: Initialising HOUSEKEEPING Framework... I (451) housekeeping: Executing on CPU core 1 I (451) housekeeping: reset_reason: cpu0=12, cpu1=12 I (451) housekeeping: Starting PERIPHERALS... I (461) peripherals: Initialising OVMS Peripherals... I (461) peripherals: TCP/IP Adaptor I (471) peripherals: ESP32 system I (471) peripherals: SPI bus I (471) peripherals: MAX7317 I/O Expander I (481) peripherals: ESP32 CAN I (481) peripherals: ESP32 WIFI I (491) peripherals: ESP32 BLUETOOTH I (491) peripherals: ESP32 ADC I (491) peripherals: MCP2515 CAN 1/2 I (511) peripherals: MCP2515 CAN 2/2 I (521) peripherals: SD CARD I (521) peripherals: SIMCOM MODEM I (521) gpio: GPIO[16]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (531) gpio: GPIO[17]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (541) uart: queue free spaces: 10 I (541) ext12v: Powering off external 12V devices I (551) housekeeping: Auto init ext12v (free: 112436 bytes) I (551) ext12v: Powering on external 12V devices I (561) housekeeping: Auto init wifi (free: 112436 bytes) I (561) wifi: wifi firmware version: ebd3e5d I (571) wifi: config NVS flash: enabled I (571) wifi: config nano formating: disabled I (571) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (581) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (601) wifi: Init dynamic tx buffer num: 16 I (601) wifi: Init data frame dynamic rx buffer num: 16 I (601) wifi: Init management frame dynamic rx buffer num: 16 I (601) wifi: wifi driver task: 3ffe61dc, prio:23, stack:4096 I (611) wifi: Init static rx buffer num: 4 I (611) wifi: Init dynamic rx buffer num: 16 I (611) wifi: wifi power manager task: 0x3ffe8974 prio: 21 stack: 2560 I (1331) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 0 I (1331) wifi: mode : sta (30:ae:a4:37:1b:64) + softAP (30:ae:a4:37:1b:65) I (1341) housekeeping: Auto init modem (free: 90292 bytes) I (1351) simcom: State: Enter PoweringOn state I (1351) simcom: Power Cycle I (1351) ovms-mdns: Started MDNS service I (1381) webserver: Launching Web Server I (1381) esp32wifi: AP started with SSID: ovms, MAC: 30:ae:a4:37:1b:65, IP: 192.168.4.1 I (1461) simcom: State: Enter PoweredOn state I (2351) housekeeping: Auto init vehicle (free: 75064 bytes) I (2351) v-teslaroadster: Tesla Roadster v1.x, v2.x and v3.0 vehicle module I (2361) housekeeping: Auto init obd2ecu (free: 69332 bytes) I (2561) housekeeping: Auto init server v2 (free: 60676 bytes) I (2561) ovms-server-v2: OVMS Server V2 registered metric modifier is #1 I (2571) ovms-server-v2: Status: Starting I (2571) ovms-server-v2: OVMS Server v2 running I (2581) housekeeping: Auto init server v3 (free: 56364 bytes) I (2581) housekeeping: Auto init done (free: 56364 bytes) I (2591) housekeeping: Starting USB console... I (2591) uart: queue free spaces: 30 I (2601) version: Set version
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
Just pulled the latest version, reenabled mDNS. Server v2 again does not connect, and the module crashes immediately on "module memory" (related?): I (1239) housekeeping: Auto init wifi (free: 134556 bytes) I (1249) wifi: wifi firmware version: ebd3e5d I (1249) wifi: config NVS flash: enabled I (1259) wifi: config nano formating: disabled I (1259) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1269) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1279) wifi: Init dynamic tx buffer num: 16 I (1279) wifi: Init data frame dynamic rx buffer num: 16 I (1279) wifi: Init management frame dynamic rx buffer num: 16 I (1289) wifi: wifi driver task: 3ffdf3a8, prio:23, stack:4096 I (1289) wifi: Init static rx buffer num: 4 I (1299) wifi: Init dynamic rx buffer num: 16 I (1299) wifi: wifi power manager task: 0x3ffdfe24 prio: 21 stack: 2560 I (2019) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 0 I (2019) wifi: mode : softAP (30:ae:a4:37:25:89) I (2029) housekeeping: Auto init modem (free: 113884 bytes) I (2029) housekeeping: Auto init vehicle (free: 113300 bytes) I (2029) esp32wifi: AP started with SSID: OVMS, MAC: 30:ae:a4:37:25:89, IP: 192.168.4.1 I (2029) webserver: Launching Web Server I (2039) v-twizy: Renault Twizy vehicle module I (2049) v-twizy: battmon subsystem init I (2059) v-twizy: pwrmon subsystem init I (2059) v-twizy: charge subsystem init I (2059) canopen: Worker started on can1 I (2059) telnet: Launching Telnet Server I (2059) v-twizy: sevcon subsystem init I (2069) simcom: State: Enter PoweringOn state I (2069) simcom: Power Cycle I (2069) simcom: State: Enter PoweredOn state I (3069) gsm-nmea: Startup I (3079) housekeeping: Auto init server v2 (free: 71748 bytes) I (3079) ovms-server-v2: OVMS Server V2 registered metric modifier is #2 I (3079) ovms-server-v2: Status: Starting I (3089) ovms-server-v2: OVMS Server v2 running I (3089) housekeeping: Auto init server v3 (free: 67436 bytes) I (3099) housekeeping: Auto init done (free: 67436 bytes) I (3099) housekeeping: Starting USB console... I (3109) uart: queue free spaces: 30 I (3109) ovms-mdns: Starting MDNS Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console I (3149) version: Set version I (12139) simcom: State timeout, transition to 2 I (12139) simcom: State: Enter PoweringOn state I (12139) simcom: Power Cycle I (13149) housekeeping: System considered stable (free: 46388 bytes) I (18139) simcom: State: Enter PoweredOn state OVMS> enable dee4shi! Secure mode I (38159) simcom: State: Enter MuxStart state I (38159) gsm-mux: Start MUX I (38169) gsm-mux: Channel #0 is open I (38179) gsm-mux: Channel #1 is open I (38179) gsm-mux: Channel #2 is open I (38189) gsm-mux: Channel #3 is open I (38199) gsm-mux: Channel #4 is open I (39139) simcom: State: Enter NetWait state I (39139) gsm-nmea: Startup OVMS# mo m Free 8-bit 38380/283224, 32-bit 27544/55820, SPIRAM 0/0 --Task-- Total DRAM D/IRAM IRAM SPIRAM +/- DRAM D/IRAM IRAM SPIRAM no task 5312 0 0 0 +5312 +0 +0 +0 esp_timer 50120 0 644 0 +50120 +0 +644 +0 main 24624 0 0 0 +24624 +0 +0 +0 ipc0 10848 0 0 0 +10848 +0 +0 +0 Housekeeping 35976 61772 0 0 +35976 +61772 +0 +0 tiT 128 1016 0 0 +128 +1016 +0 +0 ipc1 12 0 0 0 +12 +0 +0 +0 NetManTask 16 692 0 0 +16 +692 +0 +0 wifi 32 3392 0 0 +32 +3392 +0 +0 eventTask 0 7532 0 0 +0 +7532 +0 +0 SIMCOMTask 0 4400 0 0 +0 +4400 +0 +0 Tmr Svc 0 2136 0 0 +0 +2136 +0 +0 AsyncConsole 0 20 27488 0 +0 +20 +27488 +0 I (49159) simcom: CREG Network Registration: RegisteredRoaming OVMS# wifi status WiFi Power: on Mode: Access-Point mode AP SSID: OVMS MAC: 30:ae:a4:37:25:89 IP: 192.168.4.1 AP Stations: 0 I (50139) simcom: State: Enter NetStart state I (51169) simcom: PPP Connection is ready to start I (52139) simcom: State: Enter NetMode state I (52139) gsm-ppp: Initialising... I (54569) gsm-ppp: StatusCallBack: None I (54569) gsm-ppp: status_cb: Connected I (54569) gsm-ppp: our_ipaddr = 10.170.195.13 I (54569) gsm-ppp: his_ipaddr = 10.64.64.64 I (54569) gsm-ppp: netmask = 255.255.255.255 I (54569) gsm-ppp: our6_ipaddr = :: I (54569) netmanager: Set DNS#0 8.8.8.8 I (54569) netmanager: Set DNS#1 8.8.4.4 I (54579) netmanager: Interface priority is pp2 (10.170.195.13/255.255.255.255 gateway 10.64.64.64) I (54579) time: Starting SNTP client I (54579) ovms-server-v2: Network is up, so attempt network connection I (54579) ovms-server-v2: Connection is ovms.dexters-web.de:6867 test1/aeL1aN9j I (54579) ovms-server-v2: Status: Connecting... OVMS# server v2 status Connecting... OVMS# network status Interface#2: pp2 (ifup=1 linkup=1) IPv4: 10.170.195.13/255.255.255.255 gateway 10.64.64.64 Interface#1: ap1 (ifup=1 linkup=1) IPv4: 192.168.4.1/255.255.255.0 gateway 192.168.4.1 Interface#0: lo0 (ifup=1 linkup=1) IPv4: 127.0.0.1/255.0.0.0 gateway 127.0.0.1 DNS: 8.8.8.8 8.8.4.4 Default Interface: pp2 (10.170.195.13/255.255.255.255 gateway 10.64.64.64) OVMS# mo m CORRUPT HEAP: Bad head at 0x3ffcccf0. Expected 0xabba1234 got 0xab003335 assertion "head != NULL" failed: file "/home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c", line 272, function: multi_heap_get_allocated_size abort() was called at PC 0x400f82af on core 1 0x400f82af: __assert_func at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8) Backtrace: 0x4008f698:0x3fff2c60 0x4008f83b:0x3fff2c80 0x400f82af:0x3fff2ca0 0x4008f39f:0x3fff2cd0 0x40197139:0x3fff2cf0 0x400e7125:0x3fff2d30 0x400e77c7:0x3fff2d50 0x400ed17a:0x3fff2de0 0x400ed271:0x3fff2e10 0x400ed263:0x3fff2e40 0x400ed299:0x3fff2e70 0x400e3074:0x3fff2e90 0x400f0791:0x3fff2eb0 0x400f07f8:0x3fff2f10 0x400e30a3:0x3fff2f50 0x401ca06b:0x3fff2f70 0x400e36b5:0x3fff2f90 0x400e8005:0x3fff2fc0 0x400e81f1:0x3fff2ff0 0x400e3561:0x3fff3010 0x400e3570:0x3fff3030 0x400e6c31:0x3fff3050 0x4008f698: invoke_abort at /home/balzer/esp/esp-idf/components/esp32/./panic.c:648 0x4008f83b: abort at /home/balzer/esp/esp-idf/components/esp32/./panic.c:648 0x400f82af: __assert_func at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8) 0x4008f39f: multi_heap_get_allocated_size at /home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c:326 0x40197139: heap_caps_get_per_task_info at /home/balzer/esp/esp-idf/components/heap/./heap_task_info.c:78 0x400e7125: get_memory(void**, unsigned int) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:751 0x400e77c7: module_memory(int, OvmsWriter*, OvmsCommand*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:751 0x400ed17a: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94 0x400ed271: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94 0x400ed263: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94 0x400ed299: OvmsCommandApp::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94 0x400e3074: Execute(microrl*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:47 0x400f0791: new_line_handler at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:620 0x400f07f8: microrl_insert_char at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:668 0x400e30a3: OvmsShell::ProcessChar(char) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:70 0x401ca06b: OvmsShell::ProcessChars(char const*, int) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:77 (discriminator 2) 0x400e36b5: ConsoleAsync::HandleDeviceEvent(void*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:169 0x400e8005: OvmsConsole::Poll(unsigned int, void*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:150 0x400e81f1: OvmsConsole::Service() at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:130 (discriminator 1) 0x400e3561: ConsoleAsync::Service() at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:80 0x400e3570: non-virtual thunk to ConsoleAsync::Service() at ??:? 0x400e6c31: TaskBase::Task(void*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./task_base.cpp:156 Entering gdb stub now. $T0b#e6GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 7.10 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-build_pc-linux-gnu --target=xtensa-esp32-elf". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/build/ovms3.elf...done. Remote debugging using /dev/ttyUSB0 0x4008f698 in invoke_abort () at /home/balzer/esp/esp-idf/components/esp32/./panic.c:139 139 *((int *) 0) = 0; (gdb) bt #0 0x4008f698 in invoke_abort () at /home/balzer/esp/esp-idf/components/esp32/./panic.c:139 #1 0x4008f83e in abort () at /home/balzer/esp/esp-idf/components/esp32/./panic.c:148 #2 0x400f82b2 in __assert_func (file=0x3ffb3720 "/home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c", line=272, func=<optimized out>, failedexpr=0x3ffb3710 "head != NULL") at ../../../.././newlib/libc/stdlib/assert.c:63 #3 0x4008f3a2 in multi_heap_get_allocated_size (heap=0x3ffbbe88, p=0x3ffcccfc) at /home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c:272 #4 0x4019713c in heap_caps_get_per_task_info (params=0x40098af4) at /home/balzer/esp/esp-idf/components/heap/./heap_task_info.c:78 #5 0x400e7128 in get_memory (tasks=0x40098ab8, taskslen=0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:500 #6 0x400e77ca in module_memory (verbosity=<optimized out>, writer=<optimized out>, cmd=<optimized out>, argc=<optimized out>, argv=<optimized out>) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:550 #7 0x400ed17d in OvmsCommand::Execute (this=0x3ffc6a44, verbosity=65535, writer=0x3ffef9e4, argc=0, argv=0x0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:281 #8 0x400ed274 in OvmsCommand::Execute (this=0x3ffc69b0, verbosity=65535, writer=0x3ffef9e4, argc=1, argv=0x3fff2eb4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:326 #9 0x400ed266 in OvmsCommand::Execute (this=0x3ffb413c <MyCommandApp+4>, verbosity=65535, writer=0x3ffef9e4, argc=2, argv=0x3fff2eb4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:322 #10 0x400ed29c in OvmsCommandApp::Execute (this=0x3ffb4138 <MyCommandApp>, verbosity=65535, writer=0x3ffef9e4, argc=2, argv=0x3fff2eb0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:648 #11 0x400e3077 in Execute (rl=0x3ffef9f8, argc=2, argv=0x3fff2eb0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:47 #12 0x400f0794 in new_line_handler (pThis=0x3ffef9f8) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:620 #13 0x400f07fb in microrl_insert_char (pThis=0x3ffef9f8, ch=10) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:668 #14 0x400e30a6 in OvmsShell::ProcessChar (this=0x3ffef9e4, c=<optimized out>) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:70 #15 0x401ca06e in OvmsShell::ProcessChars (this=0x3ffef9e4, buf=0x3fff01a5 "a ", '\376' <repeats 198 times>..., len=1) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:77 #16 0x400e36b8 in ConsoleAsync::HandleDeviceEvent (this=0x3ffef9e4, pEvent=<optimized out>) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:169 #17 0x400e8008 in OvmsConsole::Poll (this=0x3ffef9e4, ticks=4294967295, queue=0x3fff0918) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:150 #18 0x400e81f4 in OvmsConsole::Service (this=0x3ffef9e4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:130 #19 0x400e3564 in ConsoleAsync::Service (this=0x3ffef9e4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:80 #20 0x400e3573 in non-virtual thunk to ConsoleAsync::Service() () #21 0x400e6c34 in TaskBase::Task (object=0x3fff0190) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./task_base.cpp:156 (gdb) Am 19.03.2018 um 15:34 schrieb Mark Webb-Johnson:
And MDNS is back.
I looked through the source code and found a mdns_handle_system_event() call that is used to pass all the system events through to MDNS. That then dynamically adds/removed wifi STA and AP interfaces as they come up/down. No need to init and free the mdns system the whole time. Went back to the documentation, and found it right at the bottom… Good grief.
Anyway, I migrated the code to use that. Now, MDNS starts at boot time and stays up all the time. Seems reliable to me, so I committed it.
Regards, Mark
On 19 Mar 2018, at 12:57 PM, Mark Webb-Johnson <mark@webb-johnson.net <mailto:mark@webb-johnson.net>> wrote:
There seems to be something going on internally in lwip regarding this. It is such a dumb implementation anyway, with a separate task and static initialisation of the interface list at the time of startup; really not ideal for a dynamically changing environment. It would be much more sensible to just have a timer and every N seconds iterate through the current interface list to send out MDNS broadcasts on each active one that is suitable for MDNS (wifi only, really).
I think safest for the moment to just disable MDNS. I’ve done that now, and it is running live. That seems to be pretty good for me. Can you see if that works better for you?
I’m still seeing some issues with ssh/telnet startup that I’m looking at now.
Given where we are, I’m going to tell China that we need another 48 hours to confirm the firmware, before I send to them. That buys us some time to get this as stable as we can.
Regards, Mark.
On 19 Mar 2018, at 12:27 PM, Greg D. <gregd2350@gmail.com <mailto:gregd2350@gmail.com>> wrote:
Stephen Casner wrote:
Greg, the async console is a separate task that should be able to look at some things as long as they don't depend upon the networking tasks or objects. Is it hung also?
Async console? So, not USB. Don't have a connection for that.
So, tried it again... Note that the wifi connection gets dropped in the middle, but I didn't turn off the hotspot!
Network status, however, says that it's still connected. That's wrong.
Stop the server, then start, and this time instead of a hang I get a crash.
Greg
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console OVMS> OVMS> OVMS> I (4185) wifi: n:1 1, o:1 0, ap:1 1, sta:1 0, prof:1 I (4835) wifi: state: init -> auth (b0) I (4845) wifi: state: auth -> assoc (0) I (4855) wifi: state: assoc -> run (10) I (4875) wifi: connected with gregnet3, channel 1 I (4985) simcom: State: Enter PoweredOn state I (5915) event: sta ip: 192.168.43.49, mask: 255.255.255.0, gw: 192.168.43.1 I (5915) netmanager: Set DNS#0 9.9.9.9 I (5915) netmanager: Set DNS#1 8.8.8.8 I (5915) netmanager: Interface priority is st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) I (5915) time: Starting SNTP client I (5925) ovms-server-v2: Network is up, so attempt network connection I (5925) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (5925) ovms-server-v2: Status: Connecting... I (5935) ovms-mdns: Stopped MDNS service I (5935) ovms-mdns: Started MDNS service I (5955) esp32wifi: WiFi UP with SSID: gregnet3, MAC: 30:ae:a4:37:1b:64, IP: 192.168.43.49, mask: 255.255.255.0, gw: 192.168.43.1 I (6395) ovms-server-v2: Connection successful I (6395) ovms-server-v2: Status: Logging in... I (6395) ovms-server-v2: Sending server login: MP-C 0 gDAm8Tas7ISVuhmQ8zGDfh hygW8au7zuXDV5qkWYvMIA== ROADSTER_834 I (6635) ovms-server-v2: Got server response: MP-S 0 ubeiHXgCpUtGX1f6XRXlQK BB2JuaR9oc8TL6Ame7qkEg== I (6645) ovms-server-v2: Server token is ubeiHXgCpUtGX1f6XRXlQK and digest is BB2JuaR9oc8TL6Ame7qkEg== I (6645) ovms-server-v2: Status: Server auth ok. Now priming crypto. I (6645) ovms-server-v2: Shared secret key is ubeiHXgCpUtGX1f6XRXlQKgDAm8Tas7ISVuhmQ8zGDfh (44 bytes) I (6645) ovms-server-v2: Status: OVMS V2 login successful, and crypto channel established I (6655) ovms-server-v2: Incoming Msg: MP-0 Z0 I (7445) ovms-server-v2: Send MP-0 S0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (7445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,7,0,0,0,0,0.269231,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,0,1,TR,gregnet3 I (12625) housekeeping: System considered stable (free: 37872 bytes) I (22225) ovms-server-v2: Incoming Msg: MP-0 Z1 I (22225) ovms-server-v2: One or more peers have connected I (22445) ovms-server-v2: Send MP-0 S0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (22445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,22,0,0,0,0,0.351648,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,9,1,TR,gregnet3 I (24475) simcom: State: Enter MuxStart state I (24475) gsm-mux: Start MUX I (24485) gsm-mux: Channel #0 is open I (24495) gsm-mux: Channel #1 is open I (24505) gsm-mux: Channel #2 is open I (24515) gsm-mux: Channel #3 is open I (24525) gsm-mux: Channel #4 is open I (25445) simcom: State: Enter NetWait state I (25745) ovms-server-v2: Incoming Msg: MP-0 Z0 OVMS> metric set v.b.soc 44 Metric set I (35485) simcom: CREG Network Registration: RegisteredRoaming I (36445) simcom: State: Enter NetStart state I (37585) simcom: PPP Connection is ready to start I (38445) simcom: State: Enter NetMode state I (38445) gsm-ppp: Initialising... I (40145) ovms-server-v2: Incoming Msg: MP-0 Z1 I (40145) ovms-server-v2: One or more peers have connected I (40445) ovms-server-v2: Send MP-0 S44.0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (40445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,40,0,0,0,0,0.28022,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,9,1,TR,T-Mobile Hologram E (40645) ovms-server-v2: Status: Error: Disconnected from OVMS Server V2 I (41895) gsm-ppp: StatusCallBack: None I (41895) gsm-ppp: status_cb: Connected I (41895) gsm-ppp: our_ipaddr = 10.170.146.142 I (41895) gsm-ppp: his_ipaddr = 10.64.64.64 I (41895) gsm-ppp: netmask = 255.255.255.255 I (41895) gsm-ppp: our6_ipaddr = :: I (41895) netmanager: Set DNS#0 9.9.9.9 I (41895) netmanager: Set DNS#1 8.8.8.8 I (41895) netmanager: Interface priority is st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) I (41895) time: Starting SNTP client I (41895) ovms-server-v2: Network is up, so attempt network connection I (41895) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (41895) ovms-server-v2: Status: Connecting... I (60445) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (60445) ovms-server-v2: Status: Connecting... I (62565) wifi: bcn_timout,ap_probe_send_start I (65065) wifi: ap_probe_send over, resett wifi status to disassoc I (65065) wifi: state: run -> init (1) I (65065) wifi: n:1 0, o:1 1, ap:1 1, sta:1 0, prof:1 OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> server v2 status Connecting... OVMS> network Interface#3: pp3 (ifup=1 linkup=1) IPv4: 10.170.146.142/255.255.255.255 <http://10.170.146.142/255.255.255.255> gateway 10.64.64.64
Interface#2: ap2 (ifup=1 linkup=1) IPv4: 192.168.4.1/255.255.255.0 <http://192.168.4.1/255.255.255.0> gateway 192.168.4.1
Interface#1: st1 (ifup=1 linkup=1) IPv4: 192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1
Interface#0: lo0 (ifup=1 linkup=1) IPv4: 127.0.0.1/255.0.0.0 <http://127.0.0.1/255.0.0.0> gateway 127.0.0.1
DNS: 9.9.9.9 8.8.8.8
Default Interface: st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) OVMS> simcom SIMCOM Network Registration: RegisteredRoaming State: NetMode Ticker: 22 User Data: 0
Mux Status: up Open Channels: 4 Framing Errors: 0 Last RX frame: 19 sec(s) ago RX frames: 18 TX frames: 18
PPP Connected on channel: #2 Last Error: None
GPS Status: disabled Time: disabled NMEA: GPS/GLONASS Not Connected OVMS> wifi WiFi Power: on Mode: Access-Point + Client mode
STA SSID: gregnet3 MAC: 30:ae:a4:37:1b:64 IP: 192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> GW: 192.168.43.1
AP SSID: ovms MAC: 30:ae:a4:37:1b:65 IP: 192.168.4.1 AP Stations: 0 OVMS> server v2 stop Stopping OVMS Server V2 connection (oscv2) OVMS> server v2 status OVMS v2 server has not been started OVMS> server v2 start Launching OVMS Server V2 connection (oscv2) Guru Meditation Error: Core 1 panic'ed (LoadProhibited) . Exception was unhandled. Core 1 register dump: PC : 0x400ee17d PS : 0x00060630 A0 : 0x800ef642 A1 : 0x3fff5020 A2 : 0xffffffff A3 : 0x3fff2540 A4 : 0x00000000 A5 : 0x3fff5100 A6 : 0x3fff50e0 A7 : 0x0000000c A8 : 0x800ee179 A9 : 0x3fff4ff0 A10 : 0xffffffff A11 : 0x3f411528 A12 : 0x3fff5100 A13 : 0x3fff50e0 A14 : 0x0000000c A15 : 0x3fff1ea4 SAR : 0x00000004 EXCCAUSE: 0x0000001c EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff
Backtrace: 0x400ee17d:0x3fff5020 0x400ef63f:0x3fff5060 0x400f04c5:0x3fff50a0 0x40082c71:0x3fff50d0 0x40115696:0x3fff5120 0x401161ef:0x3fff5140 0x40116a7d:0x3fff5330 0x40116aa5:0x3fff5960 0x400eeeb2:0x3fff5980 0x400eefa9:0x3fff59b0 0x400eef9b:0x3fff59e0 0x400eef9b:0x3fff5a10 0x400eefd1:0x3fff5a40 0x400e534c:0x3fff5a60 0x400f1809:0x3fff5a80 0x400f1870:0x3fff5ae0 0x400e537b:0x3fff5b20 0x401eb64f:0x3fff5b40 0x400f0575:0x3fff5b60 0x400ebf8d:0x3fff5b90 0x400ec179:0x3fff5bc0 0x400f0421:0x3fff5be0 0x400f0430:0x3fff5c00 0x400e3295:0x3fff5c20
Rebooting... ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT) configsip: 156795334, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:4560 ho 0 tail 12 room 4 load:0x40078000,len:0 load:0x40078000,len:13176 entry 0x40078d38 I (647) cpu_start: Pro cpu up. I (647) cpu_start: Starting app cpu, entry point is 0x40081300 I (632) cpu_start: App cpu up. I (651) heap_init: Initializing. RAM available for dynamic allocation: I (657) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (664) heap_init: At 3FFBBAC0 len 00024540 (145 KiB): DRAM I (670) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM I (676) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (684) heap_init: At 40091FDC len 0000E024 (56 KiB): IRAM I (689) cpu_start: Pro cpu start user code I (35) ovms_main: Set default logging level for * to INFO I (35) command: Initialising COMMAND (1000) I (36) boot: Initialising BOOT (1100) I (40) boot: Boot #1 reasons for CPU0=12 and CPU1=12 E (46) boot: Crash #1 detected I (49) events: Initialising EVENTS (1200) I (54) config: Initialising CONFIG (1400) I (59) time: Initialising TIME (1500) I (64) script: Initialising SCRIPTS (1600) I (68) script: Using DUKTAPE javascript engine I (74) metrics: Initialising METRICS (1810) I (78) metrics: OvmsMetric is 28 bytes I (82) metrics: OvmsMetricBool is 32 bytes I (87) metrics: Expanding DUKTAPE javascript engine I (97) notify: Initialising NOTIFICATIONS (1820) I (99) notify: Registered notification type info I (103) notify: Registered notification type error I (109) notify: Registered notification type alert I (114) notify: Registered notification type data I (120) location: Initialising LOCATIONS (1900) I (126) location: Expanding DUKTAPE javascript engine I (131) vehicle: Initialising VEHICLE Factory (2000) I (137) pcp: Initialising POWER (4000) I (141) max7317: Initialising MAX7317 EGPIO (4200) I (146) sdcard: Initialising SD CARD (4400) I (151) ota: Initialising OTA (4400) I (156) can: Initialising CAN (4500) I (161) simcom: Initialising SIMCOM (4600) I (165) test: Initialising TEST (5000) I (169) ovms-module: Initialising MODULE (5100) I (174) vfs: Initialising VFS (5200) I (179) ovms-server: Initialising OVMS Server (6000) I (184) ovms-server-v2: Initialising OVMS V2 Server (6100) I (190) ovms-server-v3: Initialising OVMS V3 Server (6200) I (196) obd2ecu: Initialising OBD2ECU (7000) I (202) canopen: Initialising CANopen (7000) I (207) esp32wifi: Initialising ESP32WIFI (8000) I (212) ovms-mdns: Initialising MDNS (8100) I (217) webserver: Initialising WEBSERVER (8200) I (223) telnet: Initialising Telnet (8300) I (227) ssh: Initialising SSH (8300) I (231) re: Initialising RE Tools (8800) I (236) netmanager: Initialising NETMANAGER (8999) I (242) v-track: Registering Vehicle: TRACK (9000) I (246) v-teslaroadster: Registering Vehicle: Tesla Roadster (9000) I (253) v-teslamodels: Registering Vehicle: Tesla Model S (9000) I (260) v-obdii: Registering Vehicle: OBDII (9000) I (265) v-none: Registering Vehicle: NONE (9000) I (271) v-demo: Registering Vehicle: DEMO (9000) I (276) version: Initialising Versioning (9900) I (285) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (331) ovms_main: Executing on CPU core 0 I (331) ovms_main: Mounting CONFIG... W (381) webserver: UpdateGlobalAuthFile: no password set => no auth for web console I (391) ovms_main: Registering default configs... I (391) ovms_main: Starting HOUSEKEEPING... I (391) housekeeping: Initialising HOUSEKEEPING Framework... I (451) housekeeping: Executing on CPU core 1 I (451) housekeeping: reset_reason: cpu0=12, cpu1=12 I (451) housekeeping: Starting PERIPHERALS... I (461) peripherals: Initialising OVMS Peripherals... I (461) peripherals: TCP/IP Adaptor I (471) peripherals: ESP32 system I (471) peripherals: SPI bus I (471) peripherals: MAX7317 I/O Expander I (481) peripherals: ESP32 CAN I (481) peripherals: ESP32 WIFI I (491) peripherals: ESP32 BLUETOOTH I (491) peripherals: ESP32 ADC I (491) peripherals: MCP2515 CAN 1/2 I (511) peripherals: MCP2515 CAN 2/2 I (521) peripherals: SD CARD I (521) peripherals: SIMCOM MODEM I (521) gpio: GPIO[16]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (531) gpio: GPIO[17]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (541) uart: queue free spaces: 10 I (541) ext12v: Powering off external 12V devices I (551) housekeeping: Auto init ext12v (free: 112436 bytes) I (551) ext12v: Powering on external 12V devices I (561) housekeeping: Auto init wifi (free: 112436 bytes) I (561) wifi: wifi firmware version: ebd3e5d I (571) wifi: config NVS flash: enabled I (571) wifi: config nano formating: disabled I (571) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (581) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (601) wifi: Init dynamic tx buffer num: 16 I (601) wifi: Init data frame dynamic rx buffer num: 16 I (601) wifi: Init management frame dynamic rx buffer num: 16 I (601) wifi: wifi driver task: 3ffe61dc, prio:23, stack:4096 I (611) wifi: Init static rx buffer num: 4 I (611) wifi: Init dynamic rx buffer num: 16 I (611) wifi: wifi power manager task: 0x3ffe8974 prio: 21 stack: 2560 I (1331) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 0 I (1331) wifi: mode : sta (30:ae:a4:37:1b:64) + softAP (30:ae:a4:37:1b:65) I (1341) housekeeping: Auto init modem (free: 90292 bytes) I (1351) simcom: State: Enter PoweringOn state I (1351) simcom: Power Cycle I (1351) ovms-mdns: Started MDNS service I (1381) webserver: Launching Web Server I (1381) esp32wifi: AP started with SSID: ovms, MAC: 30:ae:a4:37:1b:65, IP: 192.168.4.1 I (1461) simcom: State: Enter PoweredOn state I (2351) housekeeping: Auto init vehicle (free: 75064 bytes) I (2351) v-teslaroadster: Tesla Roadster v1.x, v2.x and v3.0 vehicle module I (2361) housekeeping: Auto init obd2ecu (free: 69332 bytes) I (2561) housekeeping: Auto init server v2 (free: 60676 bytes) I (2561) ovms-server-v2: OVMS Server V2 registered metric modifier is #1 I (2571) ovms-server-v2: Status: Starting I (2571) ovms-server-v2: OVMS Server v2 running I (2581) housekeeping: Auto init server v3 (free: 56364 bytes) I (2581) housekeeping: Auto init done (free: 56364 bytes) I (2591) housekeeping: Starting USB console... I (2591) uart: queue free spaces: 30 I (2601) version: Set version
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
Disabled mDNS again, "module memory" again working without crashes. Wifi modes client and apclient working again, but mode ap still with the effect of a broken network after ppp init. Server v2 does not connect, and "ota flash http …" just hangs. Am 19.03.2018 um 17:49 schrieb Michael Balzer:
Just pulled the latest version, reenabled mDNS.
Server v2 again does not connect, and the module crashes immediately on "module memory" (related?):
I (1239) housekeeping: Auto init wifi (free: 134556 bytes) I (1249) wifi: wifi firmware version: ebd3e5d I (1249) wifi: config NVS flash: enabled I (1259) wifi: config nano formating: disabled I (1259) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1269) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1279) wifi: Init dynamic tx buffer num: 16 I (1279) wifi: Init data frame dynamic rx buffer num: 16 I (1279) wifi: Init management frame dynamic rx buffer num: 16 I (1289) wifi: wifi driver task: 3ffdf3a8, prio:23, stack:4096 I (1289) wifi: Init static rx buffer num: 4 I (1299) wifi: Init dynamic rx buffer num: 16 I (1299) wifi: wifi power manager task: 0x3ffdfe24 prio: 21 stack: 2560 I (2019) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 0 I (2019) wifi: mode : softAP (30:ae:a4:37:25:89) I (2029) housekeeping: Auto init modem (free: 113884 bytes) I (2029) housekeeping: Auto init vehicle (free: 113300 bytes) I (2029) esp32wifi: AP started with SSID: OVMS, MAC: 30:ae:a4:37:25:89, IP: 192.168.4.1 I (2029) webserver: Launching Web Server I (2039) v-twizy: Renault Twizy vehicle module I (2049) v-twizy: battmon subsystem init I (2059) v-twizy: pwrmon subsystem init I (2059) v-twizy: charge subsystem init I (2059) canopen: Worker started on can1 I (2059) telnet: Launching Telnet Server I (2059) v-twizy: sevcon subsystem init I (2069) simcom: State: Enter PoweringOn state I (2069) simcom: Power Cycle I (2069) simcom: State: Enter PoweredOn state I (3069) gsm-nmea: Startup I (3079) housekeeping: Auto init server v2 (free: 71748 bytes) I (3079) ovms-server-v2: OVMS Server V2 registered metric modifier is #2 I (3079) ovms-server-v2: Status: Starting I (3089) ovms-server-v2: OVMS Server v2 running I (3089) housekeeping: Auto init server v3 (free: 67436 bytes) I (3099) housekeeping: Auto init done (free: 67436 bytes) I (3099) housekeeping: Starting USB console... I (3109) uart: queue free spaces: 30 I (3109) ovms-mdns: Starting MDNS
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console I (3149) version: Set version I (12139) simcom: State timeout, transition to 2 I (12139) simcom: State: Enter PoweringOn state I (12139) simcom: Power Cycle I (13149) housekeeping: System considered stable (free: 46388 bytes) I (18139) simcom: State: Enter PoweredOn state OVMS> enable dee4shi! Secure mode I (38159) simcom: State: Enter MuxStart state I (38159) gsm-mux: Start MUX I (38169) gsm-mux: Channel #0 is open I (38179) gsm-mux: Channel #1 is open I (38179) gsm-mux: Channel #2 is open I (38189) gsm-mux: Channel #3 is open I (38199) gsm-mux: Channel #4 is open I (39139) simcom: State: Enter NetWait state I (39139) gsm-nmea: Startup OVMS# mo m Free 8-bit 38380/283224, 32-bit 27544/55820, SPIRAM 0/0 --Task-- Total DRAM D/IRAM IRAM SPIRAM +/- DRAM D/IRAM IRAM SPIRAM no task 5312 0 0 0 +5312 +0 +0 +0 esp_timer 50120 0 644 0 +50120 +0 +644 +0 main 24624 0 0 0 +24624 +0 +0 +0 ipc0 10848 0 0 0 +10848 +0 +0 +0 Housekeeping 35976 61772 0 0 +35976 +61772 +0 +0 tiT 128 1016 0 0 +128 +1016 +0 +0 ipc1 12 0 0 0 +12 +0 +0 +0 NetManTask 16 692 0 0 +16 +692 +0 +0 wifi 32 3392 0 0 +32 +3392 +0 +0 eventTask 0 7532 0 0 +0 +7532 +0 +0 SIMCOMTask 0 4400 0 0 +0 +4400 +0 +0 Tmr Svc 0 2136 0 0 +0 +2136 +0 +0 AsyncConsole 0 20 27488 0 +0 +20 +27488 +0 I (49159) simcom: CREG Network Registration: RegisteredRoaming OVMS# wifi status WiFi Power: on Mode: Access-Point mode
AP SSID: OVMS MAC: 30:ae:a4:37:25:89 IP: 192.168.4.1 AP Stations: 0 I (50139) simcom: State: Enter NetStart state I (51169) simcom: PPP Connection is ready to start I (52139) simcom: State: Enter NetMode state I (52139) gsm-ppp: Initialising... I (54569) gsm-ppp: StatusCallBack: None I (54569) gsm-ppp: status_cb: Connected I (54569) gsm-ppp: our_ipaddr = 10.170.195.13 I (54569) gsm-ppp: his_ipaddr = 10.64.64.64 I (54569) gsm-ppp: netmask = 255.255.255.255 I (54569) gsm-ppp: our6_ipaddr = :: I (54569) netmanager: Set DNS#0 8.8.8.8 I (54569) netmanager: Set DNS#1 8.8.4.4 I (54579) netmanager: Interface priority is pp2 (10.170.195.13/255.255.255.255 gateway 10.64.64.64) I (54579) time: Starting SNTP client I (54579) ovms-server-v2: Network is up, so attempt network connection I (54579) ovms-server-v2: Connection is ovms.dexters-web.de:6867 test1/aeL1aN9j I (54579) ovms-server-v2: Status: Connecting... OVMS# server v2 status Connecting... OVMS# network status Interface#2: pp2 (ifup=1 linkup=1) IPv4: 10.170.195.13/255.255.255.255 gateway 10.64.64.64
Interface#1: ap1 (ifup=1 linkup=1) IPv4: 192.168.4.1/255.255.255.0 gateway 192.168.4.1
Interface#0: lo0 (ifup=1 linkup=1) IPv4: 127.0.0.1/255.0.0.0 gateway 127.0.0.1
DNS: 8.8.8.8 8.8.4.4
Default Interface: pp2 (10.170.195.13/255.255.255.255 gateway 10.64.64.64) OVMS# mo m CORRUPT HEAP: Bad head at 0x3ffcccf0. Expected 0xabba1234 got 0xab003335 assertion "head != NULL" failed: file "/home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c", line 272, function: multi_heap_get_allocated_size abort() was called at PC 0x400f82af on core 1 0x400f82af: __assert_func at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8)
Backtrace: 0x4008f698:0x3fff2c60 0x4008f83b:0x3fff2c80 0x400f82af:0x3fff2ca0 0x4008f39f:0x3fff2cd0 0x40197139:0x3fff2cf0 0x400e7125:0x3fff2d30 0x400e77c7:0x3fff2d50 0x400ed17a:0x3fff2de0 0x400ed271:0x3fff2e10 0x400ed263:0x3fff2e40 0x400ed299:0x3fff2e70 0x400e3074:0x3fff2e90 0x400f0791:0x3fff2eb0 0x400f07f8:0x3fff2f10 0x400e30a3:0x3fff2f50 0x401ca06b:0x3fff2f70 0x400e36b5:0x3fff2f90 0x400e8005:0x3fff2fc0 0x400e81f1:0x3fff2ff0 0x400e3561:0x3fff3010 0x400e3570:0x3fff3030 0x400e6c31:0x3fff3050 0x4008f698: invoke_abort at /home/balzer/esp/esp-idf/components/esp32/./panic.c:648
0x4008f83b: abort at /home/balzer/esp/esp-idf/components/esp32/./panic.c:648
0x400f82af: __assert_func at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8)
0x4008f39f: multi_heap_get_allocated_size at /home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c:326
0x40197139: heap_caps_get_per_task_info at /home/balzer/esp/esp-idf/components/heap/./heap_task_info.c:78
0x400e7125: get_memory(void**, unsigned int) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:751
0x400e77c7: module_memory(int, OvmsWriter*, OvmsCommand*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:751
0x400ed17a: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94
0x400ed271: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94
0x400ed263: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94
0x400ed299: OvmsCommandApp::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94
0x400e3074: Execute(microrl*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:47
0x400f0791: new_line_handler at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:620
0x400f07f8: microrl_insert_char at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:668
0x400e30a3: OvmsShell::ProcessChar(char) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:70
0x401ca06b: OvmsShell::ProcessChars(char const*, int) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:77 (discriminator 2)
0x400e36b5: ConsoleAsync::HandleDeviceEvent(void*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:169
0x400e8005: OvmsConsole::Poll(unsigned int, void*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:150
0x400e81f1: OvmsConsole::Service() at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:130 (discriminator 1)
0x400e3561: ConsoleAsync::Service() at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:80
0x400e3570: non-virtual thunk to ConsoleAsync::Service() at ??:?
0x400e6c31: TaskBase::Task(void*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./task_base.cpp:156
Entering gdb stub now. $T0b#e6GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 7.10 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-build_pc-linux-gnu --target=xtensa-esp32-elf". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/build/ovms3.elf...done. Remote debugging using /dev/ttyUSB0 0x4008f698 in invoke_abort () at /home/balzer/esp/esp-idf/components/esp32/./panic.c:139 139 *((int *) 0) = 0; (gdb) bt #0 0x4008f698 in invoke_abort () at /home/balzer/esp/esp-idf/components/esp32/./panic.c:139 #1 0x4008f83e in abort () at /home/balzer/esp/esp-idf/components/esp32/./panic.c:148 #2 0x400f82b2 in __assert_func (file=0x3ffb3720 "/home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c", line=272, func=<optimized out>, failedexpr=0x3ffb3710 "head != NULL") at ../../../.././newlib/libc/stdlib/assert.c:63 #3 0x4008f3a2 in multi_heap_get_allocated_size (heap=0x3ffbbe88, p=0x3ffcccfc) at /home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c:272 #4 0x4019713c in heap_caps_get_per_task_info (params=0x40098af4) at /home/balzer/esp/esp-idf/components/heap/./heap_task_info.c:78 #5 0x400e7128 in get_memory (tasks=0x40098ab8, taskslen=0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:500 #6 0x400e77ca in module_memory (verbosity=<optimized out>, writer=<optimized out>, cmd=<optimized out>, argc=<optimized out>, argv=<optimized out>) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:550 #7 0x400ed17d in OvmsCommand::Execute (this=0x3ffc6a44, verbosity=65535, writer=0x3ffef9e4, argc=0, argv=0x0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:281 #8 0x400ed274 in OvmsCommand::Execute (this=0x3ffc69b0, verbosity=65535, writer=0x3ffef9e4, argc=1, argv=0x3fff2eb4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:326 #9 0x400ed266 in OvmsCommand::Execute (this=0x3ffb413c <MyCommandApp+4>, verbosity=65535, writer=0x3ffef9e4, argc=2, argv=0x3fff2eb4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:322 #10 0x400ed29c in OvmsCommandApp::Execute (this=0x3ffb4138 <MyCommandApp>, verbosity=65535, writer=0x3ffef9e4, argc=2, argv=0x3fff2eb0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:648 #11 0x400e3077 in Execute (rl=0x3ffef9f8, argc=2, argv=0x3fff2eb0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:47 #12 0x400f0794 in new_line_handler (pThis=0x3ffef9f8) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:620 #13 0x400f07fb in microrl_insert_char (pThis=0x3ffef9f8, ch=10) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:668 #14 0x400e30a6 in OvmsShell::ProcessChar (this=0x3ffef9e4, c=<optimized out>) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:70 #15 0x401ca06e in OvmsShell::ProcessChars (this=0x3ffef9e4, buf=0x3fff01a5 "a ", '\376' <repeats 198 times>..., len=1) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:77 #16 0x400e36b8 in ConsoleAsync::HandleDeviceEvent (this=0x3ffef9e4, pEvent=<optimized out>) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:169 #17 0x400e8008 in OvmsConsole::Poll (this=0x3ffef9e4, ticks=4294967295, queue=0x3fff0918) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:150 #18 0x400e81f4 in OvmsConsole::Service (this=0x3ffef9e4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:130 #19 0x400e3564 in ConsoleAsync::Service (this=0x3ffef9e4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:80 #20 0x400e3573 in non-virtual thunk to ConsoleAsync::Service() () #21 0x400e6c34 in TaskBase::Task (object=0x3fff0190) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./task_base.cpp:156 (gdb)
Am 19.03.2018 um 15:34 schrieb Mark Webb-Johnson:
And MDNS is back.
I looked through the source code and found a mdns_handle_system_event() call that is used to pass all the system events through to MDNS. That then dynamically adds/removed wifi STA and AP interfaces as they come up/down. No need to init and free the mdns system the whole time. Went back to the documentation, and found it right at the bottom… Good grief.
Anyway, I migrated the code to use that. Now, MDNS starts at boot time and stays up all the time. Seems reliable to me, so I committed it.
Regards, Mark
On 19 Mar 2018, at 12:57 PM, Mark Webb-Johnson <mark@webb-johnson.net <mailto:mark@webb-johnson.net>> wrote:
There seems to be something going on internally in lwip regarding this. It is such a dumb implementation anyway, with a separate task and static initialisation of the interface list at the time of startup; really not ideal for a dynamically changing environment. It would be much more sensible to just have a timer and every N seconds iterate through the current interface list to send out MDNS broadcasts on each active one that is suitable for MDNS (wifi only, really).
I think safest for the moment to just disable MDNS. I’ve done that now, and it is running live. That seems to be pretty good for me. Can you see if that works better for you?
I’m still seeing some issues with ssh/telnet startup that I’m looking at now.
Given where we are, I’m going to tell China that we need another 48 hours to confirm the firmware, before I send to them. That buys us some time to get this as stable as we can.
Regards, Mark.
On 19 Mar 2018, at 12:27 PM, Greg D. <gregd2350@gmail.com <mailto:gregd2350@gmail.com>> wrote:
Stephen Casner wrote:
Greg, the async console is a separate task that should be able to look at some things as long as they don't depend upon the networking tasks or objects. Is it hung also?
Async console? So, not USB. Don't have a connection for that.
So, tried it again... Note that the wifi connection gets dropped in the middle, but I didn't turn off the hotspot!
Network status, however, says that it's still connected. That's wrong.
Stop the server, then start, and this time instead of a hang I get a crash.
Greg
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console OVMS> OVMS> OVMS> I (4185) wifi: n:1 1, o:1 0, ap:1 1, sta:1 0, prof:1 I (4835) wifi: state: init -> auth (b0) I (4845) wifi: state: auth -> assoc (0) I (4855) wifi: state: assoc -> run (10) I (4875) wifi: connected with gregnet3, channel 1 I (4985) simcom: State: Enter PoweredOn state I (5915) event: sta ip: 192.168.43.49, mask: 255.255.255.0, gw: 192.168.43.1 I (5915) netmanager: Set DNS#0 9.9.9.9 I (5915) netmanager: Set DNS#1 8.8.8.8 I (5915) netmanager: Interface priority is st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) I (5915) time: Starting SNTP client I (5925) ovms-server-v2: Network is up, so attempt network connection I (5925) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (5925) ovms-server-v2: Status: Connecting... I (5935) ovms-mdns: Stopped MDNS service I (5935) ovms-mdns: Started MDNS service I (5955) esp32wifi: WiFi UP with SSID: gregnet3, MAC: 30:ae:a4:37:1b:64, IP: 192.168.43.49, mask: 255.255.255.0, gw: 192.168.43.1 I (6395) ovms-server-v2: Connection successful I (6395) ovms-server-v2: Status: Logging in... I (6395) ovms-server-v2: Sending server login: MP-C 0 gDAm8Tas7ISVuhmQ8zGDfh hygW8au7zuXDV5qkWYvMIA== ROADSTER_834 I (6635) ovms-server-v2: Got server response: MP-S 0 ubeiHXgCpUtGX1f6XRXlQK BB2JuaR9oc8TL6Ame7qkEg== I (6645) ovms-server-v2: Server token is ubeiHXgCpUtGX1f6XRXlQK and digest is BB2JuaR9oc8TL6Ame7qkEg== I (6645) ovms-server-v2: Status: Server auth ok. Now priming crypto. I (6645) ovms-server-v2: Shared secret key is ubeiHXgCpUtGX1f6XRXlQKgDAm8Tas7ISVuhmQ8zGDfh (44 bytes) I (6645) ovms-server-v2: Status: OVMS V2 login successful, and crypto channel established I (6655) ovms-server-v2: Incoming Msg: MP-0 Z0 I (7445) ovms-server-v2: Send MP-0 S0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (7445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,7,0,0,0,0,0.269231,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,0,1,TR,gregnet3 I (12625) housekeeping: System considered stable (free: 37872 bytes) I (22225) ovms-server-v2: Incoming Msg: MP-0 Z1 I (22225) ovms-server-v2: One or more peers have connected I (22445) ovms-server-v2: Send MP-0 S0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (22445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,22,0,0,0,0,0.351648,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,9,1,TR,gregnet3 I (24475) simcom: State: Enter MuxStart state I (24475) gsm-mux: Start MUX I (24485) gsm-mux: Channel #0 is open I (24495) gsm-mux: Channel #1 is open I (24505) gsm-mux: Channel #2 is open I (24515) gsm-mux: Channel #3 is open I (24525) gsm-mux: Channel #4 is open I (25445) simcom: State: Enter NetWait state I (25745) ovms-server-v2: Incoming Msg: MP-0 Z0 OVMS> metric set v.b.soc 44 Metric set I (35485) simcom: CREG Network Registration: RegisteredRoaming I (36445) simcom: State: Enter NetStart state I (37585) simcom: PPP Connection is ready to start I (38445) simcom: State: Enter NetMode state I (38445) gsm-ppp: Initialising... I (40145) ovms-server-v2: Incoming Msg: MP-0 Z1 I (40145) ovms-server-v2: One or more peers have connected I (40445) ovms-server-v2: Send MP-0 S44.0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (40445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,40,0,0,0,0,0.28022,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,9,1,TR,T-Mobile Hologram E (40645) ovms-server-v2: Status: Error: Disconnected from OVMS Server V2 I (41895) gsm-ppp: StatusCallBack: None I (41895) gsm-ppp: status_cb: Connected I (41895) gsm-ppp: our_ipaddr = 10.170.146.142 I (41895) gsm-ppp: his_ipaddr = 10.64.64.64 I (41895) gsm-ppp: netmask = 255.255.255.255 I (41895) gsm-ppp: our6_ipaddr = :: I (41895) netmanager: Set DNS#0 9.9.9.9 I (41895) netmanager: Set DNS#1 8.8.8.8 I (41895) netmanager: Interface priority is st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) I (41895) time: Starting SNTP client I (41895) ovms-server-v2: Network is up, so attempt network connection I (41895) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (41895) ovms-server-v2: Status: Connecting... I (60445) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (60445) ovms-server-v2: Status: Connecting... I (62565) wifi: bcn_timout,ap_probe_send_start I (65065) wifi: ap_probe_send over, resett wifi status to disassoc I (65065) wifi: state: run -> init (1) I (65065) wifi: n:1 0, o:1 1, ap:1 1, sta:1 0, prof:1 OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> server v2 status Connecting... OVMS> network Interface#3: pp3 (ifup=1 linkup=1) IPv4: 10.170.146.142/255.255.255.255 <http://10.170.146.142/255.255.255.255> gateway 10.64.64.64
Interface#2: ap2 (ifup=1 linkup=1) IPv4: 192.168.4.1/255.255.255.0 <http://192.168.4.1/255.255.255.0> gateway 192.168.4.1
Interface#1: st1 (ifup=1 linkup=1) IPv4: 192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1
Interface#0: lo0 (ifup=1 linkup=1) IPv4: 127.0.0.1/255.0.0.0 <http://127.0.0.1/255.0.0.0> gateway 127.0.0.1
DNS: 9.9.9.9 8.8.8.8
Default Interface: st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) OVMS> simcom SIMCOM Network Registration: RegisteredRoaming State: NetMode Ticker: 22 User Data: 0
Mux Status: up Open Channels: 4 Framing Errors: 0 Last RX frame: 19 sec(s) ago RX frames: 18 TX frames: 18
PPP Connected on channel: #2 Last Error: None
GPS Status: disabled Time: disabled NMEA: GPS/GLONASS Not Connected OVMS> wifi WiFi Power: on Mode: Access-Point + Client mode
STA SSID: gregnet3 MAC: 30:ae:a4:37:1b:64 IP: 192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> GW: 192.168.43.1
AP SSID: ovms MAC: 30:ae:a4:37:1b:65 IP: 192.168.4.1 AP Stations: 0 OVMS> server v2 stop Stopping OVMS Server V2 connection (oscv2) OVMS> server v2 status OVMS v2 server has not been started OVMS> server v2 start Launching OVMS Server V2 connection (oscv2) Guru Meditation Error: Core 1 panic'ed (LoadProhibited) . Exception was unhandled. Core 1 register dump: PC : 0x400ee17d PS : 0x00060630 A0 : 0x800ef642 A1 : 0x3fff5020 A2 : 0xffffffff A3 : 0x3fff2540 A4 : 0x00000000 A5 : 0x3fff5100 A6 : 0x3fff50e0 A7 : 0x0000000c A8 : 0x800ee179 A9 : 0x3fff4ff0 A10 : 0xffffffff A11 : 0x3f411528 A12 : 0x3fff5100 A13 : 0x3fff50e0 A14 : 0x0000000c A15 : 0x3fff1ea4 SAR : 0x00000004 EXCCAUSE: 0x0000001c EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff
Backtrace: 0x400ee17d:0x3fff5020 0x400ef63f:0x3fff5060 0x400f04c5:0x3fff50a0 0x40082c71:0x3fff50d0 0x40115696:0x3fff5120 0x401161ef:0x3fff5140 0x40116a7d:0x3fff5330 0x40116aa5:0x3fff5960 0x400eeeb2:0x3fff5980 0x400eefa9:0x3fff59b0 0x400eef9b:0x3fff59e0 0x400eef9b:0x3fff5a10 0x400eefd1:0x3fff5a40 0x400e534c:0x3fff5a60 0x400f1809:0x3fff5a80 0x400f1870:0x3fff5ae0 0x400e537b:0x3fff5b20 0x401eb64f:0x3fff5b40 0x400f0575:0x3fff5b60 0x400ebf8d:0x3fff5b90 0x400ec179:0x3fff5bc0 0x400f0421:0x3fff5be0 0x400f0430:0x3fff5c00 0x400e3295:0x3fff5c20
Rebooting... ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT) configsip: 156795334, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:4560 ho 0 tail 12 room 4 load:0x40078000,len:0 load:0x40078000,len:13176 entry 0x40078d38 I (647) cpu_start: Pro cpu up. I (647) cpu_start: Starting app cpu, entry point is 0x40081300 I (632) cpu_start: App cpu up. I (651) heap_init: Initializing. RAM available for dynamic allocation: I (657) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (664) heap_init: At 3FFBBAC0 len 00024540 (145 KiB): DRAM I (670) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM I (676) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (684) heap_init: At 40091FDC len 0000E024 (56 KiB): IRAM I (689) cpu_start: Pro cpu start user code I (35) ovms_main: Set default logging level for * to INFO I (35) command: Initialising COMMAND (1000) I (36) boot: Initialising BOOT (1100) I (40) boot: Boot #1 reasons for CPU0=12 and CPU1=12 E (46) boot: Crash #1 detected I (49) events: Initialising EVENTS (1200) I (54) config: Initialising CONFIG (1400) I (59) time: Initialising TIME (1500) I (64) script: Initialising SCRIPTS (1600) I (68) script: Using DUKTAPE javascript engine I (74) metrics: Initialising METRICS (1810) I (78) metrics: OvmsMetric is 28 bytes I (82) metrics: OvmsMetricBool is 32 bytes I (87) metrics: Expanding DUKTAPE javascript engine I (97) notify: Initialising NOTIFICATIONS (1820) I (99) notify: Registered notification type info I (103) notify: Registered notification type error I (109) notify: Registered notification type alert I (114) notify: Registered notification type data I (120) location: Initialising LOCATIONS (1900) I (126) location: Expanding DUKTAPE javascript engine I (131) vehicle: Initialising VEHICLE Factory (2000) I (137) pcp: Initialising POWER (4000) I (141) max7317: Initialising MAX7317 EGPIO (4200) I (146) sdcard: Initialising SD CARD (4400) I (151) ota: Initialising OTA (4400) I (156) can: Initialising CAN (4500) I (161) simcom: Initialising SIMCOM (4600) I (165) test: Initialising TEST (5000) I (169) ovms-module: Initialising MODULE (5100) I (174) vfs: Initialising VFS (5200) I (179) ovms-server: Initialising OVMS Server (6000) I (184) ovms-server-v2: Initialising OVMS V2 Server (6100) I (190) ovms-server-v3: Initialising OVMS V3 Server (6200) I (196) obd2ecu: Initialising OBD2ECU (7000) I (202) canopen: Initialising CANopen (7000) I (207) esp32wifi: Initialising ESP32WIFI (8000) I (212) ovms-mdns: Initialising MDNS (8100) I (217) webserver: Initialising WEBSERVER (8200) I (223) telnet: Initialising Telnet (8300) I (227) ssh: Initialising SSH (8300) I (231) re: Initialising RE Tools (8800) I (236) netmanager: Initialising NETMANAGER (8999) I (242) v-track: Registering Vehicle: TRACK (9000) I (246) v-teslaroadster: Registering Vehicle: Tesla Roadster (9000) I (253) v-teslamodels: Registering Vehicle: Tesla Model S (9000) I (260) v-obdii: Registering Vehicle: OBDII (9000) I (265) v-none: Registering Vehicle: NONE (9000) I (271) v-demo: Registering Vehicle: DEMO (9000) I (276) version: Initialising Versioning (9900) I (285) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (331) ovms_main: Executing on CPU core 0 I (331) ovms_main: Mounting CONFIG... W (381) webserver: UpdateGlobalAuthFile: no password set => no auth for web console I (391) ovms_main: Registering default configs... I (391) ovms_main: Starting HOUSEKEEPING... I (391) housekeeping: Initialising HOUSEKEEPING Framework... I (451) housekeeping: Executing on CPU core 1 I (451) housekeeping: reset_reason: cpu0=12, cpu1=12 I (451) housekeeping: Starting PERIPHERALS... I (461) peripherals: Initialising OVMS Peripherals... I (461) peripherals: TCP/IP Adaptor I (471) peripherals: ESP32 system I (471) peripherals: SPI bus I (471) peripherals: MAX7317 I/O Expander I (481) peripherals: ESP32 CAN I (481) peripherals: ESP32 WIFI I (491) peripherals: ESP32 BLUETOOTH I (491) peripherals: ESP32 ADC I (491) peripherals: MCP2515 CAN 1/2 I (511) peripherals: MCP2515 CAN 2/2 I (521) peripherals: SD CARD I (521) peripherals: SIMCOM MODEM I (521) gpio: GPIO[16]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (531) gpio: GPIO[17]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (541) uart: queue free spaces: 10 I (541) ext12v: Powering off external 12V devices I (551) housekeeping: Auto init ext12v (free: 112436 bytes) I (551) ext12v: Powering on external 12V devices I (561) housekeeping: Auto init wifi (free: 112436 bytes) I (561) wifi: wifi firmware version: ebd3e5d I (571) wifi: config NVS flash: enabled I (571) wifi: config nano formating: disabled I (571) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (581) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (601) wifi: Init dynamic tx buffer num: 16 I (601) wifi: Init data frame dynamic rx buffer num: 16 I (601) wifi: Init management frame dynamic rx buffer num: 16 I (601) wifi: wifi driver task: 3ffe61dc, prio:23, stack:4096 I (611) wifi: Init static rx buffer num: 4 I (611) wifi: Init dynamic rx buffer num: 16 I (611) wifi: wifi power manager task: 0x3ffe8974 prio: 21 stack: 2560 I (1331) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 0 I (1331) wifi: mode : sta (30:ae:a4:37:1b:64) + softAP (30:ae:a4:37:1b:65) I (1341) housekeeping: Auto init modem (free: 90292 bytes) I (1351) simcom: State: Enter PoweringOn state I (1351) simcom: Power Cycle I (1351) ovms-mdns: Started MDNS service I (1381) webserver: Launching Web Server I (1381) esp32wifi: AP started with SSID: ovms, MAC: 30:ae:a4:37:1b:65, IP: 192.168.4.1 I (1461) simcom: State: Enter PoweredOn state I (2351) housekeeping: Auto init vehicle (free: 75064 bytes) I (2351) v-teslaroadster: Tesla Roadster v1.x, v2.x and v3.0 vehicle module I (2361) housekeeping: Auto init obd2ecu (free: 69332 bytes) I (2561) housekeeping: Auto init server v2 (free: 60676 bytes) I (2561) ovms-server-v2: OVMS Server V2 registered metric modifier is #1 I (2571) ovms-server-v2: Status: Starting I (2571) ovms-server-v2: OVMS Server v2 running I (2581) housekeeping: Auto init server v3 (free: 56364 bytes) I (2581) housekeeping: Auto init done (free: 56364 bytes) I (2591) housekeeping: Starting USB console... I (2591) uart: queue free spaces: 30 I (2601) version: Set version
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
Too tired to analyse code today, but I've done some bisecting that may be helpful: - commit 2bcbc8e995977c904f5346c44221e07413e56a62 has broken the AP mode (network completely lost on ppp init) - commit 17a528bbe4e021768e28251984ad4532e9b745bb has then additionally broken the client mode (same effect, network lost on ppp init) AP and client mode fully work last in commit b9e57cef60e240745bd93a1b542158d89b878ec2, client mode also with fallback to ppp on losing wifi. With MDNS disabled of course. AP+Client mode starts correctly in b9e57cef60e240745bd93a1b542158d89b878ec2 but crashes on losing wifi. Regards, Michael Am 19.03.2018 um 18:06 schrieb Michael Balzer:
Disabled mDNS again, "module memory" again working without crashes.
Wifi modes client and apclient working again, but mode ap still with the effect of a broken network after ppp init.
Server v2 does not connect, and "ota flash http …" just hangs.
Am 19.03.2018 um 17:49 schrieb Michael Balzer:
Just pulled the latest version, reenabled mDNS.
Server v2 again does not connect, and the module crashes immediately on "module memory" (related?):
I (1239) housekeeping: Auto init wifi (free: 134556 bytes) I (1249) wifi: wifi firmware version: ebd3e5d I (1249) wifi: config NVS flash: enabled I (1259) wifi: config nano formating: disabled I (1259) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1269) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1279) wifi: Init dynamic tx buffer num: 16 I (1279) wifi: Init data frame dynamic rx buffer num: 16 I (1279) wifi: Init management frame dynamic rx buffer num: 16 I (1289) wifi: wifi driver task: 3ffdf3a8, prio:23, stack:4096 I (1289) wifi: Init static rx buffer num: 4 I (1299) wifi: Init dynamic rx buffer num: 16 I (1299) wifi: wifi power manager task: 0x3ffdfe24 prio: 21 stack: 2560 I (2019) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 0 I (2019) wifi: mode : softAP (30:ae:a4:37:25:89) I (2029) housekeeping: Auto init modem (free: 113884 bytes) I (2029) housekeeping: Auto init vehicle (free: 113300 bytes) I (2029) esp32wifi: AP started with SSID: OVMS, MAC: 30:ae:a4:37:25:89, IP: 192.168.4.1 I (2029) webserver: Launching Web Server I (2039) v-twizy: Renault Twizy vehicle module I (2049) v-twizy: battmon subsystem init I (2059) v-twizy: pwrmon subsystem init I (2059) v-twizy: charge subsystem init I (2059) canopen: Worker started on can1 I (2059) telnet: Launching Telnet Server I (2059) v-twizy: sevcon subsystem init I (2069) simcom: State: Enter PoweringOn state I (2069) simcom: Power Cycle I (2069) simcom: State: Enter PoweredOn state I (3069) gsm-nmea: Startup I (3079) housekeeping: Auto init server v2 (free: 71748 bytes) I (3079) ovms-server-v2: OVMS Server V2 registered metric modifier is #2 I (3079) ovms-server-v2: Status: Starting I (3089) ovms-server-v2: OVMS Server v2 running I (3089) housekeeping: Auto init server v3 (free: 67436 bytes) I (3099) housekeeping: Auto init done (free: 67436 bytes) I (3099) housekeeping: Starting USB console... I (3109) uart: queue free spaces: 30 I (3109) ovms-mdns: Starting MDNS
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console I (3149) version: Set version I (12139) simcom: State timeout, transition to 2 I (12139) simcom: State: Enter PoweringOn state I (12139) simcom: Power Cycle I (13149) housekeeping: System considered stable (free: 46388 bytes) I (18139) simcom: State: Enter PoweredOn state OVMS> enable dee4shi! Secure mode I (38159) simcom: State: Enter MuxStart state I (38159) gsm-mux: Start MUX I (38169) gsm-mux: Channel #0 is open I (38179) gsm-mux: Channel #1 is open I (38179) gsm-mux: Channel #2 is open I (38189) gsm-mux: Channel #3 is open I (38199) gsm-mux: Channel #4 is open I (39139) simcom: State: Enter NetWait state I (39139) gsm-nmea: Startup OVMS# mo m Free 8-bit 38380/283224, 32-bit 27544/55820, SPIRAM 0/0 --Task-- Total DRAM D/IRAM IRAM SPIRAM +/- DRAM D/IRAM IRAM SPIRAM no task 5312 0 0 0 +5312 +0 +0 +0 esp_timer 50120 0 644 0 +50120 +0 +644 +0 main 24624 0 0 0 +24624 +0 +0 +0 ipc0 10848 0 0 0 +10848 +0 +0 +0 Housekeeping 35976 61772 0 0 +35976 +61772 +0 +0 tiT 128 1016 0 0 +128 +1016 +0 +0 ipc1 12 0 0 0 +12 +0 +0 +0 NetManTask 16 692 0 0 +16 +692 +0 +0 wifi 32 3392 0 0 +32 +3392 +0 +0 eventTask 0 7532 0 0 +0 +7532 +0 +0 SIMCOMTask 0 4400 0 0 +0 +4400 +0 +0 Tmr Svc 0 2136 0 0 +0 +2136 +0 +0 AsyncConsole 0 20 27488 0 +0 +20 +27488 +0 I (49159) simcom: CREG Network Registration: RegisteredRoaming OVMS# wifi status WiFi Power: on Mode: Access-Point mode
AP SSID: OVMS MAC: 30:ae:a4:37:25:89 IP: 192.168.4.1 AP Stations: 0 I (50139) simcom: State: Enter NetStart state I (51169) simcom: PPP Connection is ready to start I (52139) simcom: State: Enter NetMode state I (52139) gsm-ppp: Initialising... I (54569) gsm-ppp: StatusCallBack: None I (54569) gsm-ppp: status_cb: Connected I (54569) gsm-ppp: our_ipaddr = 10.170.195.13 I (54569) gsm-ppp: his_ipaddr = 10.64.64.64 I (54569) gsm-ppp: netmask = 255.255.255.255 I (54569) gsm-ppp: our6_ipaddr = :: I (54569) netmanager: Set DNS#0 8.8.8.8 I (54569) netmanager: Set DNS#1 8.8.4.4 I (54579) netmanager: Interface priority is pp2 (10.170.195.13/255.255.255.255 gateway 10.64.64.64) I (54579) time: Starting SNTP client I (54579) ovms-server-v2: Network is up, so attempt network connection I (54579) ovms-server-v2: Connection is ovms.dexters-web.de:6867 test1/aeL1aN9j I (54579) ovms-server-v2: Status: Connecting... OVMS# server v2 status Connecting... OVMS# network status Interface#2: pp2 (ifup=1 linkup=1) IPv4: 10.170.195.13/255.255.255.255 gateway 10.64.64.64
Interface#1: ap1 (ifup=1 linkup=1) IPv4: 192.168.4.1/255.255.255.0 gateway 192.168.4.1
Interface#0: lo0 (ifup=1 linkup=1) IPv4: 127.0.0.1/255.0.0.0 gateway 127.0.0.1
DNS: 8.8.8.8 8.8.4.4
Default Interface: pp2 (10.170.195.13/255.255.255.255 gateway 10.64.64.64) OVMS# mo m CORRUPT HEAP: Bad head at 0x3ffcccf0. Expected 0xabba1234 got 0xab003335 assertion "head != NULL" failed: file "/home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c", line 272, function: multi_heap_get_allocated_size abort() was called at PC 0x400f82af on core 1 0x400f82af: __assert_func at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8)
Backtrace: 0x4008f698:0x3fff2c60 0x4008f83b:0x3fff2c80 0x400f82af:0x3fff2ca0 0x4008f39f:0x3fff2cd0 0x40197139:0x3fff2cf0 0x400e7125:0x3fff2d30 0x400e77c7:0x3fff2d50 0x400ed17a:0x3fff2de0 0x400ed271:0x3fff2e10 0x400ed263:0x3fff2e40 0x400ed299:0x3fff2e70 0x400e3074:0x3fff2e90 0x400f0791:0x3fff2eb0 0x400f07f8:0x3fff2f10 0x400e30a3:0x3fff2f50 0x401ca06b:0x3fff2f70 0x400e36b5:0x3fff2f90 0x400e8005:0x3fff2fc0 0x400e81f1:0x3fff2ff0 0x400e3561:0x3fff3010 0x400e3570:0x3fff3030 0x400e6c31:0x3fff3050 0x4008f698: invoke_abort at /home/balzer/esp/esp-idf/components/esp32/./panic.c:648
0x4008f83b: abort at /home/balzer/esp/esp-idf/components/esp32/./panic.c:648
0x400f82af: __assert_func at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8)
0x4008f39f: multi_heap_get_allocated_size at /home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c:326
0x40197139: heap_caps_get_per_task_info at /home/balzer/esp/esp-idf/components/heap/./heap_task_info.c:78
0x400e7125: get_memory(void**, unsigned int) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:751
0x400e77c7: module_memory(int, OvmsWriter*, OvmsCommand*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:751
0x400ed17a: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94
0x400ed271: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94
0x400ed263: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94
0x400ed299: OvmsCommandApp::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94
0x400e3074: Execute(microrl*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:47
0x400f0791: new_line_handler at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:620
0x400f07f8: microrl_insert_char at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:668
0x400e30a3: OvmsShell::ProcessChar(char) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:70
0x401ca06b: OvmsShell::ProcessChars(char const*, int) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:77 (discriminator 2)
0x400e36b5: ConsoleAsync::HandleDeviceEvent(void*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:169
0x400e8005: OvmsConsole::Poll(unsigned int, void*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:150
0x400e81f1: OvmsConsole::Service() at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:130 (discriminator 1)
0x400e3561: ConsoleAsync::Service() at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:80
0x400e3570: non-virtual thunk to ConsoleAsync::Service() at ??:?
0x400e6c31: TaskBase::Task(void*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./task_base.cpp:156
Entering gdb stub now. $T0b#e6GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 7.10 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-build_pc-linux-gnu --target=xtensa-esp32-elf". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/build/ovms3.elf...done. Remote debugging using /dev/ttyUSB0 0x4008f698 in invoke_abort () at /home/balzer/esp/esp-idf/components/esp32/./panic.c:139 139 *((int *) 0) = 0; (gdb) bt #0 0x4008f698 in invoke_abort () at /home/balzer/esp/esp-idf/components/esp32/./panic.c:139 #1 0x4008f83e in abort () at /home/balzer/esp/esp-idf/components/esp32/./panic.c:148 #2 0x400f82b2 in __assert_func (file=0x3ffb3720 "/home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c", line=272, func=<optimized out>, failedexpr=0x3ffb3710 "head != NULL") at ../../../.././newlib/libc/stdlib/assert.c:63 #3 0x4008f3a2 in multi_heap_get_allocated_size (heap=0x3ffbbe88, p=0x3ffcccfc) at /home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c:272 #4 0x4019713c in heap_caps_get_per_task_info (params=0x40098af4) at /home/balzer/esp/esp-idf/components/heap/./heap_task_info.c:78 #5 0x400e7128 in get_memory (tasks=0x40098ab8, taskslen=0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:500 #6 0x400e77ca in module_memory (verbosity=<optimized out>, writer=<optimized out>, cmd=<optimized out>, argc=<optimized out>, argv=<optimized out>) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:550 #7 0x400ed17d in OvmsCommand::Execute (this=0x3ffc6a44, verbosity=65535, writer=0x3ffef9e4, argc=0, argv=0x0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:281 #8 0x400ed274 in OvmsCommand::Execute (this=0x3ffc69b0, verbosity=65535, writer=0x3ffef9e4, argc=1, argv=0x3fff2eb4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:326 #9 0x400ed266 in OvmsCommand::Execute (this=0x3ffb413c <MyCommandApp+4>, verbosity=65535, writer=0x3ffef9e4, argc=2, argv=0x3fff2eb4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:322 #10 0x400ed29c in OvmsCommandApp::Execute (this=0x3ffb4138 <MyCommandApp>, verbosity=65535, writer=0x3ffef9e4, argc=2, argv=0x3fff2eb0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:648 #11 0x400e3077 in Execute (rl=0x3ffef9f8, argc=2, argv=0x3fff2eb0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:47 #12 0x400f0794 in new_line_handler (pThis=0x3ffef9f8) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:620 #13 0x400f07fb in microrl_insert_char (pThis=0x3ffef9f8, ch=10) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:668 #14 0x400e30a6 in OvmsShell::ProcessChar (this=0x3ffef9e4, c=<optimized out>) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:70 #15 0x401ca06e in OvmsShell::ProcessChars (this=0x3ffef9e4, buf=0x3fff01a5 "a ", '\376' <repeats 198 times>..., len=1) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:77 #16 0x400e36b8 in ConsoleAsync::HandleDeviceEvent (this=0x3ffef9e4, pEvent=<optimized out>) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:169 #17 0x400e8008 in OvmsConsole::Poll (this=0x3ffef9e4, ticks=4294967295, queue=0x3fff0918) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:150 #18 0x400e81f4 in OvmsConsole::Service (this=0x3ffef9e4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:130 #19 0x400e3564 in ConsoleAsync::Service (this=0x3ffef9e4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:80 #20 0x400e3573 in non-virtual thunk to ConsoleAsync::Service() () #21 0x400e6c34 in TaskBase::Task (object=0x3fff0190) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./task_base.cpp:156 (gdb)
Am 19.03.2018 um 15:34 schrieb Mark Webb-Johnson:
And MDNS is back.
I looked through the source code and found a mdns_handle_system_event() call that is used to pass all the system events through to MDNS. That then dynamically adds/removed wifi STA and AP interfaces as they come up/down. No need to init and free the mdns system the whole time. Went back to the documentation, and found it right at the bottom… Good grief.
Anyway, I migrated the code to use that. Now, MDNS starts at boot time and stays up all the time. Seems reliable to me, so I committed it.
Regards, Mark
On 19 Mar 2018, at 12:57 PM, Mark Webb-Johnson <mark@webb-johnson.net <mailto:mark@webb-johnson.net>> wrote:
There seems to be something going on internally in lwip regarding this. It is such a dumb implementation anyway, with a separate task and static initialisation of the interface list at the time of startup; really not ideal for a dynamically changing environment. It would be much more sensible to just have a timer and every N seconds iterate through the current interface list to send out MDNS broadcasts on each active one that is suitable for MDNS (wifi only, really).
I think safest for the moment to just disable MDNS. I’ve done that now, and it is running live. That seems to be pretty good for me. Can you see if that works better for you?
I’m still seeing some issues with ssh/telnet startup that I’m looking at now.
Given where we are, I’m going to tell China that we need another 48 hours to confirm the firmware, before I send to them. That buys us some time to get this as stable as we can.
Regards, Mark.
On 19 Mar 2018, at 12:27 PM, Greg D. <gregd2350@gmail.com <mailto:gregd2350@gmail.com>> wrote:
Stephen Casner wrote:
Greg, the async console is a separate task that should be able to look at some things as long as they don't depend upon the networking tasks or objects. Is it hung also?
Async console? So, not USB. Don't have a connection for that.
So, tried it again... Note that the wifi connection gets dropped in the middle, but I didn't turn off the hotspot!
Network status, however, says that it's still connected. That's wrong.
Stop the server, then start, and this time instead of a hang I get a crash.
Greg
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console OVMS> OVMS> OVMS> I (4185) wifi: n:1 1, o:1 0, ap:1 1, sta:1 0, prof:1 I (4835) wifi: state: init -> auth (b0) I (4845) wifi: state: auth -> assoc (0) I (4855) wifi: state: assoc -> run (10) I (4875) wifi: connected with gregnet3, channel 1 I (4985) simcom: State: Enter PoweredOn state I (5915) event: sta ip: 192.168.43.49, mask: 255.255.255.0, gw: 192.168.43.1 I (5915) netmanager: Set DNS#0 9.9.9.9 I (5915) netmanager: Set DNS#1 8.8.8.8 I (5915) netmanager: Interface priority is st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) I (5915) time: Starting SNTP client I (5925) ovms-server-v2: Network is up, so attempt network connection I (5925) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (5925) ovms-server-v2: Status: Connecting... I (5935) ovms-mdns: Stopped MDNS service I (5935) ovms-mdns: Started MDNS service I (5955) esp32wifi: WiFi UP with SSID: gregnet3, MAC: 30:ae:a4:37:1b:64, IP: 192.168.43.49, mask: 255.255.255.0, gw: 192.168.43.1 I (6395) ovms-server-v2: Connection successful I (6395) ovms-server-v2: Status: Logging in... I (6395) ovms-server-v2: Sending server login: MP-C 0 gDAm8Tas7ISVuhmQ8zGDfh hygW8au7zuXDV5qkWYvMIA== ROADSTER_834 I (6635) ovms-server-v2: Got server response: MP-S 0 ubeiHXgCpUtGX1f6XRXlQK BB2JuaR9oc8TL6Ame7qkEg== I (6645) ovms-server-v2: Server token is ubeiHXgCpUtGX1f6XRXlQK and digest is BB2JuaR9oc8TL6Ame7qkEg== I (6645) ovms-server-v2: Status: Server auth ok. Now priming crypto. I (6645) ovms-server-v2: Shared secret key is ubeiHXgCpUtGX1f6XRXlQKgDAm8Tas7ISVuhmQ8zGDfh (44 bytes) I (6645) ovms-server-v2: Status: OVMS V2 login successful, and crypto channel established I (6655) ovms-server-v2: Incoming Msg: MP-0 Z0 I (7445) ovms-server-v2: Send MP-0 S0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (7445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,7,0,0,0,0,0.269231,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,0,1,TR,gregnet3 I (12625) housekeeping: System considered stable (free: 37872 bytes) I (22225) ovms-server-v2: Incoming Msg: MP-0 Z1 I (22225) ovms-server-v2: One or more peers have connected I (22445) ovms-server-v2: Send MP-0 S0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (22445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,22,0,0,0,0,0.351648,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,9,1,TR,gregnet3 I (24475) simcom: State: Enter MuxStart state I (24475) gsm-mux: Start MUX I (24485) gsm-mux: Channel #0 is open I (24495) gsm-mux: Channel #1 is open I (24505) gsm-mux: Channel #2 is open I (24515) gsm-mux: Channel #3 is open I (24525) gsm-mux: Channel #4 is open I (25445) simcom: State: Enter NetWait state I (25745) ovms-server-v2: Incoming Msg: MP-0 Z0 OVMS> metric set v.b.soc 44 Metric set I (35485) simcom: CREG Network Registration: RegisteredRoaming I (36445) simcom: State: Enter NetStart state I (37585) simcom: PPP Connection is ready to start I (38445) simcom: State: Enter NetMode state I (38445) gsm-ppp: Initialising... I (40145) ovms-server-v2: Incoming Msg: MP-0 Z1 I (40145) ovms-server-v2: One or more peers have connected I (40445) ovms-server-v2: Send MP-0 S44.0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (40445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,40,0,0,0,0,0.28022,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,9,1,TR,T-Mobile Hologram E (40645) ovms-server-v2: Status: Error: Disconnected from OVMS Server V2 I (41895) gsm-ppp: StatusCallBack: None I (41895) gsm-ppp: status_cb: Connected I (41895) gsm-ppp: our_ipaddr = 10.170.146.142 I (41895) gsm-ppp: his_ipaddr = 10.64.64.64 I (41895) gsm-ppp: netmask = 255.255.255.255 I (41895) gsm-ppp: our6_ipaddr = :: I (41895) netmanager: Set DNS#0 9.9.9.9 I (41895) netmanager: Set DNS#1 8.8.8.8 I (41895) netmanager: Interface priority is st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) I (41895) time: Starting SNTP client I (41895) ovms-server-v2: Network is up, so attempt network connection I (41895) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (41895) ovms-server-v2: Status: Connecting... I (60445) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (60445) ovms-server-v2: Status: Connecting... I (62565) wifi: bcn_timout,ap_probe_send_start I (65065) wifi: ap_probe_send over, resett wifi status to disassoc I (65065) wifi: state: run -> init (1) I (65065) wifi: n:1 0, o:1 1, ap:1 1, sta:1 0, prof:1 OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> server v2 status Connecting... OVMS> network Interface#3: pp3 (ifup=1 linkup=1) IPv4: 10.170.146.142/255.255.255.255 <http://10.170.146.142/255.255.255.255> gateway 10.64.64.64
Interface#2: ap2 (ifup=1 linkup=1) IPv4: 192.168.4.1/255.255.255.0 <http://192.168.4.1/255.255.255.0> gateway 192.168.4.1
Interface#1: st1 (ifup=1 linkup=1) IPv4: 192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1
Interface#0: lo0 (ifup=1 linkup=1) IPv4: 127.0.0.1/255.0.0.0 <http://127.0.0.1/255.0.0.0> gateway 127.0.0.1
DNS: 9.9.9.9 8.8.8.8
Default Interface: st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) OVMS> simcom SIMCOM Network Registration: RegisteredRoaming State: NetMode Ticker: 22 User Data: 0
Mux Status: up Open Channels: 4 Framing Errors: 0 Last RX frame: 19 sec(s) ago RX frames: 18 TX frames: 18
PPP Connected on channel: #2 Last Error: None
GPS Status: disabled Time: disabled NMEA: GPS/GLONASS Not Connected OVMS> wifi WiFi Power: on Mode: Access-Point + Client mode
STA SSID: gregnet3 MAC: 30:ae:a4:37:1b:64 IP: 192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> GW: 192.168.43.1
AP SSID: ovms MAC: 30:ae:a4:37:1b:65 IP: 192.168.4.1 AP Stations: 0 OVMS> server v2 stop Stopping OVMS Server V2 connection (oscv2) OVMS> server v2 status OVMS v2 server has not been started OVMS> server v2 start Launching OVMS Server V2 connection (oscv2) Guru Meditation Error: Core 1 panic'ed (LoadProhibited) . Exception was unhandled. Core 1 register dump: PC : 0x400ee17d PS : 0x00060630 A0 : 0x800ef642 A1 : 0x3fff5020 A2 : 0xffffffff A3 : 0x3fff2540 A4 : 0x00000000 A5 : 0x3fff5100 A6 : 0x3fff50e0 A7 : 0x0000000c A8 : 0x800ee179 A9 : 0x3fff4ff0 A10 : 0xffffffff A11 : 0x3f411528 A12 : 0x3fff5100 A13 : 0x3fff50e0 A14 : 0x0000000c A15 : 0x3fff1ea4 SAR : 0x00000004 EXCCAUSE: 0x0000001c EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff
Backtrace: 0x400ee17d:0x3fff5020 0x400ef63f:0x3fff5060 0x400f04c5:0x3fff50a0 0x40082c71:0x3fff50d0 0x40115696:0x3fff5120 0x401161ef:0x3fff5140 0x40116a7d:0x3fff5330 0x40116aa5:0x3fff5960 0x400eeeb2:0x3fff5980 0x400eefa9:0x3fff59b0 0x400eef9b:0x3fff59e0 0x400eef9b:0x3fff5a10 0x400eefd1:0x3fff5a40 0x400e534c:0x3fff5a60 0x400f1809:0x3fff5a80 0x400f1870:0x3fff5ae0 0x400e537b:0x3fff5b20 0x401eb64f:0x3fff5b40 0x400f0575:0x3fff5b60 0x400ebf8d:0x3fff5b90 0x400ec179:0x3fff5bc0 0x400f0421:0x3fff5be0 0x400f0430:0x3fff5c00 0x400e3295:0x3fff5c20
Rebooting... ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT) configsip: 156795334, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:4560 ho 0 tail 12 room 4 load:0x40078000,len:0 load:0x40078000,len:13176 entry 0x40078d38 I (647) cpu_start: Pro cpu up. I (647) cpu_start: Starting app cpu, entry point is 0x40081300 I (632) cpu_start: App cpu up. I (651) heap_init: Initializing. RAM available for dynamic allocation: I (657) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (664) heap_init: At 3FFBBAC0 len 00024540 (145 KiB): DRAM I (670) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM I (676) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (684) heap_init: At 40091FDC len 0000E024 (56 KiB): IRAM I (689) cpu_start: Pro cpu start user code I (35) ovms_main: Set default logging level for * to INFO I (35) command: Initialising COMMAND (1000) I (36) boot: Initialising BOOT (1100) I (40) boot: Boot #1 reasons for CPU0=12 and CPU1=12 E (46) boot: Crash #1 detected I (49) events: Initialising EVENTS (1200) I (54) config: Initialising CONFIG (1400) I (59) time: Initialising TIME (1500) I (64) script: Initialising SCRIPTS (1600) I (68) script: Using DUKTAPE javascript engine I (74) metrics: Initialising METRICS (1810) I (78) metrics: OvmsMetric is 28 bytes I (82) metrics: OvmsMetricBool is 32 bytes I (87) metrics: Expanding DUKTAPE javascript engine I (97) notify: Initialising NOTIFICATIONS (1820) I (99) notify: Registered notification type info I (103) notify: Registered notification type error I (109) notify: Registered notification type alert I (114) notify: Registered notification type data I (120) location: Initialising LOCATIONS (1900) I (126) location: Expanding DUKTAPE javascript engine I (131) vehicle: Initialising VEHICLE Factory (2000) I (137) pcp: Initialising POWER (4000) I (141) max7317: Initialising MAX7317 EGPIO (4200) I (146) sdcard: Initialising SD CARD (4400) I (151) ota: Initialising OTA (4400) I (156) can: Initialising CAN (4500) I (161) simcom: Initialising SIMCOM (4600) I (165) test: Initialising TEST (5000) I (169) ovms-module: Initialising MODULE (5100) I (174) vfs: Initialising VFS (5200) I (179) ovms-server: Initialising OVMS Server (6000) I (184) ovms-server-v2: Initialising OVMS V2 Server (6100) I (190) ovms-server-v3: Initialising OVMS V3 Server (6200) I (196) obd2ecu: Initialising OBD2ECU (7000) I (202) canopen: Initialising CANopen (7000) I (207) esp32wifi: Initialising ESP32WIFI (8000) I (212) ovms-mdns: Initialising MDNS (8100) I (217) webserver: Initialising WEBSERVER (8200) I (223) telnet: Initialising Telnet (8300) I (227) ssh: Initialising SSH (8300) I (231) re: Initialising RE Tools (8800) I (236) netmanager: Initialising NETMANAGER (8999) I (242) v-track: Registering Vehicle: TRACK (9000) I (246) v-teslaroadster: Registering Vehicle: Tesla Roadster (9000) I (253) v-teslamodels: Registering Vehicle: Tesla Model S (9000) I (260) v-obdii: Registering Vehicle: OBDII (9000) I (265) v-none: Registering Vehicle: NONE (9000) I (271) v-demo: Registering Vehicle: DEMO (9000) I (276) version: Initialising Versioning (9900) I (285) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (331) ovms_main: Executing on CPU core 0 I (331) ovms_main: Mounting CONFIG... W (381) webserver: UpdateGlobalAuthFile: no password set => no auth for web console I (391) ovms_main: Registering default configs... I (391) ovms_main: Starting HOUSEKEEPING... I (391) housekeeping: Initialising HOUSEKEEPING Framework... I (451) housekeeping: Executing on CPU core 1 I (451) housekeeping: reset_reason: cpu0=12, cpu1=12 I (451) housekeeping: Starting PERIPHERALS... I (461) peripherals: Initialising OVMS Peripherals... I (461) peripherals: TCP/IP Adaptor I (471) peripherals: ESP32 system I (471) peripherals: SPI bus I (471) peripherals: MAX7317 I/O Expander I (481) peripherals: ESP32 CAN I (481) peripherals: ESP32 WIFI I (491) peripherals: ESP32 BLUETOOTH I (491) peripherals: ESP32 ADC I (491) peripherals: MCP2515 CAN 1/2 I (511) peripherals: MCP2515 CAN 2/2 I (521) peripherals: SD CARD I (521) peripherals: SIMCOM MODEM I (521) gpio: GPIO[16]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (531) gpio: GPIO[17]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (541) uart: queue free spaces: 10 I (541) ext12v: Powering off external 12V devices I (551) housekeeping: Auto init ext12v (free: 112436 bytes) I (551) ext12v: Powering on external 12V devices I (561) housekeeping: Auto init wifi (free: 112436 bytes) I (561) wifi: wifi firmware version: ebd3e5d I (571) wifi: config NVS flash: enabled I (571) wifi: config nano formating: disabled I (571) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (581) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (601) wifi: Init dynamic tx buffer num: 16 I (601) wifi: Init data frame dynamic rx buffer num: 16 I (601) wifi: Init management frame dynamic rx buffer num: 16 I (601) wifi: wifi driver task: 3ffe61dc, prio:23, stack:4096 I (611) wifi: Init static rx buffer num: 4 I (611) wifi: Init dynamic rx buffer num: 16 I (611) wifi: wifi power manager task: 0x3ffe8974 prio: 21 stack: 2560 I (1331) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 0 I (1331) wifi: mode : sta (30:ae:a4:37:1b:64) + softAP (30:ae:a4:37:1b:65) I (1341) housekeeping: Auto init modem (free: 90292 bytes) I (1351) simcom: State: Enter PoweringOn state I (1351) simcom: Power Cycle I (1351) ovms-mdns: Started MDNS service I (1381) webserver: Launching Web Server I (1381) esp32wifi: AP started with SSID: ovms, MAC: 30:ae:a4:37:1b:65, IP: 192.168.4.1 I (1461) simcom: State: Enter PoweredOn state I (2351) housekeeping: Auto init vehicle (free: 75064 bytes) I (2351) v-teslaroadster: Tesla Roadster v1.x, v2.x and v3.0 vehicle module I (2361) housekeeping: Auto init obd2ecu (free: 69332 bytes) I (2561) housekeeping: Auto init server v2 (free: 60676 bytes) I (2561) ovms-server-v2: OVMS Server V2 registered metric modifier is #1 I (2571) ovms-server-v2: Status: Starting I (2571) ovms-server-v2: OVMS Server v2 running I (2581) housekeeping: Auto init server v3 (free: 56364 bytes) I (2581) housekeeping: Auto init done (free: 56364 bytes) I (2591) housekeeping: Starting USB console... I (2591) uart: queue free spaces: 30 I (2601) version: Set version
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
Correction: Commit 2bcbc8e995977c904f5346c44221e07413e56a62 has broken both AP and client mode as described. Regards, Michael Am 19.03.2018 um 22:46 schrieb Michael Balzer:
Too tired to analyse code today, but I've done some bisecting that may be helpful:
- commit 2bcbc8e995977c904f5346c44221e07413e56a62 has broken the AP mode (network completely lost on ppp init)
- commit 17a528bbe4e021768e28251984ad4532e9b745bb has then additionally broken the client mode (same effect, network lost on ppp init)
AP and client mode fully work last in commit b9e57cef60e240745bd93a1b542158d89b878ec2, client mode also with fallback to ppp on losing wifi. With MDNS disabled of course.
AP+Client mode starts correctly in b9e57cef60e240745bd93a1b542158d89b878ec2 but crashes on losing wifi.
Regards, Michael
Am 19.03.2018 um 18:06 schrieb Michael Balzer:
Disabled mDNS again, "module memory" again working without crashes.
Wifi modes client and apclient working again, but mode ap still with the effect of a broken network after ppp init.
Server v2 does not connect, and "ota flash http …" just hangs.
Am 19.03.2018 um 17:49 schrieb Michael Balzer:
Just pulled the latest version, reenabled mDNS.
Server v2 again does not connect, and the module crashes immediately on "module memory" (related?):
I (1239) housekeeping: Auto init wifi (free: 134556 bytes) I (1249) wifi: wifi firmware version: ebd3e5d I (1249) wifi: config NVS flash: enabled I (1259) wifi: config nano formating: disabled I (1259) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1269) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1279) wifi: Init dynamic tx buffer num: 16 I (1279) wifi: Init data frame dynamic rx buffer num: 16 I (1279) wifi: Init management frame dynamic rx buffer num: 16 I (1289) wifi: wifi driver task: 3ffdf3a8, prio:23, stack:4096 I (1289) wifi: Init static rx buffer num: 4 I (1299) wifi: Init dynamic rx buffer num: 16 I (1299) wifi: wifi power manager task: 0x3ffdfe24 prio: 21 stack: 2560 I (2019) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 0 I (2019) wifi: mode : softAP (30:ae:a4:37:25:89) I (2029) housekeeping: Auto init modem (free: 113884 bytes) I (2029) housekeeping: Auto init vehicle (free: 113300 bytes) I (2029) esp32wifi: AP started with SSID: OVMS, MAC: 30:ae:a4:37:25:89, IP: 192.168.4.1 I (2029) webserver: Launching Web Server I (2039) v-twizy: Renault Twizy vehicle module I (2049) v-twizy: battmon subsystem init I (2059) v-twizy: pwrmon subsystem init I (2059) v-twizy: charge subsystem init I (2059) canopen: Worker started on can1 I (2059) telnet: Launching Telnet Server I (2059) v-twizy: sevcon subsystem init I (2069) simcom: State: Enter PoweringOn state I (2069) simcom: Power Cycle I (2069) simcom: State: Enter PoweredOn state I (3069) gsm-nmea: Startup I (3079) housekeeping: Auto init server v2 (free: 71748 bytes) I (3079) ovms-server-v2: OVMS Server V2 registered metric modifier is #2 I (3079) ovms-server-v2: Status: Starting I (3089) ovms-server-v2: OVMS Server v2 running I (3089) housekeeping: Auto init server v3 (free: 67436 bytes) I (3099) housekeeping: Auto init done (free: 67436 bytes) I (3099) housekeeping: Starting USB console... I (3109) uart: queue free spaces: 30 I (3109) ovms-mdns: Starting MDNS
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console I (3149) version: Set version I (12139) simcom: State timeout, transition to 2 I (12139) simcom: State: Enter PoweringOn state I (12139) simcom: Power Cycle I (13149) housekeeping: System considered stable (free: 46388 bytes) I (18139) simcom: State: Enter PoweredOn state OVMS> enable dee4shi! Secure mode I (38159) simcom: State: Enter MuxStart state I (38159) gsm-mux: Start MUX I (38169) gsm-mux: Channel #0 is open I (38179) gsm-mux: Channel #1 is open I (38179) gsm-mux: Channel #2 is open I (38189) gsm-mux: Channel #3 is open I (38199) gsm-mux: Channel #4 is open I (39139) simcom: State: Enter NetWait state I (39139) gsm-nmea: Startup OVMS# mo m Free 8-bit 38380/283224, 32-bit 27544/55820, SPIRAM 0/0 --Task-- Total DRAM D/IRAM IRAM SPIRAM +/- DRAM D/IRAM IRAM SPIRAM no task 5312 0 0 0 +5312 +0 +0 +0 esp_timer 50120 0 644 0 +50120 +0 +644 +0 main 24624 0 0 0 +24624 +0 +0 +0 ipc0 10848 0 0 0 +10848 +0 +0 +0 Housekeeping 35976 61772 0 0 +35976 +61772 +0 +0 tiT 128 1016 0 0 +128 +1016 +0 +0 ipc1 12 0 0 0 +12 +0 +0 +0 NetManTask 16 692 0 0 +16 +692 +0 +0 wifi 32 3392 0 0 +32 +3392 +0 +0 eventTask 0 7532 0 0 +0 +7532 +0 +0 SIMCOMTask 0 4400 0 0 +0 +4400 +0 +0 Tmr Svc 0 2136 0 0 +0 +2136 +0 +0 AsyncConsole 0 20 27488 0 +0 +20 +27488 +0 I (49159) simcom: CREG Network Registration: RegisteredRoaming OVMS# wifi status WiFi Power: on Mode: Access-Point mode
AP SSID: OVMS MAC: 30:ae:a4:37:25:89 IP: 192.168.4.1 AP Stations: 0 I (50139) simcom: State: Enter NetStart state I (51169) simcom: PPP Connection is ready to start I (52139) simcom: State: Enter NetMode state I (52139) gsm-ppp: Initialising... I (54569) gsm-ppp: StatusCallBack: None I (54569) gsm-ppp: status_cb: Connected I (54569) gsm-ppp: our_ipaddr = 10.170.195.13 I (54569) gsm-ppp: his_ipaddr = 10.64.64.64 I (54569) gsm-ppp: netmask = 255.255.255.255 I (54569) gsm-ppp: our6_ipaddr = :: I (54569) netmanager: Set DNS#0 8.8.8.8 I (54569) netmanager: Set DNS#1 8.8.4.4 I (54579) netmanager: Interface priority is pp2 (10.170.195.13/255.255.255.255 gateway 10.64.64.64) I (54579) time: Starting SNTP client I (54579) ovms-server-v2: Network is up, so attempt network connection I (54579) ovms-server-v2: Connection is ovms.dexters-web.de:6867 test1/aeL1aN9j I (54579) ovms-server-v2: Status: Connecting... OVMS# server v2 status Connecting... OVMS# network status Interface#2: pp2 (ifup=1 linkup=1) IPv4: 10.170.195.13/255.255.255.255 gateway 10.64.64.64
Interface#1: ap1 (ifup=1 linkup=1) IPv4: 192.168.4.1/255.255.255.0 gateway 192.168.4.1
Interface#0: lo0 (ifup=1 linkup=1) IPv4: 127.0.0.1/255.0.0.0 gateway 127.0.0.1
DNS: 8.8.8.8 8.8.4.4
Default Interface: pp2 (10.170.195.13/255.255.255.255 gateway 10.64.64.64) OVMS# mo m CORRUPT HEAP: Bad head at 0x3ffcccf0. Expected 0xabba1234 got 0xab003335 assertion "head != NULL" failed: file "/home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c", line 272, function: multi_heap_get_allocated_size abort() was called at PC 0x400f82af on core 1 0x400f82af: __assert_func at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8)
Backtrace: 0x4008f698:0x3fff2c60 0x4008f83b:0x3fff2c80 0x400f82af:0x3fff2ca0 0x4008f39f:0x3fff2cd0 0x40197139:0x3fff2cf0 0x400e7125:0x3fff2d30 0x400e77c7:0x3fff2d50 0x400ed17a:0x3fff2de0 0x400ed271:0x3fff2e10 0x400ed263:0x3fff2e40 0x400ed299:0x3fff2e70 0x400e3074:0x3fff2e90 0x400f0791:0x3fff2eb0 0x400f07f8:0x3fff2f10 0x400e30a3:0x3fff2f50 0x401ca06b:0x3fff2f70 0x400e36b5:0x3fff2f90 0x400e8005:0x3fff2fc0 0x400e81f1:0x3fff2ff0 0x400e3561:0x3fff3010 0x400e3570:0x3fff3030 0x400e6c31:0x3fff3050 0x4008f698: invoke_abort at /home/balzer/esp/esp-idf/components/esp32/./panic.c:648
0x4008f83b: abort at /home/balzer/esp/esp-idf/components/esp32/./panic.c:648
0x400f82af: __assert_func at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8)
0x4008f39f: multi_heap_get_allocated_size at /home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c:326
0x40197139: heap_caps_get_per_task_info at /home/balzer/esp/esp-idf/components/heap/./heap_task_info.c:78
0x400e7125: get_memory(void**, unsigned int) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:751
0x400e77c7: module_memory(int, OvmsWriter*, OvmsCommand*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:751
0x400ed17a: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94
0x400ed271: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94
0x400ed263: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94
0x400ed299: OvmsCommandApp::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94
0x400e3074: Execute(microrl*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:47
0x400f0791: new_line_handler at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:620
0x400f07f8: microrl_insert_char at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:668
0x400e30a3: OvmsShell::ProcessChar(char) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:70
0x401ca06b: OvmsShell::ProcessChars(char const*, int) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:77 (discriminator 2)
0x400e36b5: ConsoleAsync::HandleDeviceEvent(void*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:169
0x400e8005: OvmsConsole::Poll(unsigned int, void*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:150
0x400e81f1: OvmsConsole::Service() at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:130 (discriminator 1)
0x400e3561: ConsoleAsync::Service() at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:80
0x400e3570: non-virtual thunk to ConsoleAsync::Service() at ??:?
0x400e6c31: TaskBase::Task(void*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./task_base.cpp:156
Entering gdb stub now. $T0b#e6GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 7.10 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-build_pc-linux-gnu --target=xtensa-esp32-elf". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/build/ovms3.elf...done. Remote debugging using /dev/ttyUSB0 0x4008f698 in invoke_abort () at /home/balzer/esp/esp-idf/components/esp32/./panic.c:139 139 *((int *) 0) = 0; (gdb) bt #0 0x4008f698 in invoke_abort () at /home/balzer/esp/esp-idf/components/esp32/./panic.c:139 #1 0x4008f83e in abort () at /home/balzer/esp/esp-idf/components/esp32/./panic.c:148 #2 0x400f82b2 in __assert_func (file=0x3ffb3720 "/home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c", line=272, func=<optimized out>, failedexpr=0x3ffb3710 "head != NULL") at ../../../.././newlib/libc/stdlib/assert.c:63 #3 0x4008f3a2 in multi_heap_get_allocated_size (heap=0x3ffbbe88, p=0x3ffcccfc) at /home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c:272 #4 0x4019713c in heap_caps_get_per_task_info (params=0x40098af4) at /home/balzer/esp/esp-idf/components/heap/./heap_task_info.c:78 #5 0x400e7128 in get_memory (tasks=0x40098ab8, taskslen=0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:500 #6 0x400e77ca in module_memory (verbosity=<optimized out>, writer=<optimized out>, cmd=<optimized out>, argc=<optimized out>, argv=<optimized out>) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:550 #7 0x400ed17d in OvmsCommand::Execute (this=0x3ffc6a44, verbosity=65535, writer=0x3ffef9e4, argc=0, argv=0x0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:281 #8 0x400ed274 in OvmsCommand::Execute (this=0x3ffc69b0, verbosity=65535, writer=0x3ffef9e4, argc=1, argv=0x3fff2eb4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:326 #9 0x400ed266 in OvmsCommand::Execute (this=0x3ffb413c <MyCommandApp+4>, verbosity=65535, writer=0x3ffef9e4, argc=2, argv=0x3fff2eb4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:322 #10 0x400ed29c in OvmsCommandApp::Execute (this=0x3ffb4138 <MyCommandApp>, verbosity=65535, writer=0x3ffef9e4, argc=2, argv=0x3fff2eb0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:648 #11 0x400e3077 in Execute (rl=0x3ffef9f8, argc=2, argv=0x3fff2eb0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:47 #12 0x400f0794 in new_line_handler (pThis=0x3ffef9f8) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:620 #13 0x400f07fb in microrl_insert_char (pThis=0x3ffef9f8, ch=10) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:668 #14 0x400e30a6 in OvmsShell::ProcessChar (this=0x3ffef9e4, c=<optimized out>) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:70 #15 0x401ca06e in OvmsShell::ProcessChars (this=0x3ffef9e4, buf=0x3fff01a5 "a ", '\376' <repeats 198 times>..., len=1) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:77 #16 0x400e36b8 in ConsoleAsync::HandleDeviceEvent (this=0x3ffef9e4, pEvent=<optimized out>) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:169 #17 0x400e8008 in OvmsConsole::Poll (this=0x3ffef9e4, ticks=4294967295, queue=0x3fff0918) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:150 #18 0x400e81f4 in OvmsConsole::Service (this=0x3ffef9e4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:130 #19 0x400e3564 in ConsoleAsync::Service (this=0x3ffef9e4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:80 #20 0x400e3573 in non-virtual thunk to ConsoleAsync::Service() () #21 0x400e6c34 in TaskBase::Task (object=0x3fff0190) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./task_base.cpp:156 (gdb)
Am 19.03.2018 um 15:34 schrieb Mark Webb-Johnson:
And MDNS is back.
I looked through the source code and found a mdns_handle_system_event() call that is used to pass all the system events through to MDNS. That then dynamically adds/removed wifi STA and AP interfaces as they come up/down. No need to init and free the mdns system the whole time. Went back to the documentation, and found it right at the bottom… Good grief.
Anyway, I migrated the code to use that. Now, MDNS starts at boot time and stays up all the time. Seems reliable to me, so I committed it.
Regards, Mark
On 19 Mar 2018, at 12:57 PM, Mark Webb-Johnson <mark@webb-johnson.net <mailto:mark@webb-johnson.net>> wrote:
There seems to be something going on internally in lwip regarding this. It is such a dumb implementation anyway, with a separate task and static initialisation of the interface list at the time of startup; really not ideal for a dynamically changing environment. It would be much more sensible to just have a timer and every N seconds iterate through the current interface list to send out MDNS broadcasts on each active one that is suitable for MDNS (wifi only, really).
I think safest for the moment to just disable MDNS. I’ve done that now, and it is running live. That seems to be pretty good for me. Can you see if that works better for you?
I’m still seeing some issues with ssh/telnet startup that I’m looking at now.
Given where we are, I’m going to tell China that we need another 48 hours to confirm the firmware, before I send to them. That buys us some time to get this as stable as we can.
Regards, Mark.
On 19 Mar 2018, at 12:27 PM, Greg D. <gregd2350@gmail.com <mailto:gregd2350@gmail.com>> wrote:
Stephen Casner wrote: > Greg, the async console is a separate task that should be able to look > at some things as long as they don't depend upon the networking tasks > or objects. Is it hung also? > Async console? So, not USB. Don't have a connection for that.
So, tried it again... Note that the wifi connection gets dropped in the middle, but I didn't turn off the hotspot!
Network status, however, says that it's still connected. That's wrong.
Stop the server, then start, and this time instead of a hang I get a crash.
Greg
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console OVMS> OVMS> OVMS> I (4185) wifi: n:1 1, o:1 0, ap:1 1, sta:1 0, prof:1 I (4835) wifi: state: init -> auth (b0) I (4845) wifi: state: auth -> assoc (0) I (4855) wifi: state: assoc -> run (10) I (4875) wifi: connected with gregnet3, channel 1 I (4985) simcom: State: Enter PoweredOn state I (5915) event: sta ip: 192.168.43.49, mask: 255.255.255.0, gw: 192.168.43.1 I (5915) netmanager: Set DNS#0 9.9.9.9 I (5915) netmanager: Set DNS#1 8.8.8.8 I (5915) netmanager: Interface priority is st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) I (5915) time: Starting SNTP client I (5925) ovms-server-v2: Network is up, so attempt network connection I (5925) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (5925) ovms-server-v2: Status: Connecting... I (5935) ovms-mdns: Stopped MDNS service I (5935) ovms-mdns: Started MDNS service I (5955) esp32wifi: WiFi UP with SSID: gregnet3, MAC: 30:ae:a4:37:1b:64, IP: 192.168.43.49, mask: 255.255.255.0, gw: 192.168.43.1 I (6395) ovms-server-v2: Connection successful I (6395) ovms-server-v2: Status: Logging in... I (6395) ovms-server-v2: Sending server login: MP-C 0 gDAm8Tas7ISVuhmQ8zGDfh hygW8au7zuXDV5qkWYvMIA== ROADSTER_834 I (6635) ovms-server-v2: Got server response: MP-S 0 ubeiHXgCpUtGX1f6XRXlQK BB2JuaR9oc8TL6Ame7qkEg== I (6645) ovms-server-v2: Server token is ubeiHXgCpUtGX1f6XRXlQK and digest is BB2JuaR9oc8TL6Ame7qkEg== I (6645) ovms-server-v2: Status: Server auth ok. Now priming crypto. I (6645) ovms-server-v2: Shared secret key is ubeiHXgCpUtGX1f6XRXlQKgDAm8Tas7ISVuhmQ8zGDfh (44 bytes) I (6645) ovms-server-v2: Status: OVMS V2 login successful, and crypto channel established I (6655) ovms-server-v2: Incoming Msg: MP-0 Z0 I (7445) ovms-server-v2: Send MP-0 S0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (7445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,7,0,0,0,0,0.269231,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,0,1,TR,gregnet3 I (12625) housekeeping: System considered stable (free: 37872 bytes) I (22225) ovms-server-v2: Incoming Msg: MP-0 Z1 I (22225) ovms-server-v2: One or more peers have connected I (22445) ovms-server-v2: Send MP-0 S0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (22445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,22,0,0,0,0,0.351648,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,9,1,TR,gregnet3 I (24475) simcom: State: Enter MuxStart state I (24475) gsm-mux: Start MUX I (24485) gsm-mux: Channel #0 is open I (24495) gsm-mux: Channel #1 is open I (24505) gsm-mux: Channel #2 is open I (24515) gsm-mux: Channel #3 is open I (24525) gsm-mux: Channel #4 is open I (25445) simcom: State: Enter NetWait state I (25745) ovms-server-v2: Incoming Msg: MP-0 Z0 OVMS> metric set v.b.soc 44 Metric set I (35485) simcom: CREG Network Registration: RegisteredRoaming I (36445) simcom: State: Enter NetStart state I (37585) simcom: PPP Connection is ready to start I (38445) simcom: State: Enter NetMode state I (38445) gsm-ppp: Initialising... I (40145) ovms-server-v2: Incoming Msg: MP-0 Z1 I (40145) ovms-server-v2: One or more peers have connected I (40445) ovms-server-v2: Send MP-0 S44.0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (40445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,40,0,0,0,0,0.28022,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,9,1,TR,T-Mobile Hologram E (40645) ovms-server-v2: Status: Error: Disconnected from OVMS Server V2 I (41895) gsm-ppp: StatusCallBack: None I (41895) gsm-ppp: status_cb: Connected I (41895) gsm-ppp: our_ipaddr = 10.170.146.142 I (41895) gsm-ppp: his_ipaddr = 10.64.64.64 I (41895) gsm-ppp: netmask = 255.255.255.255 I (41895) gsm-ppp: our6_ipaddr = :: I (41895) netmanager: Set DNS#0 9.9.9.9 I (41895) netmanager: Set DNS#1 8.8.8.8 I (41895) netmanager: Interface priority is st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) I (41895) time: Starting SNTP client I (41895) ovms-server-v2: Network is up, so attempt network connection I (41895) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (41895) ovms-server-v2: Status: Connecting... I (60445) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (60445) ovms-server-v2: Status: Connecting... I (62565) wifi: bcn_timout,ap_probe_send_start I (65065) wifi: ap_probe_send over, resett wifi status to disassoc I (65065) wifi: state: run -> init (1) I (65065) wifi: n:1 0, o:1 1, ap:1 1, sta:1 0, prof:1 OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> server v2 status Connecting... OVMS> network Interface#3: pp3 (ifup=1 linkup=1) IPv4: 10.170.146.142/255.255.255.255 <http://10.170.146.142/255.255.255.255> gateway 10.64.64.64
Interface#2: ap2 (ifup=1 linkup=1) IPv4: 192.168.4.1/255.255.255.0 <http://192.168.4.1/255.255.255.0> gateway 192.168.4.1
Interface#1: st1 (ifup=1 linkup=1) IPv4: 192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1
Interface#0: lo0 (ifup=1 linkup=1) IPv4: 127.0.0.1/255.0.0.0 <http://127.0.0.1/255.0.0.0> gateway 127.0.0.1
DNS: 9.9.9.9 8.8.8.8
Default Interface: st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) OVMS> simcom SIMCOM Network Registration: RegisteredRoaming State: NetMode Ticker: 22 User Data: 0
Mux Status: up Open Channels: 4 Framing Errors: 0 Last RX frame: 19 sec(s) ago RX frames: 18 TX frames: 18
PPP Connected on channel: #2 Last Error: None
GPS Status: disabled Time: disabled NMEA: GPS/GLONASS Not Connected OVMS> wifi WiFi Power: on Mode: Access-Point + Client mode
STA SSID: gregnet3 MAC: 30:ae:a4:37:1b:64 IP: 192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> GW: 192.168.43.1
AP SSID: ovms MAC: 30:ae:a4:37:1b:65 IP: 192.168.4.1 AP Stations: 0 OVMS> server v2 stop Stopping OVMS Server V2 connection (oscv2) OVMS> server v2 status OVMS v2 server has not been started OVMS> server v2 start Launching OVMS Server V2 connection (oscv2) Guru Meditation Error: Core 1 panic'ed (LoadProhibited) . Exception was unhandled. Core 1 register dump: PC : 0x400ee17d PS : 0x00060630 A0 : 0x800ef642 A1 : 0x3fff5020 A2 : 0xffffffff A3 : 0x3fff2540 A4 : 0x00000000 A5 : 0x3fff5100 A6 : 0x3fff50e0 A7 : 0x0000000c A8 : 0x800ee179 A9 : 0x3fff4ff0 A10 : 0xffffffff A11 : 0x3f411528 A12 : 0x3fff5100 A13 : 0x3fff50e0 A14 : 0x0000000c A15 : 0x3fff1ea4 SAR : 0x00000004 EXCCAUSE: 0x0000001c EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff
Backtrace: 0x400ee17d:0x3fff5020 0x400ef63f:0x3fff5060 0x400f04c5:0x3fff50a0 0x40082c71:0x3fff50d0 0x40115696:0x3fff5120 0x401161ef:0x3fff5140 0x40116a7d:0x3fff5330 0x40116aa5:0x3fff5960 0x400eeeb2:0x3fff5980 0x400eefa9:0x3fff59b0 0x400eef9b:0x3fff59e0 0x400eef9b:0x3fff5a10 0x400eefd1:0x3fff5a40 0x400e534c:0x3fff5a60 0x400f1809:0x3fff5a80 0x400f1870:0x3fff5ae0 0x400e537b:0x3fff5b20 0x401eb64f:0x3fff5b40 0x400f0575:0x3fff5b60 0x400ebf8d:0x3fff5b90 0x400ec179:0x3fff5bc0 0x400f0421:0x3fff5be0 0x400f0430:0x3fff5c00 0x400e3295:0x3fff5c20
Rebooting... ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT) configsip: 156795334, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:4560 ho 0 tail 12 room 4 load:0x40078000,len:0 load:0x40078000,len:13176 entry 0x40078d38 I (647) cpu_start: Pro cpu up. I (647) cpu_start: Starting app cpu, entry point is 0x40081300 I (632) cpu_start: App cpu up. I (651) heap_init: Initializing. RAM available for dynamic allocation: I (657) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (664) heap_init: At 3FFBBAC0 len 00024540 (145 KiB): DRAM I (670) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM I (676) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (684) heap_init: At 40091FDC len 0000E024 (56 KiB): IRAM I (689) cpu_start: Pro cpu start user code I (35) ovms_main: Set default logging level for * to INFO I (35) command: Initialising COMMAND (1000) I (36) boot: Initialising BOOT (1100) I (40) boot: Boot #1 reasons for CPU0=12 and CPU1=12 E (46) boot: Crash #1 detected I (49) events: Initialising EVENTS (1200) I (54) config: Initialising CONFIG (1400) I (59) time: Initialising TIME (1500) I (64) script: Initialising SCRIPTS (1600) I (68) script: Using DUKTAPE javascript engine I (74) metrics: Initialising METRICS (1810) I (78) metrics: OvmsMetric is 28 bytes I (82) metrics: OvmsMetricBool is 32 bytes I (87) metrics: Expanding DUKTAPE javascript engine I (97) notify: Initialising NOTIFICATIONS (1820) I (99) notify: Registered notification type info I (103) notify: Registered notification type error I (109) notify: Registered notification type alert I (114) notify: Registered notification type data I (120) location: Initialising LOCATIONS (1900) I (126) location: Expanding DUKTAPE javascript engine I (131) vehicle: Initialising VEHICLE Factory (2000) I (137) pcp: Initialising POWER (4000) I (141) max7317: Initialising MAX7317 EGPIO (4200) I (146) sdcard: Initialising SD CARD (4400) I (151) ota: Initialising OTA (4400) I (156) can: Initialising CAN (4500) I (161) simcom: Initialising SIMCOM (4600) I (165) test: Initialising TEST (5000) I (169) ovms-module: Initialising MODULE (5100) I (174) vfs: Initialising VFS (5200) I (179) ovms-server: Initialising OVMS Server (6000) I (184) ovms-server-v2: Initialising OVMS V2 Server (6100) I (190) ovms-server-v3: Initialising OVMS V3 Server (6200) I (196) obd2ecu: Initialising OBD2ECU (7000) I (202) canopen: Initialising CANopen (7000) I (207) esp32wifi: Initialising ESP32WIFI (8000) I (212) ovms-mdns: Initialising MDNS (8100) I (217) webserver: Initialising WEBSERVER (8200) I (223) telnet: Initialising Telnet (8300) I (227) ssh: Initialising SSH (8300) I (231) re: Initialising RE Tools (8800) I (236) netmanager: Initialising NETMANAGER (8999) I (242) v-track: Registering Vehicle: TRACK (9000) I (246) v-teslaroadster: Registering Vehicle: Tesla Roadster (9000) I (253) v-teslamodels: Registering Vehicle: Tesla Model S (9000) I (260) v-obdii: Registering Vehicle: OBDII (9000) I (265) v-none: Registering Vehicle: NONE (9000) I (271) v-demo: Registering Vehicle: DEMO (9000) I (276) version: Initialising Versioning (9900) I (285) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (331) ovms_main: Executing on CPU core 0 I (331) ovms_main: Mounting CONFIG... W (381) webserver: UpdateGlobalAuthFile: no password set => no auth for web console I (391) ovms_main: Registering default configs... I (391) ovms_main: Starting HOUSEKEEPING... I (391) housekeeping: Initialising HOUSEKEEPING Framework... I (451) housekeeping: Executing on CPU core 1 I (451) housekeeping: reset_reason: cpu0=12, cpu1=12 I (451) housekeeping: Starting PERIPHERALS... I (461) peripherals: Initialising OVMS Peripherals... I (461) peripherals: TCP/IP Adaptor I (471) peripherals: ESP32 system I (471) peripherals: SPI bus I (471) peripherals: MAX7317 I/O Expander I (481) peripherals: ESP32 CAN I (481) peripherals: ESP32 WIFI I (491) peripherals: ESP32 BLUETOOTH I (491) peripherals: ESP32 ADC I (491) peripherals: MCP2515 CAN 1/2 I (511) peripherals: MCP2515 CAN 2/2 I (521) peripherals: SD CARD I (521) peripherals: SIMCOM MODEM I (521) gpio: GPIO[16]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (531) gpio: GPIO[17]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (541) uart: queue free spaces: 10 I (541) ext12v: Powering off external 12V devices I (551) housekeeping: Auto init ext12v (free: 112436 bytes) I (551) ext12v: Powering on external 12V devices I (561) housekeeping: Auto init wifi (free: 112436 bytes) I (561) wifi: wifi firmware version: ebd3e5d I (571) wifi: config NVS flash: enabled I (571) wifi: config nano formating: disabled I (571) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (581) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (601) wifi: Init dynamic tx buffer num: 16 I (601) wifi: Init data frame dynamic rx buffer num: 16 I (601) wifi: Init management frame dynamic rx buffer num: 16 I (601) wifi: wifi driver task: 3ffe61dc, prio:23, stack:4096 I (611) wifi: Init static rx buffer num: 4 I (611) wifi: Init dynamic rx buffer num: 16 I (611) wifi: wifi power manager task: 0x3ffe8974 prio: 21 stack: 2560 I (1331) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 0 I (1331) wifi: mode : sta (30:ae:a4:37:1b:64) + softAP (30:ae:a4:37:1b:65) I (1341) housekeeping: Auto init modem (free: 90292 bytes) I (1351) simcom: State: Enter PoweringOn state I (1351) simcom: Power Cycle I (1351) ovms-mdns: Started MDNS service I (1381) webserver: Launching Web Server I (1381) esp32wifi: AP started with SSID: ovms, MAC: 30:ae:a4:37:1b:65, IP: 192.168.4.1 I (1461) simcom: State: Enter PoweredOn state I (2351) housekeeping: Auto init vehicle (free: 75064 bytes) I (2351) v-teslaroadster: Tesla Roadster v1.x, v2.x and v3.0 vehicle module I (2361) housekeeping: Auto init obd2ecu (free: 69332 bytes) I (2561) housekeeping: Auto init server v2 (free: 60676 bytes) I (2561) ovms-server-v2: OVMS Server V2 registered metric modifier is #1 I (2571) ovms-server-v2: Status: Starting I (2571) ovms-server-v2: OVMS Server v2 running I (2581) housekeeping: Auto init server v3 (free: 56364 bytes) I (2581) housekeeping: Auto init done (free: 56364 bytes) I (2591) housekeeping: Starting USB console... I (2591) uart: queue free spaces: 30 I (2601) version: Set version
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
Looking at the possibly impacting stuff in 2bcbc8e995977c904f5346c44221e07413e56a62: - m_connretry = 2; + Connect(); // Kick off the connection … void OvmsServerV2::NetDown(std::string event, void* data) { + if (m_mgconn) + { + ESP_LOGI(TAG, "Network is down, so disconnect network connection"); + Disconnect(); + } } … void OvmsServerV2::NetmanInit(std::string event, void* data) { - if (m_mgconn == NULL) + if ((m_mgconn == NULL)&&(MyNetManager.m_connected_any)) The main change is to connect immediately, whereas before we delayed two seconds. Perhaps the issue is probably timing related, but also note that this moves the connect logic to the Ticker1() routing (which runs in ovms housekeeping context, I think). I’ve now committed ddcec462ffb355a9da83b12072bc407a5d6517f9 that reverts this behaviour in NetUp() and also now does the same in NetReconfigured() - both delay 2 seconds before attempting reconnection. I’ve also removed the NetDown() disconnect, to let mongoose signal that itself (as it was in 2bcbc8e995977c904f5346c44221e07413e56a62). That said, I don’t actually think this is the issue (more a symptom). I found a bug throughout network manager that was always bringing down mongoose and is probably the root cause of all these issues. This stems from the change to support Access Points and the difference between outbound connectivity (modem / wifi client) and access point connectivity. Very nasty. That would mess up a whole bunch of things (especially anything that still has a handle into mongoose). To fix it, I’ve centralised the definition of m_connected_any (which indicates there is outbound connectivity from either wifi client or modem) and m_network_any (which indicates if we have any network connectivity of any kind - including access points). Also added guards inside StartMongooseTask() and StopMongooseTask() to ensure they only happen if at least one / no networks are up respectively. I suspect that it is this but that was messing up a bunch of other stuff. Also some other cases where interface priority would not get called (or more accurately, we set the correct priority, then the wifi stack changes it incorrectly). All committed and pushed now. It passes my basic tests, but I will continue to test as many combinations as I can. Let’s see if it improves things (could it get worse?)… Regards, Mark.
On 20 Mar 2018, at 5:59 AM, Michael Balzer <dexter@expeedo.de> wrote:
Correction:
Commit 2bcbc8e995977c904f5346c44221e07413e56a62 has broken both AP and client mode as described.
Regards, Michael
Am 19.03.2018 um 22:46 schrieb Michael Balzer:
Too tired to analyse code today, but I've done some bisecting that may be helpful:
- commit 2bcbc8e995977c904f5346c44221e07413e56a62 has broken the AP mode (network completely lost on ppp init)
- commit 17a528bbe4e021768e28251984ad4532e9b745bb has then additionally broken the client mode (same effect, network lost on ppp init)
AP and client mode fully work last in commit b9e57cef60e240745bd93a1b542158d89b878ec2, client mode also with fallback to ppp on losing wifi. With MDNS disabled of course.
AP+Client mode starts correctly in b9e57cef60e240745bd93a1b542158d89b878ec2 but crashes on losing wifi.
Regards, Michael
Am 19.03.2018 um 18:06 schrieb Michael Balzer:
Disabled mDNS again, "module memory" again working without crashes.
Wifi modes client and apclient working again, but mode ap still with the effect of a broken network after ppp init.
Server v2 does not connect, and "ota flash http …" just hangs.
Am 19.03.2018 um 17:49 schrieb Michael Balzer:
Just pulled the latest version, reenabled mDNS.
Server v2 again does not connect, and the module crashes immediately on "module memory" (related?):
I (1239) housekeeping: Auto init wifi (free: 134556 bytes) I (1249) wifi: wifi firmware version: ebd3e5d I (1249) wifi: config NVS flash: enabled I (1259) wifi: config nano formating: disabled I (1259) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1269) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1279) wifi: Init dynamic tx buffer num: 16 I (1279) wifi: Init data frame dynamic rx buffer num: 16 I (1279) wifi: Init management frame dynamic rx buffer num: 16 I (1289) wifi: wifi driver task: 3ffdf3a8, prio:23, stack:4096 I (1289) wifi: Init static rx buffer num: 4 I (1299) wifi: Init dynamic rx buffer num: 16 I (1299) wifi: wifi power manager task: 0x3ffdfe24 prio: 21 stack: 2560 I (2019) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 0 I (2019) wifi: mode : softAP (30:ae:a4:37:25:89) I (2029) housekeeping: Auto init modem (free: 113884 bytes) I (2029) housekeeping: Auto init vehicle (free: 113300 bytes) I (2029) esp32wifi: AP started with SSID: OVMS, MAC: 30:ae:a4:37:25:89, IP: 192.168.4.1 I (2029) webserver: Launching Web Server I (2039) v-twizy: Renault Twizy vehicle module I (2049) v-twizy: battmon subsystem init I (2059) v-twizy: pwrmon subsystem init I (2059) v-twizy: charge subsystem init I (2059) canopen: Worker started on can1 I (2059) telnet: Launching Telnet Server I (2059) v-twizy: sevcon subsystem init I (2069) simcom: State: Enter PoweringOn state I (2069) simcom: Power Cycle I (2069) simcom: State: Enter PoweredOn state I (3069) gsm-nmea: Startup I (3079) housekeeping: Auto init server v2 (free: 71748 bytes) I (3079) ovms-server-v2: OVMS Server V2 registered metric modifier is #2 I (3079) ovms-server-v2: Status: Starting I (3089) ovms-server-v2: OVMS Server v2 running I (3089) housekeeping: Auto init server v3 (free: 67436 bytes) I (3099) housekeeping: Auto init done (free: 67436 bytes) I (3099) housekeeping: Starting USB console... I (3109) uart: queue free spaces: 30 I (3109) ovms-mdns: Starting MDNS
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console I (3149) version: Set version I (12139) simcom: State timeout, transition to 2 I (12139) simcom: State: Enter PoweringOn state I (12139) simcom: Power Cycle I (13149) housekeeping: System considered stable (free: 46388 bytes) I (18139) simcom: State: Enter PoweredOn state OVMS> enable dee4shi! Secure mode I (38159) simcom: State: Enter MuxStart state I (38159) gsm-mux: Start MUX I (38169) gsm-mux: Channel #0 is open I (38179) gsm-mux: Channel #1 is open I (38179) gsm-mux: Channel #2 is open I (38189) gsm-mux: Channel #3 is open I (38199) gsm-mux: Channel #4 is open I (39139) simcom: State: Enter NetWait state I (39139) gsm-nmea: Startup OVMS# mo m Free 8-bit 38380/283224, 32-bit 27544/55820, SPIRAM 0/0 --Task-- Total DRAM D/IRAM IRAM SPIRAM +/- DRAM D/IRAM IRAM SPIRAM no task 5312 0 0 0 +5312 +0 +0 +0 esp_timer 50120 0 644 0 +50120 +0 +644 +0 main 24624 0 0 0 +24624 +0 +0 +0 ipc0 10848 0 0 0 +10848 +0 +0 +0 Housekeeping 35976 61772 0 0 +35976 +61772 +0 +0 tiT 128 1016 0 0 +128 +1016 +0 +0 ipc1 12 0 0 0 +12 +0 +0 +0 NetManTask 16 692 0 0 +16 +692 +0 +0 wifi 32 3392 0 0 +32 +3392 +0 +0 eventTask 0 7532 0 0 +0 +7532 +0 +0 SIMCOMTask 0 4400 0 0 +0 +4400 +0 +0 Tmr Svc 0 2136 0 0 +0 +2136 +0 +0 AsyncConsole 0 20 27488 0 +0 +20 +27488 +0 I (49159) simcom: CREG Network Registration: RegisteredRoaming OVMS# wifi status WiFi Power: on Mode: Access-Point mode
AP SSID: OVMS MAC: 30:ae:a4:37:25:89 IP: 192.168.4.1 AP Stations: 0 I (50139) simcom: State: Enter NetStart state I (51169) simcom: PPP Connection is ready to start I (52139) simcom: State: Enter NetMode state I (52139) gsm-ppp: Initialising... I (54569) gsm-ppp: StatusCallBack: None I (54569) gsm-ppp: status_cb: Connected I (54569) gsm-ppp: our_ipaddr = 10.170.195.13 I (54569) gsm-ppp: his_ipaddr = 10.64.64.64 I (54569) gsm-ppp: netmask = 255.255.255.255 I (54569) gsm-ppp: our6_ipaddr = :: I (54569) netmanager: Set DNS#0 8.8.8.8 I (54569) netmanager: Set DNS#1 8.8.4.4 I (54579) netmanager: Interface priority is pp2 (10.170.195.13/255.255.255.255 gateway 10.64.64.64) I (54579) time: Starting SNTP client I (54579) ovms-server-v2: Network is up, so attempt network connection I (54579) ovms-server-v2: Connection is ovms.dexters-web.de:6867 test1/aeL1aN9j I (54579) ovms-server-v2: Status: Connecting... OVMS# server v2 status Connecting... OVMS# network status Interface#2: pp2 (ifup=1 linkup=1) IPv4: 10.170.195.13/255.255.255.255 gateway 10.64.64.64
Interface#1: ap1 (ifup=1 linkup=1) IPv4: 192.168.4.1/255.255.255.0 gateway 192.168.4.1
Interface#0: lo0 (ifup=1 linkup=1) IPv4: 127.0.0.1/255.0.0.0 gateway 127.0.0.1
DNS: 8.8.8.8 8.8.4.4
Default Interface: pp2 (10.170.195.13/255.255.255.255 gateway 10.64.64.64) OVMS# mo m CORRUPT HEAP: Bad head at 0x3ffcccf0. Expected 0xabba1234 got 0xab003335 assertion "head != NULL" failed: file "/home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c", line 272, function: multi_heap_get_allocated_size abort() was called at PC 0x400f82af on core 1 0x400f82af: __assert_func at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8)
Backtrace: 0x4008f698:0x3fff2c60 0x4008f83b:0x3fff2c80 0x400f82af:0x3fff2ca0 0x4008f39f:0x3fff2cd0 0x40197139:0x3fff2cf0 0x400e7125:0x3fff2d30 0x400e77c7:0x3fff2d50 0x400ed17a:0x3fff2de0 0x400ed271:0x3fff2e10 0x400ed263:0x3fff2e40 0x400ed299:0x3fff2e70 0x400e3074:0x3fff2e90 0x400f0791:0x3fff2eb0 0x400f07f8:0x3fff2f10 0x400e30a3:0x3fff2f50 0x401ca06b:0x3fff2f70 0x400e36b5:0x3fff2f90 0x400e8005:0x3fff2fc0 0x400e81f1:0x3fff2ff0 0x400e3561:0x3fff3010 0x400e3570:0x3fff3030 0x400e6c31:0x3fff3050 0x4008f698: invoke_abort at /home/balzer/esp/esp-idf/components/esp32/./panic.c:648
0x4008f83b: abort at /home/balzer/esp/esp-idf/components/esp32/./panic.c:648
0x400f82af: __assert_func at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8)
0x4008f39f: multi_heap_get_allocated_size at /home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c:326
0x40197139: heap_caps_get_per_task_info at /home/balzer/esp/esp-idf/components/heap/./heap_task_info.c:78
0x400e7125: get_memory(void**, unsigned int) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:751
0x400e77c7: module_memory(int, OvmsWriter*, OvmsCommand*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:751
0x400ed17a: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94
0x400ed271: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94
0x400ed263: OvmsCommand::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94
0x400ed299: OvmsCommandApp::Execute(int, OvmsWriter*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:94
0x400e3074: Execute(microrl*, int, char const* const*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:47
0x400f0791: new_line_handler at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:620
0x400f07f8: microrl_insert_char at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:668
0x400e30a3: OvmsShell::ProcessChar(char) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:70
0x401ca06b: OvmsShell::ProcessChars(char const*, int) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:77 (discriminator 2)
0x400e36b5: ConsoleAsync::HandleDeviceEvent(void*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:169
0x400e8005: OvmsConsole::Poll(unsigned int, void*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:150
0x400e81f1: OvmsConsole::Service() at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:130 (discriminator 1)
0x400e3561: ConsoleAsync::Service() at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:80
0x400e3570: non-virtual thunk to ConsoleAsync::Service() at ??:?
0x400e6c31: TaskBase::Task(void*) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./task_base.cpp:156
Entering gdb stub now. $T0b#e6GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 7.10 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-build_pc-linux-gnu --target=xtensa-esp32-elf". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/> <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/> <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/build/ovms3.elf...done. Remote debugging using /dev/ttyUSB0 0x4008f698 in invoke_abort () at /home/balzer/esp/esp-idf/components/esp32/./panic.c:139 139 *((int *) 0) = 0; (gdb) bt #0 0x4008f698 in invoke_abort () at /home/balzer/esp/esp-idf/components/esp32/./panic.c:139 #1 0x4008f83e in abort () at /home/balzer/esp/esp-idf/components/esp32/./panic.c:148 #2 0x400f82b2 in __assert_func (file=0x3ffb3720 "/home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c", line=272, func=<optimized out>, failedexpr=0x3ffb3710 "head != NULL") at ../../../.././newlib/libc/stdlib/assert.c:63 #3 0x4008f3a2 in multi_heap_get_allocated_size (heap=0x3ffbbe88, p=0x3ffcccfc) at /home/balzer/esp/esp-idf/components/heap/./multi_heap_poisoning.c:272 #4 0x4019713c in heap_caps_get_per_task_info (params=0x40098af4) at /home/balzer/esp/esp-idf/components/heap/./heap_task_info.c:78 #5 0x400e7128 in get_memory (tasks=0x40098ab8, taskslen=0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:500 #6 0x400e77ca in module_memory (verbosity=<optimized out>, writer=<optimized out>, cmd=<optimized out>, argc=<optimized out>, argv=<optimized out>) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:550 #7 0x400ed17d in OvmsCommand::Execute (this=0x3ffc6a44, verbosity=65535, writer=0x3ffef9e4, argc=0, argv=0x0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:281 #8 0x400ed274 in OvmsCommand::Execute (this=0x3ffc69b0, verbosity=65535, writer=0x3ffef9e4, argc=1, argv=0x3fff2eb4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:326 #9 0x400ed266 in OvmsCommand::Execute (this=0x3ffb413c <MyCommandApp+4>, verbosity=65535, writer=0x3ffef9e4, argc=2, argv=0x3fff2eb4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:322 #10 0x400ed29c in OvmsCommandApp::Execute (this=0x3ffb4138 <MyCommandApp>, verbosity=65535, writer=0x3ffef9e4, argc=2, argv=0x3fff2eb0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_command.cpp:648 #11 0x400e3077 in Execute (rl=0x3ffef9f8, argc=2, argv=0x3fff2eb0) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:47 #12 0x400f0794 in new_line_handler (pThis=0x3ffef9f8) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:620 #13 0x400f07fb in microrl_insert_char (pThis=0x3ffef9f8, ch=10) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/microrl/./microrl.c:668 #14 0x400e30a6 in OvmsShell::ProcessChar (this=0x3ffef9e4, c=<optimized out>) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:70 #15 0x401ca06e in OvmsShell::ProcessChars (this=0x3ffef9e4, buf=0x3fff01a5 "a ", '\376' <repeats 198 times>..., len=1) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_shell.cpp:77 #16 0x400e36b8 in ConsoleAsync::HandleDeviceEvent (this=0x3ffef9e4, pEvent=<optimized out>) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:169 #17 0x400e8008 in OvmsConsole::Poll (this=0x3ffef9e4, ticks=4294967295, queue=0x3fff0918) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:150 #18 0x400e81f4 in OvmsConsole::Service (this=0x3ffef9e4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:130 #19 0x400e3564 in ConsoleAsync::Service (this=0x3ffef9e4) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./console_async.cpp:80 #20 0x400e3573 in non-virtual thunk to ConsoleAsync::Service() () #21 0x400e6c34 in TaskBase::Task (object=0x3fff0190) at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./task_base.cpp:156 (gdb)
Am 19.03.2018 um 15:34 schrieb Mark Webb-Johnson:
And MDNS is back.
I looked through the source code and found a mdns_handle_system_event() call that is used to pass all the system events through to MDNS. That then dynamically adds/removed wifi STA and AP interfaces as they come up/down. No need to init and free the mdns system the whole time. Went back to the documentation, and found it right at the bottom… Good grief.
Anyway, I migrated the code to use that. Now, MDNS starts at boot time and stays up all the time. Seems reliable to me, so I committed it.
Regards, Mark
On 19 Mar 2018, at 12:57 PM, Mark Webb-Johnson <mark@webb-johnson.net <mailto:mark@webb-johnson.net>> wrote:
There seems to be something going on internally in lwip regarding this. It is such a dumb implementation anyway, with a separate task and static initialisation of the interface list at the time of startup; really not ideal for a dynamically changing environment. It would be much more sensible to just have a timer and every N seconds iterate through the current interface list to send out MDNS broadcasts on each active one that is suitable for MDNS (wifi only, really).
I think safest for the moment to just disable MDNS. I’ve done that now, and it is running live. That seems to be pretty good for me. Can you see if that works better for you?
I’m still seeing some issues with ssh/telnet startup that I’m looking at now.
Given where we are, I’m going to tell China that we need another 48 hours to confirm the firmware, before I send to them. That buys us some time to get this as stable as we can.
Regards, Mark.
> On 19 Mar 2018, at 12:27 PM, Greg D. <gregd2350@gmail.com <mailto:gregd2350@gmail.com>> wrote: > > > Stephen Casner wrote: >> Greg, the async console is a separate task that should be able to look >> at some things as long as they don't depend upon the networking tasks >> or objects. Is it hung also? >> > Async console? So, not USB. Don't have a connection for that. > > So, tried it again... Note that the wifi connection gets dropped in the middle, but I didn't turn off the hotspot! > > Network status, however, says that it's still connected. That's wrong. > > Stop the server, then start, and this time instead of a hang I get a crash. > > Greg > > > Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console > OVMS> > OVMS> > OVMS> > I (4185) wifi: n:1 1, o:1 0, ap:1 1, sta:1 0, prof:1 > I (4835) wifi: state: init -> auth (b0) > I (4845) wifi: state: auth -> assoc (0) > I (4855) wifi: state: assoc -> run (10) > I (4875) wifi: connected with gregnet3, channel 1 > I (4985) simcom: State: Enter PoweredOn state > I (5915) event: sta ip: 192.168.43.49, mask: 255.255.255.0, gw: 192.168.43.1 > I (5915) netmanager: Set DNS#0 9.9.9.9 > I (5915) netmanager: Set DNS#1 8.8.8.8 > I (5915) netmanager: Interface priority is st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) > I (5915) time: Starting SNTP client > I (5925) ovms-server-v2: Network is up, so attempt network connection > I (5925) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server > I (5925) ovms-server-v2: Status: Connecting... > I (5935) ovms-mdns: Stopped MDNS service > I (5935) ovms-mdns: Started MDNS service > I (5955) esp32wifi: WiFi UP with SSID: gregnet3, MAC: 30:ae:a4:37:1b:64, IP: 192.168.43.49, mask: 255.255.255.0, gw: 192.168.43.1 > I (6395) ovms-server-v2: Connection successful > I (6395) ovms-server-v2: Status: Logging in... > I (6395) ovms-server-v2: Sending server login: MP-C 0 gDAm8Tas7ISVuhmQ8zGDfh hygW8au7zuXDV5qkWYvMIA== ROADSTER_834 > I (6635) ovms-server-v2: Got server response: MP-S 0 ubeiHXgCpUtGX1f6XRXlQK BB2JuaR9oc8TL6Ame7qkEg== > I (6645) ovms-server-v2: Server token is ubeiHXgCpUtGX1f6XRXlQK and digest is BB2JuaR9oc8TL6Ame7qkEg== > I (6645) ovms-server-v2: Status: Server auth ok. Now priming crypto. > I (6645) ovms-server-v2: Shared secret key is ubeiHXgCpUtGX1f6XRXlQKgDAm8Tas7ISVuhmQ8zGDfh (44 bytes) > I (6645) ovms-server-v2: Status: OVMS V2 login successful, and crypto channel established > I (6655) ovms-server-v2: Incoming Msg: MP-0 Z0 > I (7445) ovms-server-v2: Send MP-0 S0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 > I (7445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,7,0,0,0,0,0.269231,0,0,0,0,0 > I (7445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 > I (7445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 > I (7445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,0,1,TR,gregnet3 > I (12625) housekeeping: System considered stable (free: 37872 bytes) > I (22225) ovms-server-v2: Incoming Msg: MP-0 Z1 > I (22225) ovms-server-v2: One or more peers have connected > I (22445) ovms-server-v2: Send MP-0 S0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 > I (22445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,22,0,0,0,0,0.351648,0,0,0,0,0 > I (22445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 > I (22445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 > I (22445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,9,1,TR,gregnet3 > I (24475) simcom: State: Enter MuxStart state > I (24475) gsm-mux: Start MUX > I (24485) gsm-mux: Channel #0 is open > I (24495) gsm-mux: Channel #1 is open > I (24505) gsm-mux: Channel #2 is open > I (24515) gsm-mux: Channel #3 is open > I (24525) gsm-mux: Channel #4 is open > I (25445) simcom: State: Enter NetWait state > I (25745) ovms-server-v2: Incoming Msg: MP-0 Z0 > OVMS> metric set v.b.soc 44 > Metric set > I (35485) simcom: CREG Network Registration: RegisteredRoaming > I (36445) simcom: State: Enter NetStart state > I (37585) simcom: PPP Connection is ready to start > I (38445) simcom: State: Enter NetMode state > I (38445) gsm-ppp: Initialising... > I (40145) ovms-server-v2: Incoming Msg: MP-0 Z1 > I (40145) ovms-server-v2: One or more peers have connected > I (40445) ovms-server-v2: Send MP-0 S44.0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 > I (40445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,40,0,0,0,0,0.28022,0,0,0,0,0 > I (40445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 > I (40445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 > I (40445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,9,1,TR,T-Mobile Hologram > E (40645) ovms-server-v2: Status: Error: Disconnected from OVMS Server V2 > I (41895) gsm-ppp: StatusCallBack: None > I (41895) gsm-ppp: status_cb: Connected > I (41895) gsm-ppp: our_ipaddr = 10.170.146.142 > I (41895) gsm-ppp: his_ipaddr = 10.64.64.64 > I (41895) gsm-ppp: netmask = 255.255.255.255 > I (41895) gsm-ppp: our6_ipaddr = :: > I (41895) netmanager: Set DNS#0 9.9.9.9 > I (41895) netmanager: Set DNS#1 8.8.8.8 > I (41895) netmanager: Interface priority is st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) > I (41895) time: Starting SNTP client > I (41895) ovms-server-v2: Network is up, so attempt network connection > I (41895) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server > I (41895) ovms-server-v2: Status: Connecting... > I (60445) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server > I (60445) ovms-server-v2: Status: Connecting... > I (62565) wifi: bcn_timout,ap_probe_send_start > I (65065) wifi: ap_probe_send over, resett wifi status to disassoc > I (65065) wifi: state: run -> init (1) > I (65065) wifi: n:1 0, o:1 1, ap:1 1, sta:1 0, prof:1 > OVMS> > OVMS> > OVMS> > OVMS> > OVMS> > OVMS> > OVMS> > OVMS> > OVMS> > OVMS> server v2 status > Connecting... > OVMS> network > Interface#3: pp3 (ifup=1 linkup=1) > IPv4: 10.170.146.142/255.255.255.255 <http://10.170.146.142/255.255.255.255> gateway 10.64.64.64 > > Interface#2: ap2 (ifup=1 linkup=1) > IPv4: 192.168.4.1/255.255.255.0 <http://192.168.4.1/255.255.255.0> gateway 192.168.4.1 > > Interface#1: st1 (ifup=1 linkup=1) > IPv4: 192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1 > > Interface#0: lo0 (ifup=1 linkup=1) > IPv4: 127.0.0.1/255.0.0.0 <http://127.0.0.1/255.0.0.0> gateway 127.0.0.1 > > DNS: 9.9.9.9 8.8.8.8 > > Default Interface: st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) > OVMS> simcom > SIMCOM > Network Registration: RegisteredRoaming > State: NetMode > Ticker: 22 > User Data: 0 > > Mux > Status: up > Open Channels: 4 > Framing Errors: 0 > Last RX frame: 19 sec(s) ago > RX frames: 18 > TX frames: 18 > > PPP > Connected on channel: #2 > Last Error: None > > GPS > Status: disabled > Time: disabled > NMEA: GPS/GLONASS Not Connected > OVMS> wifi > WiFi > Power: on > Mode: Access-Point + Client mode > > STA SSID: gregnet3 > MAC: 30:ae:a4:37:1b:64 > IP: 192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> > GW: 192.168.43.1 > > AP SSID: ovms > MAC: 30:ae:a4:37:1b:65 > IP: 192.168.4.1 > AP Stations: 0 > OVMS> server v2 stop > Stopping OVMS Server V2 connection (oscv2) > OVMS> server v2 status > OVMS v2 server has not been started > OVMS> server v2 start > Launching OVMS Server V2 connection (oscv2) > Guru Meditation Error: Core 1 panic'ed (LoadProhibited) > . Exception was unhandled. > Core 1 register dump: > PC : 0x400ee17d PS : 0x00060630 A0 : 0x800ef642 A1 : 0x3fff5020 > A2 : 0xffffffff A3 : 0x3fff2540 A4 : 0x00000000 A5 : 0x3fff5100 > A6 : 0x3fff50e0 A7 : 0x0000000c A8 : 0x800ee179 A9 : 0x3fff4ff0 > A10 : 0xffffffff A11 : 0x3f411528 A12 : 0x3fff5100 A13 : 0x3fff50e0 > A14 : 0x0000000c A15 : 0x3fff1ea4 SAR : 0x00000004 EXCCAUSE: 0x0000001c > EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff > > Backtrace: 0x400ee17d:0x3fff5020 0x400ef63f:0x3fff5060 0x400f04c5:0x3fff50a0 0x40082c71:0x3fff50d0 0x40115696:0x3fff5120 0x401161ef:0x3fff5140 0x40116a7d:0x3fff5330 0x40116aa5:0x3fff5960 0x400eeeb2:0x3fff5980 0x400eefa9:0x3fff59b0 0x400eef9b:0x3fff59e0 0x400eef9b:0x3fff5a10 0x400eefd1:0x3fff5a40 0x400e534c:0x3fff5a60 0x400f1809:0x3fff5a80 0x400f1870:0x3fff5ae0 0x400e537b:0x3fff5b20 0x401eb64f:0x3fff5b40 0x400f0575:0x3fff5b60 0x400ebf8d:0x3fff5b90 0x400ec179:0x3fff5bc0 0x400f0421:0x3fff5be0 0x400f0430:0x3fff5c00 0x400e3295:0x3fff5c20 > > Rebooting... > ets Jun 8 2016 00:22:57 > > rst:0xc (SW_CPU_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT) > configsip: 156795334, SPIWP:0xee > clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 > mode:DIO, clock div:2 > load:0x3fff0018,len:4 > load:0x3fff001c,len:4560 > ho 0 tail 12 room 4 > load:0x40078000,len:0 > load:0x40078000,len:13176 > entry 0x40078d38 > I (647) cpu_start: Pro cpu up. > I (647) cpu_start: Starting app cpu, entry point is 0x40081300 > I (632) cpu_start: App cpu up. > I (651) heap_init: Initializing. RAM available for dynamic allocation: > I (657) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM > I (664) heap_init: At 3FFBBAC0 len 00024540 (145 KiB): DRAM > I (670) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM > I (676) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM > I (684) heap_init: At 40091FDC len 0000E024 (56 KiB): IRAM > I (689) cpu_start: Pro cpu start user code > I (35) ovms_main: Set default logging level for * to INFO > I (35) command: Initialising COMMAND (1000) > I (36) boot: Initialising BOOT (1100) > I (40) boot: Boot #1 reasons for CPU0=12 and CPU1=12 > E (46) boot: Crash #1 detected > I (49) events: Initialising EVENTS (1200) > I (54) config: Initialising CONFIG (1400) > I (59) time: Initialising TIME (1500) > I (64) script: Initialising SCRIPTS (1600) > I (68) script: Using DUKTAPE javascript engine > I (74) metrics: Initialising METRICS (1810) > I (78) metrics: OvmsMetric is 28 bytes > I (82) metrics: OvmsMetricBool is 32 bytes > I (87) metrics: Expanding DUKTAPE javascript engine > I (97) notify: Initialising NOTIFICATIONS (1820) > I (99) notify: Registered notification type info > I (103) notify: Registered notification type error > I (109) notify: Registered notification type alert > I (114) notify: Registered notification type data > I (120) location: Initialising LOCATIONS (1900) > I (126) location: Expanding DUKTAPE javascript engine > I (131) vehicle: Initialising VEHICLE Factory (2000) > I (137) pcp: Initialising POWER (4000) > I (141) max7317: Initialising MAX7317 EGPIO (4200) > I (146) sdcard: Initialising SD CARD (4400) > I (151) ota: Initialising OTA (4400) > I (156) can: Initialising CAN (4500) > I (161) simcom: Initialising SIMCOM (4600) > I (165) test: Initialising TEST (5000) > I (169) ovms-module: Initialising MODULE (5100) > I (174) vfs: Initialising VFS (5200) > I (179) ovms-server: Initialising OVMS Server (6000) > I (184) ovms-server-v2: Initialising OVMS V2 Server (6100) > I (190) ovms-server-v3: Initialising OVMS V3 Server (6200) > I (196) obd2ecu: Initialising OBD2ECU (7000) > I (202) canopen: Initialising CANopen (7000) > I (207) esp32wifi: Initialising ESP32WIFI (8000) > I (212) ovms-mdns: Initialising MDNS (8100) > I (217) webserver: Initialising WEBSERVER (8200) > I (223) telnet: Initialising Telnet (8300) > I (227) ssh: Initialising SSH (8300) > I (231) re: Initialising RE Tools (8800) > I (236) netmanager: Initialising NETMANAGER (8999) > I (242) v-track: Registering Vehicle: TRACK (9000) > I (246) v-teslaroadster: Registering Vehicle: Tesla Roadster (9000) > I (253) v-teslamodels: Registering Vehicle: Tesla Model S (9000) > I (260) v-obdii: Registering Vehicle: OBDII (9000) > I (265) v-none: Registering Vehicle: NONE (9000) > I (271) v-demo: Registering Vehicle: DEMO (9000) > I (276) version: Initialising Versioning (9900) > I (285) cpu_start: Starting scheduler on PRO CPU. > I (0) cpu_start: Starting scheduler on APP CPU. > I (331) ovms_main: Executing on CPU core 0 > I (331) ovms_main: Mounting CONFIG... > W (381) webserver: UpdateGlobalAuthFile: no password set => no auth for web console > I (391) ovms_main: Registering default configs... > I (391) ovms_main: Starting HOUSEKEEPING... > I (391) housekeeping: Initialising HOUSEKEEPING Framework... > I (451) housekeeping: Executing on CPU core 1 > I (451) housekeeping: reset_reason: cpu0=12, cpu1=12 > I (451) housekeeping: Starting PERIPHERALS... > I (461) peripherals: Initialising OVMS Peripherals... > I (461) peripherals: TCP/IP Adaptor > I (471) peripherals: ESP32 system > I (471) peripherals: SPI bus > I (471) peripherals: MAX7317 I/O Expander > I (481) peripherals: ESP32 CAN > I (481) peripherals: ESP32 WIFI > I (491) peripherals: ESP32 BLUETOOTH > I (491) peripherals: ESP32 ADC > I (491) peripherals: MCP2515 CAN 1/2 > I (511) peripherals: MCP2515 CAN 2/2 > I (521) peripherals: SD CARD > I (521) peripherals: SIMCOM MODEM > I (521) gpio: GPIO[16]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 > I (531) gpio: GPIO[17]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 > I (541) uart: queue free spaces: 10 > I (541) ext12v: Powering off external 12V devices > I (551) housekeeping: Auto init ext12v (free: 112436 bytes) > I (551) ext12v: Powering on external 12V devices > I (561) housekeeping: Auto init wifi (free: 112436 bytes) > I (561) wifi: wifi firmware version: ebd3e5d > I (571) wifi: config NVS flash: enabled > I (571) wifi: config nano formating: disabled > I (571) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE > I (581) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE > I (601) wifi: Init dynamic tx buffer num: 16 > I (601) wifi: Init data frame dynamic rx buffer num: 16 > I (601) wifi: Init management frame dynamic rx buffer num: 16 > I (601) wifi: wifi driver task: 3ffe61dc, prio:23, stack:4096 > I (611) wifi: Init static rx buffer num: 4 > I (611) wifi: Init dynamic rx buffer num: 16 > I (611) wifi: wifi power manager task: 0x3ffe8974 prio: 21 stack: 2560 > I (1331) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 0 > I (1331) wifi: mode : sta (30:ae:a4:37:1b:64) + softAP (30:ae:a4:37:1b:65) > I (1341) housekeeping: Auto init modem (free: 90292 bytes) > I (1351) simcom: State: Enter PoweringOn state > I (1351) simcom: Power Cycle > I (1351) ovms-mdns: Started MDNS service > I (1381) webserver: Launching Web Server > I (1381) esp32wifi: AP started with SSID: ovms, MAC: 30:ae:a4:37:1b:65, IP: 192.168.4.1 > I (1461) simcom: State: Enter PoweredOn state > I (2351) housekeeping: Auto init vehicle (free: 75064 bytes) > I (2351) v-teslaroadster: Tesla Roadster v1.x, v2.x and v3.0 vehicle module > I (2361) housekeeping: Auto init obd2ecu (free: 69332 bytes) > I (2561) housekeeping: Auto init server v2 (free: 60676 bytes) > I (2561) ovms-server-v2: OVMS Server V2 registered metric modifier is #1 > I (2571) ovms-server-v2: Status: Starting > I (2571) ovms-server-v2: OVMS Server v2 running > I (2581) housekeeping: Auto init server v3 (free: 56364 bytes) > I (2581) housekeeping: Auto init done (free: 56364 bytes) > I (2591) housekeeping: Starting USB console... > I (2591) uart: queue free spaces: 30 > I (2601) version: Set version > > Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console > > > > _______________________________________________ > OvmsDev mailing list > OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> > http://lists.teslaclub.hk/mailman/listinfo/ovmsdev <http://lists.teslaclub.hk/mailman/listinfo/ovmsdev>
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev <http://lists.teslaclub.hk/mailman/listinfo/ovmsdev>
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev <http://lists.teslaclub.hk/mailman/listinfo/ovmsdev>
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev <http://lists.teslaclub.hk/mailman/listinfo/ovmsdev>
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev <http://lists.teslaclub.hk/mailman/listinfo/ovmsdev>
-- Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal Fon 02333 / 833 5735 * Handy 0176 / 206 989 26 _______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
And for posterity, I found the root cause: https://github.com/espressif/esp-idf/issues/1696 <https://github.com/espressif/esp-idf/issues/1696> mdns_free() calls function _mdns_service_task_stop() mdns_free() --> _mdns_service_task_stop() { MDNS_SERVICE_LOCK() --> Step 1 Post ACTION_TASK_STOP to task and wait on this while loop while (_mdns_service_task_handle) { vTaskDelay(10 / portTICK_PERIOD_MS); } MDNS_SERVICE_UNLOCK(); } on _mdns_service_task() { Wait on queue messages() --> Step 2 if(action == ACTION_TASK_STOP) { break; //exit the task } MDNS_SERVICE_LOCK(); --> Step 3 _mdns_execute_action(a); MDNS_SERVICE_UNLOCK(); } If Step 1 happens and on Step2 if there are other actions pending on queue mdns task will be stuck at Step3 This can be easily reproduced if mdns_service_remove_all() is called just before mdns_free(). (happens 1 in 10 times) Deadlock in MDNS mdns_free() function call. Reportedly 1 in 10 times, but that would be sufficient. We’ve worked around it now, anyway, by not calling mdns_free() any more ;-) Regards, Mark.
On 19 Mar 2018, at 10:34 PM, Mark Webb-Johnson <mark@webb-johnson.net> wrote:
And MDNS is back.
I looked through the source code and found a mdns_handle_system_event() call that is used to pass all the system events through to MDNS. That then dynamically adds/removed wifi STA and AP interfaces as they come up/down. No need to init and free the mdns system the whole time. Went back to the documentation, and found it right at the bottom… Good grief.
Anyway, I migrated the code to use that. Now, MDNS starts at boot time and stays up all the time. Seems reliable to me, so I committed it.
Regards, Mark
On 19 Mar 2018, at 12:57 PM, Mark Webb-Johnson <mark@webb-johnson.net <mailto:mark@webb-johnson.net>> wrote:
There seems to be something going on internally in lwip regarding this. It is such a dumb implementation anyway, with a separate task and static initialisation of the interface list at the time of startup; really not ideal for a dynamically changing environment. It would be much more sensible to just have a timer and every N seconds iterate through the current interface list to send out MDNS broadcasts on each active one that is suitable for MDNS (wifi only, really).
I think safest for the moment to just disable MDNS. I’ve done that now, and it is running live. That seems to be pretty good for me. Can you see if that works better for you?
I’m still seeing some issues with ssh/telnet startup that I’m looking at now.
Given where we are, I’m going to tell China that we need another 48 hours to confirm the firmware, before I send to them. That buys us some time to get this as stable as we can.
Regards, Mark.
On 19 Mar 2018, at 12:27 PM, Greg D. <gregd2350@gmail.com <mailto:gregd2350@gmail.com>> wrote:
Stephen Casner wrote:
Greg, the async console is a separate task that should be able to look at some things as long as they don't depend upon the networking tasks or objects. Is it hung also?
Async console? So, not USB. Don't have a connection for that.
So, tried it again... Note that the wifi connection gets dropped in the middle, but I didn't turn off the hotspot!
Network status, however, says that it's still connected. That's wrong.
Stop the server, then start, and this time instead of a hang I get a crash.
Greg
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console OVMS> OVMS> OVMS> I (4185) wifi: n:1 1, o:1 0, ap:1 1, sta:1 0, prof:1 I (4835) wifi: state: init -> auth (b0) I (4845) wifi: state: auth -> assoc (0) I (4855) wifi: state: assoc -> run (10) I (4875) wifi: connected with gregnet3, channel 1 I (4985) simcom: State: Enter PoweredOn state I (5915) event: sta ip: 192.168.43.49, mask: 255.255.255.0, gw: 192.168.43.1 I (5915) netmanager: Set DNS#0 9.9.9.9 I (5915) netmanager: Set DNS#1 8.8.8.8 I (5915) netmanager: Interface priority is st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) I (5915) time: Starting SNTP client I (5925) ovms-server-v2: Network is up, so attempt network connection I (5925) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (5925) ovms-server-v2: Status: Connecting... I (5935) ovms-mdns: Stopped MDNS service I (5935) ovms-mdns: Started MDNS service I (5955) esp32wifi: WiFi UP with SSID: gregnet3, MAC: 30:ae:a4:37:1b:64, IP: 192.168.43.49, mask: 255.255.255.0, gw: 192.168.43.1 I (6395) ovms-server-v2: Connection successful I (6395) ovms-server-v2: Status: Logging in... I (6395) ovms-server-v2: Sending server login: MP-C 0 gDAm8Tas7ISVuhmQ8zGDfh hygW8au7zuXDV5qkWYvMIA== ROADSTER_834 I (6635) ovms-server-v2: Got server response: MP-S 0 ubeiHXgCpUtGX1f6XRXlQK BB2JuaR9oc8TL6Ame7qkEg== I (6645) ovms-server-v2: Server token is ubeiHXgCpUtGX1f6XRXlQK and digest is BB2JuaR9oc8TL6Ame7qkEg== I (6645) ovms-server-v2: Status: Server auth ok. Now priming crypto. I (6645) ovms-server-v2: Shared secret key is ubeiHXgCpUtGX1f6XRXlQKgDAm8Tas7ISVuhmQ8zGDfh (44 bytes) I (6645) ovms-server-v2: Status: OVMS V2 login successful, and crypto channel established I (6655) ovms-server-v2: Incoming Msg: MP-0 Z0 I (7445) ovms-server-v2: Send MP-0 S0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (7445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,7,0,0,0,0,0.269231,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (7445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,0,1,TR,gregnet3 I (12625) housekeeping: System considered stable (free: 37872 bytes) I (22225) ovms-server-v2: Incoming Msg: MP-0 Z1 I (22225) ovms-server-v2: One or more peers have connected I (22445) ovms-server-v2: Send MP-0 S0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (22445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,22,0,0,0,0,0.351648,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (22445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,9,1,TR,gregnet3 I (24475) simcom: State: Enter MuxStart state I (24475) gsm-mux: Start MUX I (24485) gsm-mux: Channel #0 is open I (24495) gsm-mux: Channel #1 is open I (24505) gsm-mux: Channel #2 is open I (24515) gsm-mux: Channel #3 is open I (24525) gsm-mux: Channel #4 is open I (25445) simcom: State: Enter NetWait state I (25745) ovms-server-v2: Incoming Msg: MP-0 Z0 OVMS> metric set v.b.soc 44 Metric set I (35485) simcom: CREG Network Registration: RegisteredRoaming I (36445) simcom: State: Enter NetStart state I (37585) simcom: PPP Connection is ready to start I (38445) simcom: State: Enter NetMode state I (38445) gsm-ppp: Initialising... I (40145) ovms-server-v2: Incoming Msg: MP-0 Z1 I (40145) ovms-server-v2: One or more peers have connected I (40445) ovms-server-v2: Send MP-0 S44.0,K,0,0,stopped,standard,0,0,0,0,0,0,0,21,0,0,0,0,0.00,0,0,0,0,-1,0,0,0,0,0,0,0,0.00,0.00,0 I (40445) ovms-server-v2: Send MP-0 D0,0,5,0,0,0,0,0,0,40,0,0,0,0,0.28022,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,0 I (40445) ovms-server-v2: Send MP-0 F3.0.991-87-g60cd970/factory/main build (idf v3.1-dev-429-g7f6161cd) Mar 18 2018 20:29:03,,9,1,TR,T-Mobile Hologram E (40645) ovms-server-v2: Status: Error: Disconnected from OVMS Server V2 I (41895) gsm-ppp: StatusCallBack: None I (41895) gsm-ppp: status_cb: Connected I (41895) gsm-ppp: our_ipaddr = 10.170.146.142 I (41895) gsm-ppp: his_ipaddr = 10.64.64.64 I (41895) gsm-ppp: netmask = 255.255.255.255 I (41895) gsm-ppp: our6_ipaddr = :: I (41895) netmanager: Set DNS#0 9.9.9.9 I (41895) netmanager: Set DNS#1 8.8.8.8 I (41895) netmanager: Interface priority is st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) I (41895) time: Starting SNTP client I (41895) ovms-server-v2: Network is up, so attempt network connection I (41895) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (41895) ovms-server-v2: Status: Connecting... I (60445) ovms-server-v2: Connection is tmc.openvehicles.com:6867 <http://tmc.openvehicles.com:6867/> ROADSTER_834/Gdbkt2017server I (60445) ovms-server-v2: Status: Connecting... I (62565) wifi: bcn_timout,ap_probe_send_start I (65065) wifi: ap_probe_send over, resett wifi status to disassoc I (65065) wifi: state: run -> init (1) I (65065) wifi: n:1 0, o:1 1, ap:1 1, sta:1 0, prof:1 OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> OVMS> server v2 status Connecting... OVMS> network Interface#3: pp3 (ifup=1 linkup=1) IPv4: 10.170.146.142/255.255.255.255 <http://10.170.146.142/255.255.255.255> gateway 10.64.64.64
Interface#2: ap2 (ifup=1 linkup=1) IPv4: 192.168.4.1/255.255.255.0 <http://192.168.4.1/255.255.255.0> gateway 192.168.4.1
Interface#1: st1 (ifup=1 linkup=1) IPv4: 192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1
Interface#0: lo0 (ifup=1 linkup=1) IPv4: 127.0.0.1/255.0.0.0 <http://127.0.0.1/255.0.0.0> gateway 127.0.0.1
DNS: 9.9.9.9 8.8.8.8
Default Interface: st1 (192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> gateway 192.168.43.1) OVMS> simcom SIMCOM Network Registration: RegisteredRoaming State: NetMode Ticker: 22 User Data: 0
Mux Status: up Open Channels: 4 Framing Errors: 0 Last RX frame: 19 sec(s) ago RX frames: 18 TX frames: 18
PPP Connected on channel: #2 Last Error: None
GPS Status: disabled Time: disabled NMEA: GPS/GLONASS Not Connected OVMS> wifi WiFi Power: on Mode: Access-Point + Client mode
STA SSID: gregnet3 MAC: 30:ae:a4:37:1b:64 IP: 192.168.43.49/255.255.255.0 <http://192.168.43.49/255.255.255.0> GW: 192.168.43.1
AP SSID: ovms MAC: 30:ae:a4:37:1b:65 IP: 192.168.4.1 AP Stations: 0 OVMS> server v2 stop Stopping OVMS Server V2 connection (oscv2) OVMS> server v2 status OVMS v2 server has not been started OVMS> server v2 start Launching OVMS Server V2 connection (oscv2) Guru Meditation Error: Core 1 panic'ed (LoadProhibited) . Exception was unhandled. Core 1 register dump: PC : 0x400ee17d PS : 0x00060630 A0 : 0x800ef642 A1 : 0x3fff5020 A2 : 0xffffffff A3 : 0x3fff2540 A4 : 0x00000000 A5 : 0x3fff5100 A6 : 0x3fff50e0 A7 : 0x0000000c A8 : 0x800ee179 A9 : 0x3fff4ff0 A10 : 0xffffffff A11 : 0x3f411528 A12 : 0x3fff5100 A13 : 0x3fff50e0 A14 : 0x0000000c A15 : 0x3fff1ea4 SAR : 0x00000004 EXCCAUSE: 0x0000001c EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff
Backtrace: 0x400ee17d:0x3fff5020 0x400ef63f:0x3fff5060 0x400f04c5:0x3fff50a0 0x40082c71:0x3fff50d0 0x40115696:0x3fff5120 0x401161ef:0x3fff5140 0x40116a7d:0x3fff5330 0x40116aa5:0x3fff5960 0x400eeeb2:0x3fff5980 0x400eefa9:0x3fff59b0 0x400eef9b:0x3fff59e0 0x400eef9b:0x3fff5a10 0x400eefd1:0x3fff5a40 0x400e534c:0x3fff5a60 0x400f1809:0x3fff5a80 0x400f1870:0x3fff5ae0 0x400e537b:0x3fff5b20 0x401eb64f:0x3fff5b40 0x400f0575:0x3fff5b60 0x400ebf8d:0x3fff5b90 0x400ec179:0x3fff5bc0 0x400f0421:0x3fff5be0 0x400f0430:0x3fff5c00 0x400e3295:0x3fff5c20
Rebooting... ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT) configsip: 156795334, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:4560 ho 0 tail 12 room 4 load:0x40078000,len:0 load:0x40078000,len:13176 entry 0x40078d38 I (647) cpu_start: Pro cpu up. I (647) cpu_start: Starting app cpu, entry point is 0x40081300 I (632) cpu_start: App cpu up. I (651) heap_init: Initializing. RAM available for dynamic allocation: I (657) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (664) heap_init: At 3FFBBAC0 len 00024540 (145 KiB): DRAM I (670) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM I (676) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (684) heap_init: At 40091FDC len 0000E024 (56 KiB): IRAM I (689) cpu_start: Pro cpu start user code I (35) ovms_main: Set default logging level for * to INFO I (35) command: Initialising COMMAND (1000) I (36) boot: Initialising BOOT (1100) I (40) boot: Boot #1 reasons for CPU0=12 and CPU1=12 E (46) boot: Crash #1 detected I (49) events: Initialising EVENTS (1200) I (54) config: Initialising CONFIG (1400) I (59) time: Initialising TIME (1500) I (64) script: Initialising SCRIPTS (1600) I (68) script: Using DUKTAPE javascript engine I (74) metrics: Initialising METRICS (1810) I (78) metrics: OvmsMetric is 28 bytes I (82) metrics: OvmsMetricBool is 32 bytes I (87) metrics: Expanding DUKTAPE javascript engine I (97) notify: Initialising NOTIFICATIONS (1820) I (99) notify: Registered notification type info I (103) notify: Registered notification type error I (109) notify: Registered notification type alert I (114) notify: Registered notification type data I (120) location: Initialising LOCATIONS (1900) I (126) location: Expanding DUKTAPE javascript engine I (131) vehicle: Initialising VEHICLE Factory (2000) I (137) pcp: Initialising POWER (4000) I (141) max7317: Initialising MAX7317 EGPIO (4200) I (146) sdcard: Initialising SD CARD (4400) I (151) ota: Initialising OTA (4400) I (156) can: Initialising CAN (4500) I (161) simcom: Initialising SIMCOM (4600) I (165) test: Initialising TEST (5000) I (169) ovms-module: Initialising MODULE (5100) I (174) vfs: Initialising VFS (5200) I (179) ovms-server: Initialising OVMS Server (6000) I (184) ovms-server-v2: Initialising OVMS V2 Server (6100) I (190) ovms-server-v3: Initialising OVMS V3 Server (6200) I (196) obd2ecu: Initialising OBD2ECU (7000) I (202) canopen: Initialising CANopen (7000) I (207) esp32wifi: Initialising ESP32WIFI (8000) I (212) ovms-mdns: Initialising MDNS (8100) I (217) webserver: Initialising WEBSERVER (8200) I (223) telnet: Initialising Telnet (8300) I (227) ssh: Initialising SSH (8300) I (231) re: Initialising RE Tools (8800) I (236) netmanager: Initialising NETMANAGER (8999) I (242) v-track: Registering Vehicle: TRACK (9000) I (246) v-teslaroadster: Registering Vehicle: Tesla Roadster (9000) I (253) v-teslamodels: Registering Vehicle: Tesla Model S (9000) I (260) v-obdii: Registering Vehicle: OBDII (9000) I (265) v-none: Registering Vehicle: NONE (9000) I (271) v-demo: Registering Vehicle: DEMO (9000) I (276) version: Initialising Versioning (9900) I (285) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (331) ovms_main: Executing on CPU core 0 I (331) ovms_main: Mounting CONFIG... W (381) webserver: UpdateGlobalAuthFile: no password set => no auth for web console I (391) ovms_main: Registering default configs... I (391) ovms_main: Starting HOUSEKEEPING... I (391) housekeeping: Initialising HOUSEKEEPING Framework... I (451) housekeeping: Executing on CPU core 1 I (451) housekeeping: reset_reason: cpu0=12, cpu1=12 I (451) housekeeping: Starting PERIPHERALS... I (461) peripherals: Initialising OVMS Peripherals... I (461) peripherals: TCP/IP Adaptor I (471) peripherals: ESP32 system I (471) peripherals: SPI bus I (471) peripherals: MAX7317 I/O Expander I (481) peripherals: ESP32 CAN I (481) peripherals: ESP32 WIFI I (491) peripherals: ESP32 BLUETOOTH I (491) peripherals: ESP32 ADC I (491) peripherals: MCP2515 CAN 1/2 I (511) peripherals: MCP2515 CAN 2/2 I (521) peripherals: SD CARD I (521) peripherals: SIMCOM MODEM I (521) gpio: GPIO[16]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (531) gpio: GPIO[17]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (541) uart: queue free spaces: 10 I (541) ext12v: Powering off external 12V devices I (551) housekeeping: Auto init ext12v (free: 112436 bytes) I (551) ext12v: Powering on external 12V devices I (561) housekeeping: Auto init wifi (free: 112436 bytes) I (561) wifi: wifi firmware version: ebd3e5d I (571) wifi: config NVS flash: enabled I (571) wifi: config nano formating: disabled I (571) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (581) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (601) wifi: Init dynamic tx buffer num: 16 I (601) wifi: Init data frame dynamic rx buffer num: 16 I (601) wifi: Init management frame dynamic rx buffer num: 16 I (601) wifi: wifi driver task: 3ffe61dc, prio:23, stack:4096 I (611) wifi: Init static rx buffer num: 4 I (611) wifi: Init dynamic rx buffer num: 16 I (611) wifi: wifi power manager task: 0x3ffe8974 prio: 21 stack: 2560 I (1331) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 0 I (1331) wifi: mode : sta (30:ae:a4:37:1b:64) + softAP (30:ae:a4:37:1b:65) I (1341) housekeeping: Auto init modem (free: 90292 bytes) I (1351) simcom: State: Enter PoweringOn state I (1351) simcom: Power Cycle I (1351) ovms-mdns: Started MDNS service I (1381) webserver: Launching Web Server I (1381) esp32wifi: AP started with SSID: ovms, MAC: 30:ae:a4:37:1b:65, IP: 192.168.4.1 I (1461) simcom: State: Enter PoweredOn state I (2351) housekeeping: Auto init vehicle (free: 75064 bytes) I (2351) v-teslaroadster: Tesla Roadster v1.x, v2.x and v3.0 vehicle module I (2361) housekeeping: Auto init obd2ecu (free: 69332 bytes) I (2561) housekeeping: Auto init server v2 (free: 60676 bytes) I (2561) ovms-server-v2: OVMS Server V2 registered metric modifier is #1 I (2571) ovms-server-v2: Status: Starting I (2571) ovms-server-v2: OVMS Server v2 running I (2581) housekeeping: Auto init server v3 (free: 56364 bytes) I (2581) housekeeping: Auto init done (free: 56364 bytes) I (2591) housekeeping: Starting USB console... I (2591) uart: queue free spaces: 30 I (2601) version: Set version
Welcome to the Open Vehicle Monitoring System (OVMS) - Async Console
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk <mailto:OvmsDev@lists.teslaclub.hk> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev <http://lists.teslaclub.hk/mailman/listinfo/ovmsdev>
_______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
Greg, Sorry, your message got trapped by one of my spam filters, so here is a late reply: On Sun, 18 Mar 2018, Greg D. wrote:
Stephen Casner wrote:
Greg, the async console is a separate task that should be able to look at some things as long as they don't depend upon the networking tasks or objects. Is it hung also?
Async console? So, not USB. Don't have a connection for that.
The USB connection is the async console, as it says in its welcome banner. My idea was that if the condition you want to test includes the wifi network being up, then you could use telnet or ssh to get another console and issue the command that would hang in that console. Then you should be able to still get a response to input on the async (USB) console. The 'module tasks' command does not yet show anything about the task state (other than that it exists), but maybe I can add that. -- Steve
Ok, no problem. Thanks for the reply. I had tried toggling the wifi hotspot, to see if the module was still actively doing anything. It would not re-connect, so I'm guessing that the low level stuff was active (keeping the beacon alive), but higher level tasks were hung. Will try telnet next time. Good suggestion. Greg Stephen Casner wrote:
Greg,
Sorry, your message got trapped by one of my spam filters, so here is a late reply:
On Sun, 18 Mar 2018, Greg D. wrote:
Stephen Casner wrote:
Greg, the async console is a separate task that should be able to look at some things as long as they don't depend upon the networking tasks or objects. Is it hung also?
Async console? So, not USB. Don't have a connection for that. The USB connection is the async console, as it says in its welcome banner.
My idea was that if the condition you want to test includes the wifi network being up, then you could use telnet or ssh to get another console and issue the command that would hang in that console. Then you should be able to still get a response to input on the async (USB) console. The 'module tasks' command does not yet show anything about the task state (other than that it exists), but maybe I can add that.
-- Steve _______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
I'm seeing a side-effect of restarting mdns. I had my module connected to wifi, and metrics were begin received by the server / phone. A few moments later, the modem connects, and mdns is restarted. At that point, the module still thinks it connected to the server, but the server knows otherwise... No updates are received, and restarting the app shows the antenna dark. A few minutes later the server is reported disconnected. In this run, the modem never fully connected (no IP address), so that wasn't working. Re-enabled the wifi hotspot, and the module shows it's associated and has an IP, but it just sits there, never reconnecting to the server. Seems like we're short one domino in the chain somewhere. Greg Stephen Casner wrote:
On Sun, 18 Mar 2018, Michael Balzer wrote:
From a first look at the mdns code in your backtrace, I would guess that's a double free() for the timer, it seems the timer_handle never gets NULLed. That may be a bug (deficiency) in the esp-idf mDNS code.
Perhaps I hit it because OvmsMDNS::StopMDNS was called without everything coming up correctly first?
-- Steve _______________________________________________ OvmsDev mailing list OvmsDev@lists.teslaclub.hk http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
participants (4)
-
Greg D. -
Mark Webb-Johnson -
Michael Balzer -
Stephen Casner