Pages: [1]   Go Down
Author Topic: Introducing - MRMP  (Read 3819 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 78
Retired Electronic Technologist focusing on Wireless network development.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.)

Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 78
Retired Electronic Technologist focusing on Wireless network development.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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...
http://www.mmcs.com/~gmatthews/FAV1-00012D85/S0005027B-0005027B

Discussion about features and functionality should be posted to another area of this forum. Please post a link here to your new thread.
« Last Edit: January 16, 2009, 04:22:18 pm by matthewsg » Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 78
Retired Electronic Technologist focusing on Wireless network development.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is the first in a series of tutorials.
Generic Controller.
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1232296064
« Last Edit: January 18, 2009, 11:28:25 am by matthewsg » Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 78
Retired Electronic Technologist focusing on Wireless network development.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

http://www.mmcs.com/~gmatthews/FAV1-00012D85/FOV1-00012FAD/S00053C22-00053C22
Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 78
Retired Electronic Technologist focusing on Wireless network development.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Thanks!
Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 78
Retired Electronic Technologist focusing on Wireless network development.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Third in a series of tutorials introducing Generic Controller. This tutorial takes you step by step porting 'Blink' sketch to MRMP.

http://www.mmcs.com/~gmatthews/FAV1-00012D85/FOV1-00012FAD/S0005515E-000551A4

Hope this helps you better understand the power and flexibility of MRMP.
Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 78
Retired Electronic Technologist focusing on Wireless network development.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have posted three MRMP tutorials to date, and I am planning more. But before I start work on the next, I would like to know if the tutorials are suited to help you understand and use the MRMP APIs in your projects?  Perhaps it will be clear when I post the tutorial on MRMP over I2C (Wire)? Or should I post a real world examples?

I have held off posting a real world example because these projects introduce a rather large set of APIs and require tricky soldering. The projects I have built to date include... KOI pond monitor and feeding controller, Burglar Alarm monitor controllers, Solar collector monitor controller, and a bridge watchdog that monitors my network. These are all interconnected with I2C, yet they all can run standalone without any external connectivity. My next project is a six zone irrigation controller that uses weather reports to adjust water schedules.

I have also created several UNIX shell scripts using a Telnet bridge that .. keeps UNIX time up to date on all controllers, monitor and rest the network, automatically set alarms, monitors alerts and allow full MRMP from anywhere I have access to a terminal shell.

In the near future I plan to code MRMP for XPort Direct+
That will allow MRMP to bridge over local serial port, Ethernet and I2C simultaneously!

I am also working on an iPhone API that will send/receive MRMP.

I need help scripting a web interface with MRMP. Web API is just not in my skill set and any volunteers would be appreciated.

I hope this helps you better understand where I am heading with MRMP.  Comments please.

If you should wish to contact me privately, please use...
mrmp@mmcs.com
« Last Edit: March 21, 2009, 08:22:05 am by matthewsg » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am surprised that no one else has seemd to comment on this. I am planning on build my own home automation system, starting with a heating crontrol system. this looks like a good library for my to use so I can have several arduino doing bits independantly, but comunicating together. I will let you know how I get on understanding MRMP.
Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 78
Retired Electronic Technologist focusing on Wireless network development.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

/me

Quote
My next project is a six zone irrigation controller that uses weather reports to adjust water schedules.
Completed and running full Summer 2009.
- Six zones
- Primary and three alternate watering sources (incomplete)
- Forecast XML parses % chance of rain, and expected mm. Triggers irrigation delay for late day makeup.
- Tipping bucket rain gauge recording is used to calculate late day makeup.
- Neither forecast or rain gauge are required.
- Day of week, even/odd Municipal code compensation.
- Alerts sent by SMTP regarding mm rain, and irrigation status.
- Automatic zone chaining, on overlapping schedules. In fact all automated systems chain watering as the two zones water at once will cover much less ground.
- EEPROM records of running totals: mm applied all sources, mm rain, mm mains source, mm cistern source, mm pond source.



/me
Quote
In the near future I plan to code MRMP for XPort Direct+
That will allow MRMP to bridge over local serial port, Ethernet and I2C simultaneously!
Completed early Summer 2009.
- Sends simple SMTP message alerts.



Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 78
Retired Electronic Technologist focusing on Wireless network development.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Source code for both Bridge and Generic Ardurino can be found attached to this document...
http://www.mmcs.com/~gmatthews/FAV1-00012D85/S0005027B-0005027B

I have updated the Generic Controller and it's associated page is now found here...
http://www.mmcs.com/~gmatthews/FAV1-00012D85/S0005027B
Logged

Pages: [1]   Go Up
Jump to: