Go Down

Topic: Introducing - MRMP (Read 4 times) previous topic - next topic

George Matthews

Microcontroller Remote Management Protocol (MRMP)

MRMP was created by S George Matthews in the Summer of 2008 out of a need to communicate with multiple AVR's . The design goal is to occasionally monitor output and adjust variables remotely. This article and related detailed technical notes were written so that the reader may understand the basis for and the details of the MRMP. It is my desire that the reader will discover and offer more efficient implementations and new variants of MRMP. This protocol is offered to the public and is written and distributed under the GNU General Public License which means that its source code is freely-distributed and available to the general public.

(More to follow as 1st posing must be clean.)

George Matthews

Jan 16, 2009, 10:18 pm Last Edit: Jan 16, 2009, 10:22 pm by matthewsg Reason: 1

MRMP is printable ASCII packet, loosely based on Ethernet RTP.  It is not very efficient, as the packet header is far larger than the data. However it is human readable and well suited to interactive and automated control of AVR devices.

An MRMP network consist of one 'Bridge' and multiple 'Controller' devices. Ardurino AVR boards were used for the initial network protocol, but any serial device could be adapted to route MRMP.  A three ' Wire'  ( I2C) serial bus is used to communicate to the Controller devices. In practice, two twisted wire pairs are used, for a maximum bus length of about 100m. A USB or RS232 port is used to communicate with the Bridge.  Bridge can send, receive and bridge packets. A Controller receives, but queues packets for the Bridge to pickup using a 'Polling' MRMP packet.  You may use MRMP on the local serial port of any Controller or Bridge.

A critical design parameter is that any AVR device, including the Bridge, must be capable of standalone operation. The devices must not rely upon data from the Bridge or another Controller device to perform it's primary function. In practical terms MRMP is used to monitor and tweak the microcontroller process.

Two second timers are specified on each device. One timer to count seconds from power-up, and another timer that is periodically synchronized with absolute UNIX time. The startup timer is never adjusted, and is suitable for short delays of up to an hour or so. The longer the time, the more it will drift. The absolute UNIX timer is suitable for timed event, such as on the hour, day etc.  Bridge absolute UNIX time is set with a crontab script, typically once each hour. Then the Bridge uses MRMP to push the absolute UNIX time to each Controller, typically once per hour.

Source code for both Bridge and Generic Ardurino can be found attached to this document...

Discussion about features and functionality should be posted to another area of this forum. Please post a link here to your new thread.

George Matthews

Jan 18, 2009, 04:31 pm Last Edit: Jan 18, 2009, 05:28 pm by matthewsg Reason: 1
Here is the first in a series of tutorials.
Generic Controller.

George Matthews

Second in a series of tutorials introducing Generic Controller and associate EEPROM functions to burn and fetch variables and records.


George Matthews

I am pleased to report that the I2C interrupt bugs introduced in 0012 and 0013 distros have been squashed with Arduino 0014.

Compiling MRMP using either 0012 or 0013 had resulted in I2C interrupt hangs preventing Bridge to Controller communication.


Go Up