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.