Working on New Flexible Framework based Firmware

#1

I am taking the summer off from my classes so I thought I would post a new revised project. More information will be forth coming but Basically I have begun writing a new firmware that will be very flexible… Any other threads I have that are precursers to this project will be closed, and either integrated with or linked to/from this project.

The intent is to provide flexibility in three areas. This method will allow easily adding new devices, new ports or new protocols without performing major overhauls of the firmware and can possibly be expanded in the future to support other hardware.

So what I have prematurely designed has three major components:

1. Hardware Connection to external device
This will allow an M2 type Arduino Due to connect to a variety of pieces of hardware seamlessly. Such as the USB port, one of the UART ports, SPI (Possibly), XBEE (Ie WiFi/Cell/Bluetooth). The intent is to make the actual hardware interface be transparent to allow the M2 to be connected via any available method. This should allow any future devices to be easily plugged in as well. Devices that need configuration such as a WiFi card will have support to set it up built into the device “driver” and will be transparent to the program otherwise. Note that this is a simple redirection of data input/output and will be protocol transparent.

2. OBD Protocols
This will allow adding of protocols onto the M2 easily. The intent is to take new, unblocked drivers and be able to integrate them into the firmware easily. If additional protocols are needed down the road they should be simple to add. Also due to the configuration of this feature someone could also take an already existing protocol and easily upgrade it or replace it if necessary.

3. External device protocols
This will allow for different connection protocols to be used to connect to the M2. This is a layer on top of the hardware connection to external devices. This will allow for different protocols so it can be compatible with a variety of software packages. This layer will provide support for ELM/STN, Lawicel, SavvyCAN, and other protocols that are out there. This will provide a simple way to allow additional stuff to be added. These protocols will also provide for additional types of devices to be supported such as a Serial HMI, or create a master/slave M2 configuration to allow multiple M2 devices to be connected together.

Each component will start with a class prototype and from that a specfic class will be created allowing encapsulation of all of the specifics within an object with a generic interface to talk to it. Any settings specific to that object will be stored internally in that object. This also allows for extending the class when new features need to be added.

Other options such as logging to SDCard, A master console and other features are likely to be added as well. A master console will be similar to a Server console which will provide for feedback to easily troubleshoot issues. Basically if you are connected via Bluetooth then the USB port may be used as a master console for diagnostic purposes when adding support for new devices or protocols. Logging and such will of course be defaulted off for speed considerations.

The purpose of this new firmware is to allow major flexibility to create new projects while keeping the overhead to a minimum if possible. Once this project is well underway I will likely start a similar project for Linux based devices. (BeagleBone will be the first configuration designed for. A new thread will be started when that project is started.)

I will post my Github repository for this here when I get to that point.

2 Likes
#2

I will shoot for milestones for this to be released to the public for testing. I have also had other programmers that are interested in helping out with this so if those programmers decide to help out it will make this project go by faster.

First Milestone Target will be:

  • USB port, UART support for XBEE and External port
  • Logging for SDCard and possibly Master Console
  • ELM/STN skeletons with simulated responses

Second Milestone is intended to be compatible with current firmware and will add:

  • SavvyCAN device support
  • CANBUS support
  • Initial SuperB Support (Hard coded startup sequence for WiFi or Bluetooth connections. Support to communicate with SuperB through master console to configure manually.)
  • ELM/STN simulation will be disabled by default but left in place as skeleton for real protocol

Third Milestone will add:

  • Complete ELM/STN support (make it usable)
  • Lawicel support
  • Full SuperB support

These milestones are subject to change and new ones added once these are completed. If I have others helping me we may be able to add support for other devices and protocols quicker. Would love to have a non-blocking J1850VPW driver by the second milestone.(I may workon before moving onto the 3rd milestone depending on time.)

1 Like
#3

Current status of this firmware is that I have the basic framework supporting the three components started. I have the initial USB and UART port configurations started and have tested communications through the USB and external UART ports. I have attempted to start making initial prototypes for the other components as well. So I am theoretically about a third of the way through the first milestone.

2 Likes