Home arrow Forum arrow Archived Forum
FreakLabs Forum
Welcome, Guest
Please Login or Register.    Lost Password?
MaCaco Communication Protocol (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: MaCaco Communication Protocol
#3086
Dario (Visitor)
Apprentice Freak
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
MaCaco Communication Protocol 3 Years, 4 Months ago Karma: 0  
Hi Forum,

I would like to share this communication protocol, called MaCaco, that allow multiple P2Pcommunication within Freakduino devices. Suggestion, comment and tester are apprecciated.
The protocol is designed for low rate transmission, is mainly a state-less protocol and can work in subscription mode or polling mode.

Base concept,

The protocol is inspired to Modbus in some features, data are exchanged via a shared map (an array that has the same structure in all devices), for each type of action there is a functional code, data sent should not allow gaps.

Out of these, the protocol doesn't share other common points with Modbus. Mainly differencies are:
- Doesn't work as Master-Slave, is a P2P,
- Shared Map could contain different data between devices,
- Data could be polled, but also exchange only when data are changing their value.

Shared Map,

The shared memory map is just an array that has the same structure for all devices (is not a real constrain, but is suggested). Virtually is splitted in INPUT and OUTPUT areas, where OUTPUT are tipically shared with other devices. The INPUT are used to collect data from devices in the network.

An area of the memory map (tipically the output) is also assigned for subscription.


Subscription mode,

The protocol allow to subscribe an area (tipically the output) of the memory map of another device. Every time that data change, the source of data will communicate the new values to the device that was asking for the subscription.
The subscription save bandwith and CPU load, periodically the device asking for subscription renew it based on two parameters: channel healty and communication counts.

Polling mode,

Some data could be required on event-base and not at every cicly, in this case polling is the right option. In case of polling, for each request is sent an answer with the current values also if they aren't changed.

Using polling mode at every cycle will use bandwith and CPU also if not really required.


State-less protcol,

This protocol is quasi state-less, this because in the header of the frame is contained the address where data will be placed once it came back. So is not required to record the connection. This feature make impossible use this protocol within devices that use a different number of bits for addressing their internal registers, but lets less code.

Is not fully state-less because in subscription mode are stored healty and count for each communication channel.

When, Why, Who...

This protocol could be used to exchange data between multiple Freakduinos, and can work over standard chibiduino or chibiduino with routing. It allow easy data transfer for people intendend to build a distribuited system (like home automation system).

Please share suggestion and comments and also it will be apprecciated any tester.

Regards,
Dario.
File Attachment:
File Name: MaCaco.rar
File Size: 16023
 
Report to moderator   Logged Logged  
 
Last Edit: 2011/08/05 04:55 By .
  The administrator has disabled public write access.
#3090
Dario (Visitor)
Apprentice Freak
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:MaCaco Communication Protocol 3 Years, 4 Months ago Karma: 0  
I saw that some people had a look to this. It would be nice if anyone can test the protcol with more than 3 freakduino togheter, unfortunatelly I have just 3 boards and so I cannot do more.

Now I've in my mind two more steps, first one is move the MaCaco protocol over TCP/IP, this will let Arduino with Ethernet Shield (or Arduino Ethernet) to communicate with MaCaco between themselfs.

One more interesting step is the following, make a virtualization layer over TCP/IP for Arduino to allow the chibiduino stack over them. Using the enachments of the "chibiduino with routing" message can be routed via a bridge (freakduino + ethenet shield) to make one virtual network of freakduino and arduino ethernet devices.

Final result should be, share data via MaCaco between network of freakduino and/or arduino ethernet, without know if the final device can be reached over cable or air.

Dario.
 
Report to moderator   Logged Logged  
 
Last Edit: 2011/08/06 11:50 By .
  The administrator has disabled public write access.
#3091
Akiba (Admin)
Admin
Posts: 1245
graph
User Online Now Click here to see the profile of this user
Re:MaCaco Communication Protocol 3 Years, 4 Months ago Karma: 25  
Sorry. I've been swamped with the radiation work at Safecast recently and haven't had a chance to check things out. Its interesting because its a large radiation sensor network but its painful because I have to build 1000 nodes...sigh...
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop