openvehicles / open-vehicle-monitoring-system-3 Goto Github PK
View Code? Open in Web Editor NEWOpen Vehicle Monitoring System - Version 3
Home Page: http:///www.openvehicles.com/
License: Other
Open Vehicle Monitoring System - Version 3
Home Page: http:///www.openvehicles.com/
License: Other
Add support for a SMS command gateway
The charge mode mappings should be:
0: standard
1: storage
3: range
4: performance
Effects: "ota status" cannot fetch the version info, times out after 10 seconds. Same with "ota flash http".
Apparently this happens only when the total HTTP transfer size is larger than 1K, i.e. a file with 600 byte body can be fetched, a file with 750 bytes fails.
It seems the select() in OvmsBuffer::PollSocket() times out on the second block, despite the ppp component receiving data:
D (458063) net: Connect: DNS lookup for host 'api.openvehicles.com'
D (458063) net: Connect: Server api.openvehicles.com is at 202.52.43.188
V (458063) gsm-ppp: tx: 7e 21 45 00 00 2c 00 d4 00 00 ff 06 4d a0 0a 78 | ~!E..,......M..x
V (458063) gsm-ppp: tx: 6c ef ca 34 2b bc d4 86 00 50 00 00 27 42 00 00 | l..4+....P..'B..
V (458063) gsm-ppp: tx: 00 00 60 02 16 70 18 5e 00 00 02 04 05 9c 8e aa | ..`..p.^........
V (458063) gsm-ppp: tx: 7e | ~
V (459033) gsm-ppp: rx: 7e 21 45 00 00 2c 00 00 40 00 2f 06 de 74 ca 34 | ~!E..,..@./..t.4
V (459043) gsm-ppp: rx: 2b bc 0a 78 6c ef 00 50 d4 86 58 30 ec da 00 00 | +..xl..P..X0....
V (459043) gsm-ppp: rx: 27 43 60 12 72 10 77 89 00 00 02 04 05 b4 5f 90 | 'C`.r.w......._.
V (459053) gsm-ppp: rx: 7e | ~
V (459053) gsm-ppp: tx: 7e 21 45 00 00 28 00 d5 00 00 ff 06 4d a3 0a 78 | ~!E..(......M..x
V (459053) gsm-ppp: tx: 6c ef ca 34 2b bc d4 86 00 50 00 00 27 43 58 30 | l..4+....P..'CX0
V (459053) gsm-ppp: tx: ec db 50 10 16 70 ea e6 00 00 eb bb 7e | ..P..p......~
D (459063) http: Request: method 'GET' server 'api.openvehicles.com' path '/firmware/ota/v3.1/main/ovms3.ver'
V (459063) gsm-ppp: tx: 7e 21 45 00 00 8a 00 d6 00 00 ff 06 4d 40 0a 78 | [email protected]
V (459063) gsm-ppp: tx: 6c ef ca 34 2b bc d4 86 00 50 00 00 27 43 58 30 | l..4+....P..'CX0
V (459063) gsm-ppp: tx: ec db 50 18 16 70 08 0c 00 00 47 45 54 20 2f 66 | ..P..p....GET /f
V (459063) gsm-ppp: tx: 69 72 6d 77 61 72 65 2f 6f 74 61 2f 76 33 2e 31 | irmware/ota/v3.1
V (459063) gsm-ppp: tx: 2f 6d 61 69 6e 2f 6f 76 6d 73 33 2e 76 65 72 20 | /main/ovms3.ver
V (459063) gsm-ppp: tx: 48 54 54 50 2f 31 2e 30 0d 0a 48 6f 73 74 3a 20 | HTTP/1.0..Host:
V (459063) gsm-ppp: tx: 61 70 69 2e 6f 70 65 6e 76 65 68 69 63 6c 65 73 | api.openvehicles
V (459063) gsm-ppp: tx: 2e 63 6f 6d 0d 0a 55 73 65 72 2d 41 67 65 6e 74 | .com..User-Agent
V (459063) gsm-ppp: tx: 3a 20 6f 76 6d 73 2f 33 0d 0a 0d 0a c6 c1 7e | : ovms/3......~
D (459073) http: Reading headers...
V (461743) gsm-ppp: tx: 7e 21 45 00 00 8a 00 d7 00 00 ff 06 4d 3f 0a 78 | ~!E.........M?.x
V (461743) gsm-ppp: tx: 6c ef ca 34 2b bc d4 86 00 50 00 00 27 43 58 30 | l..4+....P..'CX0
V (461743) gsm-ppp: tx: ec db 50 18 16 70 08 0c 00 00 47 45 54 20 2f 66 | ..P..p....GET /f
V (461743) gsm-ppp: tx: 69 72 6d 77 61 72 65 2f 6f 74 61 2f 76 33 2e 31 | irmware/ota/v3.1
V (461743) gsm-ppp: tx: 2f 6d 61 69 6e 2f 6f 76 6d 73 33 2e 76 65 72 20 | /main/ovms3.ver
V (461743) gsm-ppp: tx: 48 54 54 50 2f 31 2e 30 0d 0a 48 6f 73 74 3a 20 | HTTP/1.0..Host:
V (461743) gsm-ppp: tx: 61 70 69 2e 6f 70 65 6e 76 65 68 69 63 6c 65 73 | api.openvehicles
V (461743) gsm-ppp: tx: 2e 63 6f 6d 0d 0a 55 73 65 72 2d 41 67 65 6e 74 | .com..User-Agent
V (461743) gsm-ppp: tx: 3a 20 6f 76 6d 73 2f 33 0d 0a 0d 0a 79 21 7e | : ovms/3....y!~
V (462093) gsm-ppp: rx: 7e 21 45 00 00 28 55 ba 40 00 2f 06 88 be ca 34 | ~!E..(U.@./....4
V (462093) gsm-ppp: rx: 2b bc 0a 78 6c ef 00 50 d4 86 58 30 ec db 00 00 | +..xl..P..X0....
V (462103) gsm-ppp: rx: 27 a5 50 10 72 10 8e e4 00 00 02 b3 7e | '.P.r.......~
V (462213) gsm-ppp: rx: 7e 21 45 00 05 1c 55 bb 40 00 2f 06 83 c9 ca 34 | ~!E...U.@./....4
V (462213) gsm-ppp: rx: 2b bc 0a 78 6c ef 00 50 d4 86 58 30 ec db 00 00 | +..xl..P..X0....
V (462223) gsm-ppp: rx: 27 a5 50 18 72 10 de ad 00 00 48 54 54 50 2f 31 | '.P.r.....HTTP/1
V (462223) gsm-ppp: rx: 2e 31 20 32 30 30 20 4f 4b 0d 0a 44 61 74 65 3a | .1 200 OK..Date:
V (462233) gsm-ppp: rx: 20 54 68 75 2c 20 31 39 20 41 70 72 20 32 30 31 | Thu, 19 Apr 201
V (462233) gsm-ppp: rx: 38 20 31 35 3a 34 36 3a 31 31 20 47 4d 54 0d 0a | 8 15:46:11 GMT..
V (462243) gsm-ppp: rx: 53 65 72 76 65 72 3a 20 41 70 61 63 68 65 0d 0a | Server: Apache..
V (462243) gsm-ppp: rx: 58 2d 43 6f 6e 74 65 6e 74 2d 54 79 70 65 2d 4f | X-Content-Type-O
V (462253) gsm-ppp: rx: 70 74 69 6f 6e 73 3a 20 6e 6f 73 6e 69 66 66 0d | ptions: nosniff.
V (462253) gsm-ppp: rx: 0a 4c 61 73 74 2d 4d 6f 64 69 66 69 65 64 3a 20 | .Last-Modified:
V (462263) gsm-ppp: rx: 54 75 65 2c 20 31 37 20 41 70 72 20 32 30 31 38 | Tue, 17 Apr 2018
V (462263) gsm-ppp: rx: 20 30 30 3a 33 38 3a 32 35 20 47 4d 54 0d 0a 45 | 00:38:25 GMT..E
V (462273) gsm-ppp: rx: 54 61 67 3a 20 22 33 62 63 2d 35 36 61 30 30 38 | Tag: "3bc-56a008
V (462273) gsm-ppp: rx: 65 36 37 61 37 34 63 22 0d 0a 41 63 63 65 70 74 | e67a74c"..Accept
V (462283) gsm-ppp: rx: 2d 52 61 6e 67 65 73 3a 20 62 79 74 65 73 0d 0a | -Ranges: bytes..
V (462283) gsm-ppp: rx: 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 | Content-Length:
V (462293) gsm-ppp: rx: 39 35 36 0d 0a 43 61 63 68 65 2d 43 6f 6e 74 72 | 956..Cache-Contr
V (462293) gsm-ppp: rx: 6f 6c 3a 20 6d 61 78 2d 61 67 65 3d 31 32 30 39 | ol: max-age=1209
V (462303) gsm-ppp: rx: 36 30 30 0d 0a 45 78 70 69 72 65 73 3a 20 54 68 | 600..Expires: Th
V (462303) gsm-ppp: rx: 75 2c 20 30 33 20 4d 61 79 20 32 30 31 38 20 31 | u, 03 May 2018 1
V (462313) gsm-ppp: rx: 35 3a 34 36 3a 31 31 20 47 4d 54 0d 0a 43 6f 6e | 5:46:11 GMT..Con
V (462313) gsm-ppp: rx: 6e 65 63 74 69 6f 6e 3a 20 63 6c 6f 73 65 0d 0a | nection: close..
V (462323) gsm-ppp: rx: 0d 0a 33 2e 31 2e 30 30 34 0a 4f 54 41 20 72 65 | ..3.1.004.OTA re
V (462323) gsm-ppp: rx: 6c 65 61 73 65 20 70 72 6f 76 69 64 69 6e 67 20 | lease providing
V (462333) gsm-ppp: rx: 6d 69 6e 6f 72 20 69 6d 70 72 6f 76 65 6d 65 6e | minor improvemen
V (462333) gsm-ppp: rx: 74 73 20 61 6e 64 20 66 69 78 65 73 2e 0a 0a 2d | ts and fixes...-
V (462343) gsm-ppp: rx: 20 54 65 73 6c 61 20 4d 6f 64 65 6c 20 53 3a 20 | Tesla Model S:
V (462343) gsm-ppp: rx: 41 64 64 20 73 75 70 70 6f 72 74 20 66 6f 72 20 | Add support for
V (462353) gsm-ppp: rx: 76 2e 62 61 74 2e 73 6f 63 2c 20 76 2e 70 6f 73 | v.bat.soc, v.pos
V (462353) gsm-ppp: rx: 2e 73 70 65 65 64 20 61 6e 64 20 70 61 72 6b 2f | .speed and park/
V (462363) gsm-ppp: rx: 64 72 69 76 65 20 73 74 61 74 75 73 20 6d 65 74 | drive status met
V (462363) gsm-ppp: rx: 72 69 63 73 0a 2d 20 54 65 73 6c 61 20 52 6f 61 | rics.- Tesla Roa
V (462373) gsm-ppp: rx: 64 73 74 65 72 3a 20 46 69 78 65 73 20 66 6f 72 | dster: Fixes for
V (462373) gsm-ppp: rx: 20 63 68 61 72 67 65 2f 64 72 69 76 65 20 6d 6f | charge/drive mo
V (462383) gsm-ppp: rx: 64 65 20 6f 6e 20 76 31 2e 78 20 61 6e 64 20 76 | de on v1.x and v
V (462383) gsm-ppp: rx: 32 2e 78 20 63 61 72 73 0a 2d 20 53 44 20 43 41 | 2.x cars.- SD CA
V (462393) gsm-ppp: rx: 52 44 3a 20 50 72 6f 76 69 64 65 20 63 6f 6e 66 | RD: Provide conf
V (462393) gsm-ppp: rx: 69 67 75 72 61 62 6c 65 20 73 64 63 61 72 64 20 | igurable sdcard
V (462403) gsm-ppp: rx: 70 61 72 61 6d 65 74 65 72 73 3a 0a 20 20 20 20 | parameters:.
V (462403) gsm-ppp: rx: 73 64 63 61 72 64 20 5b 6d 61 78 66 72 65 71 2e | sdcard [maxfreq.
V (462413) gsm-ppp: rx: 6b 68 7a 5d 20 3d 20 31 36 30 30 30 20 20 20 20 | khz] = 16000
V (462413) gsm-ppp: rx: 20 20 20 20 20 4d 61 78 69 6d 75 6d 20 66 72 65 | Maximum fre
V (462413) gsm-ppp: rx: 71 75 65 6e 63 79 20 28 69 6e 20 6b 48 7a 29 20 | quency (in kHz)
V (462413) gsm-ppp: rx: 6f 66 20 53 44 20 43 41 52 44 20 62 75 73 0a 20 | of SD CARD bus.
V (462423) gsm-ppp: rx: 20 20 20 73 64 63 61 72 64 20 5b 61 75 74 6f 6d | sdcard [autom
V (462423) gsm-ppp: rx: 6f 75 6e 74 5d 20 3d 20 79 65 73 20 20 20 20 20 | ount] = yes
V (462433) gsm-ppp: rx: 20 20 20 20 20 20 20 20 41 75 74 6f 6d 61 74 69 | Automati
V (462433) gsm-ppp: rx: 63 61 6c 6c 79 20 6d 6f 75 6e 74 20 53 44 20 43 | cally mount SD C
V (462443) gsm-ppp: rx: 41 52 44 20 6f 6e 20 69 6e 73 65 72 74 69 6f 6e | ARD on insertion
V (462443) gsm-ppp: rx: 0a 2d 20 42 6f 6f 74 3a 20 73 74 6f 72 65 20 26 | .- Boot: store &
V (462453) gsm-ppp: rx: 20 73 65 6e 64 20 63 72 61 73 68 20 64 65 62 75 | send crash debu
V (462453) gsm-ppp: rx: 67 20 69 6e 66 6f 20 28 2a 2d 4f 56 4d 2d 44 65 | g info (*-OVM-De
V (462463) gsm-ppp: rx: 62 75 67 43 72 61 73 68 20 72 65 63 6f 72 64 73 | bugCrash records
V (462463) gsm-ppp: rx: 29 0a 2d 20 4f 54 41 3a 20 53 75 70 70 6f 72 74 | ).- OTA: Support
V (462473) gsm-ppp: rx: 20 66 6f 72 20 63 6f 6e 66 69 67 75 72 61 62 6c | for configurabl
V (462473) gsm-ppp: rx: 65 20 72 65 6c 65 61 73 65 20 74 61 67 20 61 6e | e release tag an
V (462483) gsm-ppp: rx: 64 20 73 65 72 76 65 72 20 55 52 4c 0a 20 20 20 | d server URL.
V (462483) gsm-ppp: rx: 20 6f 74 61 20 5b 74 61 67 5d 20 3d 20 6d 61 69 | ota [tag] = mai
V (462493) gsm-ppp: rx: 6e 0a 20 20 20 20 6f 74 61 20 5b 73 65 72 76 65 | n. ota [serve
V (462493) gsm-ppp: rx: 72 5d 20 3d 20 61 70 69 2e 6f 70 65 6e 76 65 68 | r] = api.openveh
V (462503) gsm-ppp: rx: 69 63 6c 65 73 2e 63 6f 6d 2f 66 69 72 6d 77 61 | icles.com/firmwa
V (462503) gsm-ppp: rx: 72 65 2f 6f 74 61 0a 2d 20 57 69 66 69 3a 20 49 | re/ota.- Wifi: I
V (462513) gsm-ppp: rx: 6e 63 72 65 61 73 65 20 73 63 61 6e 20 72 65 73 | ncrease scan res
V (462513) gsm-ppp: rx: 70 6f 6e 73 69 76 65 6e 65 73 73 20 28 36 30 20 | ponsiveness (60
V (462523) gsm-ppp: rx: 7e 21 45 00 00 28 55 bc 40 00 2f 06 88 bc ca 34 | ~!E..(U.@./....4
V (462523) gsm-ppp: rx: 2b bc 0a 78 6c ef 00 50 d4 86 58 30 f1 cf 00 00 | +..xl..P..X0....
V (462533) gsm-ppp: rx: 27 a5 50 11 72 10 89 ef 00 00 36 7d 5e 7e | '.P.r.....6}^~
V (462533) gsm-ppp: tx: 7e 21 45 00 00 28 00 d8 00 00 ff 06 4d a0 0a 78 | ~!E..(......M..x
V (462533) gsm-ppp: tx: 6c ef ca 34 2b bc d4 86 00 50 00 00 27 a5 58 30 | l..4+....P..'.X0
V (462533) gsm-ppp: tx: ec db 50 10 16 70 ea 84 00 00 f4 55 7e | ..P..p.....U~
E (469073) buffer: PollSocket: select result 0 = Timeout
D (469073) http: Now buffered 0 bytes
We need a firewall for sensitive exposed services (such as retools can, ssh, telnet, webserver, etc).
A simple approach is to validate the destination address of the call, to ensure it is the IP address of a wifi interface (not ppp).
This should be configurable enabled/disabled, with the default be enabled.
Code still needs to be ported from V2.
V2 code was rather limited on this, monitoring two fixed SDO registers.
V3 can do better, i.e. introduce a config param to specify multiple SDOs + subindex ranges + poll frequencies. Possibly also map SDO values to metrics?
The park time variable is not being sent correctly. Fix.
Add support for notifications on charge and other standard events.
Add support for SMS notifications.
Either based on EDS files or on the online dictionary provided by a capable device (i.e. SEVCON register 0x5630), a generic DCF download and upload feature can be provided.
A DCF download implementation is already available as a perl script in the V2 repository:
https://github.com/openvehicles/Open-Vehicle-Monitoring-System/blob/master/client/diagmode/dcf_download.pl
Add support for digital speedometer in Tesla Roadster vehicle module.
Affects Android, others not yet tested
The shell in the web browser interface seems to auto-capitalise on iPhones.
for a possible solution:
<input type="text" autocorrect="off" autocapitalize="none">
The current approach when showing ota status and server firmware version available is to only do that if a wifi network connection is available. This change will also do that if a modem network connection is available (ie; MyNetManager.m_connected_any).
Add support for charge time predictor in Tesla Roadster vehicle module.
The web login is not secure, so in Safari the nav bar changes to "Website not secure" when the focus goes to the username field. This is really not good enough for users. What is needed to support https?
Scan a plugin directory for html files and include them as buttons on the home page and in a menu.
Provide a plugin editor.
We already discussed this on the developer list, it still happens with 3.1.004.
I (724433) wifi: bcn_timout,ap_probe_send_start
I (726943) wifi: ap_probe_send over, resett wifi status to disassoc
I (726943) wifi: state: run -> init (1)
I (726943) wifi: n:1 0, o:1 1, ap:1 1, sta:1 0, prof:1
I (726943) netmanager: Interface priority is pp3 (10.170.195.13/255.255.255.255 gateway 10.64.64.64)
I (726953) netmanager: WIFI client down (with MODEM up): reconfigured for MODEM priority
I (726953) time: Network was reconfigured: restarting SNTP client
I (726953) ovms-server-v2: Network was reconfigured: disconnect, and reconnect in 10 seconds
I (726953) ovms-server-v2: Status: Network was reconfigured: disconnect, and reconnect in 10 seconds
I (726963) esp32wifi: STA disconnected with reason 200
I (726963) ovms-server-v2: Status: Disconnected
I (746153) ovms-server-v2: Connection is ovms.dexters-web.de:6867 test1
I (746153) ovms-server-v2: Status: Connecting...Guru Meditation Error: Core 1 panic'ed (StoreProhibited)
. Exception was unhandled.
Core 1 register dump:
PC : 0x400f7ee6 PS : 0x00060330 A0 : 0x800f8090 A1 : 0x3ffe8a00
A2 : 0x3fff55a8 A3 : 0x3fffbb90 A4 : 0x00000001 A5 : 0x00000000
A6 : 0x00000014 A7 : 0x3ffb10b0 A8 : 0x000000a2 A9 : 0x3ffe89e0
A10 : 0x3ffe8a00 A11 : 0x00000040 A12 : 0x3f40c298 A13 : 0x081d0000
A14 : 0x87725000 A15 : 0x00000000 SAR : 0x00000001 EXCCAUSE: 0x0000001d
EXCVADDR: 0x0000000a LBEG : 0x40145ccc LEND : 0x40145ceb LCOUNT : 0x00000000
Backtrace: 0x400f7ee6:0x3ffe8a00 0x400f808d:0x3ffe8a30 0x400f5eff:0x3ffe8a70 0x400f61c6:0x3ffe8aa0 0x400f74b1:0x3ffe8ad0 0x400f775d:0x3ffe8b10
0x400f3f25:0x3ffe8b60 0x400eb47a:0x3ffe8b80 0x400eb4b9:0x3ffe8bd0
#0 0x400f7ee6 in mg_send_dns_query (nc=0x3fff55a8, name=0x3fffbb90 "ovms.dexters-web.de", query_type=1) at
/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:11172
#1 0x400f8090 in mg_resolve_async_eh (nc=0x3fff55a8, ev=<optimized out>, data=<optimized out>) at
/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:11629
#2 0x400f5f02 in mg_call (nc=0x3fff55a8, ev_handler=0x400f800c <mg_resolve_async_eh>, user_data=<optimized out>, ev=2, ev_data=0x3ffe8aa0)
at /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:2285
#3 0x400f61c9 in mg_if_connect_cb (nc=0x3fff55a8, err=0) at
/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:2824
#4 0x400f74b4 in mg_mgr_handle_conn (nc=0x3fff55a8, fd_flags=2, now=1522337922.4471409) at
/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:3705
#5 0x400f7760 in mg_socket_if_poll (iface=<optimized out>, timeout_ms=250) at
/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:3922
#6 0x400f3f28 in mg_mgr_poll (m=0x3ffb411c <MyNetManager+12>, timeout_ms=250) at
/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:2451
#7 0x400eb47d in OvmsNetManager::MongooseTask (this=0x3ffb4110 <MyNetManager>) at
/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_netmanager.cpp:382
#8 0x400eb4bc in MongooseRawTask (pvParameters=0x3ffb4110 <MyNetManager>) at
/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_netmanager.cpp:370
i.e. to execute commands, read/write configs etc., so scripts can perform complex tasks
When running commands in ssh console (maybe others), the output is batched up and only output when the command has finished running.
An example is:
test sd
But also:
ota flash http
It would be better if it could be output as the command is run.
The v.e.awake metric should be controlled by can bus activity.
We are seeing issues on TR where sometimes the car can't switch charging modes correctly. The logic for v2 and v3 firmware is the same (send mode command followed by current limit command), but v3 seems to randomly not work.
Suspicion is that v3 cpu is faster, and commands may be being sent too fast. So, introduce a 50ms delay on server v2 command #16 to try to address this.
Currently the Tesla Roadster module fires the homelink activation command to the module, but relies on the car to timeout the activation and stop the transmission. That means the homelink message is transmitted for longer than a standard tesla roadster.
it would be good to add some control and configurability to this by:
V2 could only store tuning profiles and write them into the SEVCON. V3 should also be able to provide the other direction, i.e. create a profile from the actual registers of any SEVCON.
Backtrace:
balzer@leela:~/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3> a2l 0x4013c3a8 0x4013c5f1 0x4013c605 0x400fb6e6 0x400fb7ae 0x400fb7c4 0x400fe4ee 0x40120c9e 0x40123aa7 0x40125a60 0x4012255c 0x400ed09d 0x400eda6d 0x400edb6d 0x400edb7d
Using elf file: /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/build/ovms3.elf
0x4013c3a8 is in re::DoAnalyse(CAN_frame_t*) (/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/retools/src/retools.cpp:274).
269 r = k->second;
270 r = new re_record_t;
271 memset(r,0,sizeof(re_record_t));
272 r->attr.b.Changed = 1; // Mark the whole ID as changed
273 r->attr.dc = 0xff;
274 switch (MyRE->m_mode)
275 {
276 case Serve:
277 break;
278 case Analyse:
0x4013c5f1 is in re::Task() (/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/retools/src/retools.cpp:250).
245 {
246 case Serve:
247 DoServe(&frame);
248 case Analyse:
249 case Discover:
250 DoAnalyse(&frame);
251 break;
252 }
253 m_finished = monotonictime;
254 }
0x4013c605 is in RE_task(void*) (/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/retools/src/retools.cpp:233).
228 #endif // #ifdef CONFIG_OVMS_SC_GPL_MONGOOSE
229
230 static void RE_task(void *pvParameters)
231 {
232 re *me = (re*)pvParameters;
233 me->Task();
234 }
235
236 void re::Task()
237 {
Analysis: MyRE is used by the task before the constructor has finished because frames come in immediately. Is using MyRE within DoAnalyse() necessary?
The charge mode is not being set correctly on Tesla Roadster cars, and needs to be calculated differently for v1.x vs v2.x cars.
Spurious charge stops have been reported, i.e. when issueing an "xrt ca" command without changing a configuration, but also without interaction.
Add support for CAC metric in Tesla Roadster vehicle module.
Implement a quickstart configuration system for new deployments. Initial spec includes:
We can lead them through the setup in the following stages:
Require, as a pre-requisite, users to initially setup the module within range of a home wifi / cellular hotspot connection.
Factory default, use Access Point mode, SSID OVMS password “OVMSinit”, and no module password. Have them connect to the module over wifi Access Point, and http://192.168.4.1/.
The web interface then shows them a list of WiFi access points in range, and asks them to choose one and enter the password for that access point (clearly labelled as SSID, and " Password”).
The module then reconfigures as Client + Access Point mode, and tries to connect to the client wifi, as well as keeping the access point connection open. If not ok, tell them and go back to #3 for them to try again.
When ok, proceed to ask them to update the firmware. This will do a simple OTA download over HTTP, then reboot.
When back up, in one screen ask them to enter all the details for their network, and configure appropriately:
The point is to lead them through each of the steps, test each setting and show them the result.
Version: 3.1.004-80-g28672d4/ota_0/main
commit 28672d4
Log:
I (50400606) housekeeping: Fri Apr 27 13:09:02 2018 CET (RAM: 8b=60204-67032 32b=8052)
D (50401626) simcom: rx line ch=3 len=10 : +CREG: 1,1
D (50401666) simcom: rx line ch=3 len=26 : +CCLK: "80/01/10,03:22:37"
D (50401716) simcom: rx line ch=3 len=11 : +CSQ: 21,99
D (50401766) simcom: rx line ch=3 len=23 : +COPS: 0,0,"congstar",2
D (50401806) simcom: rx line ch=3 len=2 : OK
I (50403436) netmanager: Interface priority is pp3 (10.151.224.14/255.255.255.255 gateway 10.64.64.64)
I (50403486) esp32wifi: STA disconnected with reason 201
I (50413436) netmanager: Interface priority is pp3 (10.151.224.14/255.255.255.255 gateway 10.64.64.64)
I (50413486) esp32wifi: STA disconnected with reason 201
D (50421606) notify: Created entry with length 113 has 1 readers pending
D (50421656) ovms-server-v2: TransmitNotifyData: msg=RT-GPS-Log,302559,86400,51.32264709,7.34467554,171,153,0,1,0,-71,0,394,70,5933,0,0,40,18000,-4500,1.000,0.769,0,0
I (50421706) ovms-server-v2: Send MP-0 h2052,0,RT-GPS-Log,302559,86400,51.32264709,7.34467554,171,153,0,1,0,-71,0,394,70,5933,0,0,40,18000,-4500,1.000,0.769,0,0
I (50423156) ovms-server-v2: Incoming Msg: MP-0 h2052
I (50423436) netmanager: Interface priority is pp3 (10.151.224.14/255.255.255.255 gateway 10.64.64.64)
I (50423486) esp32wifi: STA disconnected with reason 201
D (50431606) ovms-server-v2: TransmitNotifyData: checking for retransmissions
D (50431626) simcom: rx line ch=3 len=10 : +CREG: 1,1
D (50431706) simcom: rx line ch=3 len=26 : +CCLK: "80/01/10,03:23:07"
D (50431756) simcom: rx line ch=3 len=11 : +CSQ: 21,99
D (50431796) simcom: rx line ch=3 len=23 : +COPS: 0,0,"congstar",2
D (50431846) simcom: rx line ch=3 len=2 : OK
I (50433436) netmanager: Interface priority is pp3 (10.151.224.14/255.255.255.255 gateway 10.64.64.64)
I (50433486) esp32wifi: STA disconnected with reason 201
I (50443436) netmanager: Interface priority is pp3 (10.151.224.14/255.255.255.255 gateway 10.64.64.64)
I (50443496) esp32wifi: STA disconnected with reason 201
I (50448606) ovms-server-v2: Send MP-0 S92.3,K,0,0,done,standard,61,54,0,0,0,0,0,4,0,0,0,0,96.59,43,0,0,91,-1,0,0,0,-1,0,66,0,0.00,57.00,88
I (50448656) ovms-server-v2: Send MP-0 D0,0,5,27,41,14,54,486920,0,15071,0,0,1,0,13.8022,0,0,0,19,0
I (50448706) ovms-server-v2: Send MP-0 L51.322643,7.344681,153.1,171.7,1,1,0,10002,0.0,0.4,0.1
***** CRASH *****
I (10596) housekeeping: System considered stable (RAM: 8b=75340-76320 32b=23640)
Backtrace:
balzer@leela:~/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3> a2l 0x40092ccc 0x40092ec7 0x401015bb 0x400fb6e6 0x400fb7ae 0x400fb7c4 0x400fe4ee 0x40120c9e 0x40123aa7 0x40125a60 0x4012255c 0x400ed09d 0x400eda6d 0x400edb6d 0x400edb7d
Using elf file: /home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/build/ovms3.elf
0x40092ccc is in invoke_abort (/home/balzer/esp/esp-idf/components/esp32/./panic.c:139).
134 #endif
135 while (1) {
136 if (esp_cpu_in_ocd_debug_mode()) {
137 __asm__ ("break 0,0");
138 }
139 *((int *) 0) = 0;
140 }
141 }
142
143 void abort()
0x40092ec7 is in abort (/home/balzer/esp/esp-idf/components/esp32/./panic.c:148).
143 void abort()
144 {
145 #if !CONFIG_ESP32_PANIC_SILENT_REBOOT
146 ets_printf("abort() was called at PC 0x%08x on core %d\r\n", (intptr_t)__builtin_return_address(0) - 3, xPortGetCoreID());
147 #endif
148 invoke_abort();
149 }
150
151
152 static const char *edesc[] = {
0x401015bb is in __assert_func (../../../.././newlib/libc/stdlib/assert.c:63).
0x400fb6e6 is in mbuf_insert (/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:1507).
1502 size_t mbuf_insert(struct mbuf *a, size_t off, const void *buf, size_t) WEAK;
1503 size_t mbuf_insert(struct mbuf *a, size_t off, const void *buf, size_t len) {
1504 char *p = NULL;
1505
1506 assert(a != NULL);
1507 assert(a->len <= a->size);
1508 assert(off <= a->len);
1509
1510 /* check overflow */
1511 if (~(size_t) 0 - (size_t) a->buf < len) return 0;
0x400fb7ae is in mbuf_append (/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:1537).
1532 return len;
1533 }
1534
1535 size_t mbuf_append(struct mbuf *a, const void *buf, size_t len) WEAK;
1536 size_t mbuf_append(struct mbuf *a, const void *buf, size_t len) {
1537 return mbuf_insert(a, a->len, buf, len);
1538 }
1539
1540 void mbuf_remove(struct mbuf *mb, size_t n) WEAK;
1541 void mbuf_remove(struct mbuf *mb, size_t n) {
0x400fb7c4 is in mg_socket_if_tcp_send (/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:3434).
3429 return 0;
3430 }
3431
3432 size_t mg_socket_if_tcp_send(struct mg_connection *nc, const void *buf,
3433 size_t len) {
3434 return mbuf_append(&nc->send_mbuf, buf, len);
3435 }
3436
3437 size_t mg_socket_if_udp_send(struct mg_connection *nc, const void *buf,
3438 size_t len) {
0x400fe4ee is in mg_send (/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/mongoose/mongoose/mongoose.c:2686).
2681 size_t mg_send(struct mg_connection *nc, const void *buf, int len) {
2682 nc->last_io_time = (time_t) mg_time();
2683 if (nc->flags & MG_F_UDP) {
2684 len = nc->iface->vtable->udp_send(nc, buf, len);
2685 } else {
2686 len = nc->iface->vtable->tcp_send(nc, buf, len);
2687 }
2688
2689 if (!(nc->flags & MG_F_SEND_IMMEDIATELY) ||
2690 (nc->flags & MG_F_CLOSE_IMMEDIATELY) ||
0x40120c9e is in OvmsServerV2::Transmit(char const*) (/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp:684).
679 RC4_crypt(&m_crypto_tx1, &m_crypto_tx2, (uint8_t*)s, len);
680
681 char* buf = new char[(len*2)+4];
682 base64encode((uint8_t*)s, len, (uint8_t*)buf);
683 strcat(buf,"\r\n");
684 mg_send(m_mgconn, buf, strlen(buf));
685
686 delete [] buf;
687 delete [] s;
688 }
0x40123aa7 is in OvmsServerV2::TransmitMsgGPS(bool) (/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp:989).
984 << StandardMetrics.ms_v_bat_energy_used->AsString("0",Other,1)
985 << ","
986 << StandardMetrics.ms_v_bat_energy_recd->AsString("0",Other,1)
987 ;
988
989 Transmit(buffer.str().c_str());
990 }
991
992 void OvmsServerV2::TransmitMsgTPMS(bool always)
993 {
0x40125a60 is in OvmsServerV2::Ticker1(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*) (/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp:1583).
1578 int next = (m_peers==0) ? m_updatetime_idle : m_updatetime_connected;
1579 if ((m_lasttx==0)||(now>(m_lasttx+next)))
1580 {
1581 TransmitMsgStat(true); // Send always, periodically
1582 TransmitMsgEnvironment(true); // Send always, periodically
1583 TransmitMsgGPS(m_lasttx==0);
1584 TransmitMsgGroup(m_lasttx==0);
1585 TransmitMsgTPMS(m_lasttx==0);
1586 TransmitMsgFirmware(m_lasttx==0);
1587 TransmitMsgCapabilities(m_lasttx==0);
SSH occasionally cuts off large outputs due to low memory, i.e. when dumping the memory status of the "OVMS Events" task:
OVMS# mo m 3FFBFC50
Free 8-bit 49368/281968, 32-bit 8052/24308, SPIRAM 4126420/4194252
--Task-- Total DRAM D/IRAM IRAM SPIRAM +/- DRAM D/IRAM IRAM SPIRAM
wifi 1400 128 0 6288 +0 +0 +0 +1684
============================ blocks dumped = 844
t=OVMS Events s= 4 a=0x3f8073dc 3FFEAC84 BAAD5678 3F807439 3F809B40 3FFD96FC 00000018 00000000 3F80BB4A
t=OVMS Events s= 12 a=0x3f807448 3FFC9814 3FFD1960 FEFEFE01 BAAD5678 3F8074C0 ABBA1234 3FFBFC50 00000054
t=OVMS Events s= 84 a=0x3f807468 3F4108E4 3F40C8DC 3F448270 00000000 3F4102EC 3F807484 00000000 FEFEFE00
t=OVMS Events s= 84 a=0x3f8074d0 3F4108E4 3F44825C 3F448270 40138C00 3F4799B4 3F8074EC 00000000 FEFEFE00
…
t=OVMS Events s= 12 a=0x3ffdde1c 3FFE37F4 3FFD03A0 3FFDC7F4 BAAD5678 3FFDDE6C ABBA1234 3FFBFC50 0000002C
t=OVMS Events s= 44 a=0x3ffdde3c 3F40ED6C 3FFDDE48 00000007 69686576 00656C63 FEFEFEFE FEFEFEFE 3FFDDE7C
t=OVMS Events s= 12 a=0x3ffdde7c 40227100 00000000 3FFDC8DC BAAD5678 3FFDDEAC ABBA1234 3FFBFC50 0000000C
[49832 bytes lost due to low free memory]
E (38429735) ssh: 49832 output bytes lost due to low free memory
Add support for charge timers in Tesla Roadster vehicle module.
We currently support an OTA tag (default: main) in the build config. This issue adds a runtime overridable value for that in config.
param: ota
instance: tag
default: (use build config CONFIG_OVMS_VERSION_TAG with default 'main')
We currently support an OTA server url hard coded. This issue adds a runtime overridable value for that in config.
param: ota
instance: server
default: api.openvehicles.com/firmware/ota
The status panel should listen to events and update the panels accordingly, i.e. reload network status on network events. Control buttons to change the wifi mode and start/stop the modem should be added.
Add a bluetooth BLE GATT interface to metrics, notifications, and commands.
Specify and implement CAN protocol (frames) to transport drive mode status and change requests, to support using simple CAN touchscreen devices like…
https://www.twizy-forum.de/projekte-twizy/84423-twisplay-goes-arduino
…as drive mode consoles.
Add support for notification of vehicle alert codes in Tesla Roadster vehicle module.
…to support for example "enable" without argument or "vfs tail" in follow mode.
"vfs edit" may be a bit far fetched ;)
Support bluetooth pairing
When connecting to the box via ssh, using a trusted ssh.keys mechanism, it seems that the session is correctly put into secure mode (enable). But, the prompt is OVMS> (should be OVMS#). The full set of enable commands is shown, so pretty sure the session is in enable mode.
I think the issue is purely the prompt being incorrect.
Add support for cool down in Tesla Roadster vehicle module.
V2 was limited both in speed range and time resolution on this feature.
V3 can do better, i.e. store the full speed range (maybe even with 0.5 kph resolution?) and follow maximum power values with sub second resolution.
V2 could only support the simplified power map generation based on 1/w, i.e. omitting the high speed region where motor breakdown torque kicks in with 1/w². This works because the SEVCON automatically adapts to the breakdown torque and limits the slip accordingly. A drawback of this is that the drive pedal push length does not translate to the available power, so feels weird (power hole).
Measurements (see attachments) show the breakdown torque curve (depending on tuning config) already kicks in around 55 kph, so is relevant. Breakdown torque level should be somewhere around 210 Nm.
The attached powermap calculator implements a draft algorithm to create a powermap on this base. V3 can offer options to select and tune the powermap generator base.
The web interface uses the term 'vehicle password' that is confusing. Module or Server?
For v2, we standardised on using 'server password' for that. Best to change our interface, and the user guide, to match.
Rather than using ISP assigned DNS (either wifi or ppp), we should just simply use 8.8.8.8 and 8.8.4.4 by default. This simplifies things when switching between wifi and modem network connections.
Steps to recreate:
On the Vehicle Configuration screen, set Distance Units to Miles
Open the Status screen. Vehicle information displays in Kilometers.
This issue was observed while Vehicle Type is set to Tesla Roadster with values included for Vehicle Name and Timezone.
Should set CAN bus timer so we are polling for data, on reset. Then we can timeout and mark car asleep properly if it is truly asleep.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.