TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker or making a Paypal contribution here: paypal.me/SupportTMC

Open Vehicle Monitor System (OVMS) - Technical Discussion

Discussion in 'Roadster: Technical' started by markwj, Nov 1, 2011.

  1. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    Opening this thread for technical discussions and progress on the technical side of the OVMS used in Tesla Roadster.

    The general discussion of OVMS is at Open Vehicle Monitoring System

    We've now published the github code repository for this project. The master branch is at:

    markwj/Open-Vehicle-Monitoring-System - GitHub

    So far, today, we've uploaded the vehicle code (in vehicle/OVMS.X - a PIC MP Lab X project), hardware module wiring schematics (in vehicle/Car Module), and common artwork for the Apps (in apps/artwork).

    There was a last-minute change in protocol from UDP/IP to TCP/IP (due to restrictions we found that some cellphone carriers source NAT GPRS traffic, and that was causing problems with the source port of the UDP/IP connection changing unless we issued keepalive packets every 20 seconds - which would eat into cellular data plans). The SIM900 modem we use supports TCP/IP as well as UDP/IP, and switching to TCP/IP will allow us to maintain a permanent connection to the server and then bi-directionally communicate over that. This is something like the approach Apple does with their APNS (Apple Push Notification System) - the car maintains a connection back to the server, then either the car or the server can send messages over that established connection. These TCP/IP connections, while still source NATted, don't suffer from the same keepalive issue as UDP/IP and can be maintained for hours/days at a time (with very little network traffic). This change has set us back, but we are confident that the new approach will yield better results in the long term.

    The framework for the in-vehicle firmware is working well. SMS works, and status can be reported to the server over TCP/IP now. The main areas of the vehicle firmware we want to work on are:
    1. Encryption (RC4+Base64) for network protocol
    2. Interrupt-driven CAN bus
    3. Extension to the event model to allow waiting for modem responses without requiring a new state to be created
    4. Pending status updates (if the network is down, queue the status update for when the network comes back)
    5. Better alerting (via network status updates or SMS)

    With the switch to TCP/IP, we are now handling the necessary changes to the server code. Once that is done, we'll publish the server code as well as APIs for car-server and server-app, so that the Apps can be worked on.

    Several people have already let me know that they want to help out with development, and that is most appreciated. I really hope we can build a community around this. The steps to help out are (a) create a free github account (if you don't have one already), (b) pull the code, (c) github 'watch' the project, (d) fork the project if you want to work on a branch, or let me know your github username if you want to be a collaborator and need write access to the master repository, or just send me patches/fixes/extensions for merging into mainline. It would also be helpful if you could PM me your TMC forum username and eMail address so we can keep in touch.

    A final note: the hardware is coming ;-) We've in final sample stage at the moment, and the factory should start production of the first batch of hardware modules real soon. We're just working through the logistics of how you can actually purchase it and get it shipped safely.

    Thanks, Mark.
     
  2. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    #2 markwj, Nov 1, 2011
    Last edited: Nov 1, 2011
    What we have on the VDS can bus messages, so far.
    Most (if not all) of the work has been done by Scott451.

    The OVMS implementation of this is at:

    vehicle/OVMS.X/can.c at master from markwj/Open-Vehicle-Monitoring-System - GitHub
     
  3. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    A document on what we know of the Roadster CAN bus messages has been posted at:

    vehicle/Car Module/canbus_notes.txt at master from markwj/Open-Vehicle-Monitoring-System - GitHub

    and a perl script that parses a CSV log from a CAN-USB adaptor to decode and show what is known is at:

    others/roadster_can.pl at master from markwj/Open-Vehicle-Monitoring-System - GitHub

    Both are being updated fairly regularly.

    This is the result of original work done by Scott451, extended by markwj and fuzzylogic. New discoveries of messages for trip counter, odometer, speed, doors, TPMS sensors and lock/unlock are very exciting and should open up a lot of functionality.
     
  4. mg012

    mg012 Member

    Joined:
    Sep 26, 2012
    Messages:
    107
    Location:
    San Antonio, Tx
    Yesterday I got a notification on my iPhone from OVMS but it only said:
    SMS from: -MSG:
    and nothing else. There is no sms on my phone. Did the module receive and SMS?

    Thanks
    michael
     
  5. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    Yes, that is the SMS forward feature. Your SIM in the OVMS module must have received an SMS messages and tried to forward it to you. Both the caller phone number and message were blank.
     
  6. Marius

    Marius Member

    Joined:
    Oct 21, 2012
    Messages:
    81
    Location:
    Berkel en Rodenrijs NL
    From oktober 2012 I am using the OVMS module with a SIM card of GeoSIM inside. The first 5 weeks all went well but from that moment on I have to do a hardware reset about every week by removing the CAN cable, wait for 1 minute and connect again. Sometimes it works for 5 days, sometimes I am already out of connection after 3 days. When this happens SMS is also out which is logical because the module is continously trying to connect to the server.
    On the module the green light is blinking, so the connection with internet is OK.
    My conclusion is that the server sometimes close the connection to my car. After the hardware reset everything immediately goes well for as stated above a few days.
    On the app on my phone I read the whole time "updated x hr ago", which means that live is not possible as the car is not communicating with the OVMS server.
    What needs to be altered Mark?

    Marius
     
  7. DrComputer

    DrComputer Member

    Joined:
    Jan 29, 2009
    Messages:
    891
    Location:
    Sherman Oaks, CA
    So Mark, any news on the Android update to fix the screen resolution problem? Tesla seems to have gotten it right in their Model S app :)
     
  8. lolachampcar

    lolachampcar Active Member

    Joined:
    Nov 26, 2012
    Messages:
    4,445
    Location:
    WPB Florida
    Has work begun to decipher Model S's systems?
     
  9. 7racer

    7racer Member

    Joined:
    Jun 13, 2011
    Messages:
    755
    Mark,

    i noticed that the OVMS stopped working on my Roadster. I have been experiencing the 12v issue and a Ranger is coming out on Monday to fix it. My question is does the OVMS run off of power from the 12v battery? If it does, can it contribute to it loosing power?

    Thanks
    Bob
     
  10. smorgasbord

    smorgasbord Active Member

    Joined:
    Jun 3, 2011
    Messages:
    2,379
    Location:
    SF Bay Area
    Weird, both of these things are happening to me as well...
     
  11. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    Not that I am aware of. In the 2.x roadsters, OVMS is powered from the main battery. The 12v battery is only used to power emergency systems.

    If you are using v2 hardware, please eMail me (support (at) openvehicles (dot) com) your vehicle ID and I will check the server logs. For v2 modules, we have good diagnostics on 12V power levels.
     
  12. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    It is hard to do support via this forum. If you are having problems, best is to eMail your vehicleid to support (at) openvehicles (dot) com.

    Thanks, Mark
     
  13. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    Marius,

    What is your vehicleid, and version of firmware in the module? Output of MODULE?, SERVER?, GPRS?, DIAG, and VERSION SMS commands would be useful to see.

    In older firmware versions, we have seen problems recovering from poor cellular connectivity areas, but that is GPRS only and should not affect SMS. New firmware resolves this.
     
  14. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    Nope. There has been some interest, but I suspect people are waiting to see what Tesla will release when their Apps come any-day-now. With all the 12V system problems with Model S at the moment, it is probably safest to stay away until the car firmware stabilizes.

    The work on Volt/Ampera has produced some OBDII support technology. For that car, we connect to the OBDII port and poll for OBDII parameters, rather than just listening on the bus. Seems to work well, and is very extensible. We even have a standard OVMS-OBDII cable now, which is used for Volts, Amperas, Twizys, and others in development.

    That has also produced generic OBDII vehicle support, that will even work in modern ICE vehicles (showing gas tank level in place of battery SOC) - including vehicle status, GPS tracking, etc. Like the Volt/Ampera, this is under development and hopefully we should have something for end users in the next month or so.
     
  15. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    Just announced that full public beta should start tomorrow. A side-load APK will be released then.
     
  16. Marius

    Marius Member

    Joined:
    Oct 21, 2012
    Messages:
    81
    Location:
    Berkel en Rodenrijs NL
    #16 Marius, Jan 20, 2013
    Last edited by a moderator: Jan 20, 2013
    Mark,
    I use this forum as I expect more users to have the same issue. As it seems that is not the case I will contact you via support [at] openvehicles.com
    Marius
     
  17. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    Marius,

    No problem with people using this forum to ask for help. It is one of its purposes.

    The reason I suggest users contact support@ directly is privacy. To help, we often need private information like vehicle ID, status messages, etc - and can't really exchange that here.

    Regards, Mark
     
  18. mg012

    mg012 Member

    Joined:
    Sep 26, 2012
    Messages:
    107
    Location:
    San Antonio, Tx
    Mark,
    Would it be possible for the OVMS app to report secondary system activities like battery balancing/heating/cooling or warnings that might otherwise show up on the display (Tesla Roadster). I don't know if any of these things come across that buss the module is connected to.

    thanks
    michael
     
  19. smorgasbord

    smorgasbord Active Member

    Joined:
    Jun 3, 2011
    Messages:
    2,379
    Location:
    SF Bay Area
    Just to be clear, OVMS was not at fault, but highlighted the issue, which was a missing fuse.

    Don't ask who pulled it and didn't put it back. All is well now.
     
  20. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    Michael,

    We already report heating (including percentage). I don't think there is a -specific- pre-charge cooling cycle (like there is for heating).

    The error codes and balancing information haven't been discovered yet - although charge interruption alerts are found and reported.
     

Share This Page