Menu

MerkurBoardSample

Jim

Merkur Board Device

The Merkur board is a low power wireless device communicating via the CoAP protocol. Details about the Merkur board please see http://osdwiki.open-entry.com/doku.php/en:projekte:merkur. The sample code is a CoAP proxy running on a Raspberry PI equipped with a Merkur board that acts as a proxy between CoAP and the REST protocol that M2MLabs Mainspring is using. Available CoAP resources are detected by reading from the .well-known resource. For each resource detected, the corresponding sensor models, actor models, device models and devices are created in Mainspring via the REST interface. As default a Merkur board provides sensors for cputemp and battery and an actor for the led. Addtional external sensors are detected automatically when present on the board.

Prepare Merkur and PI Expansion Board

Install the Sample

* mainspringUrl : URL of the Mainspring server
* apikey: your Mainspring apikey
* neighboursFile : path to the index.html file where the auto-detection of resources stores the information, e.g.your home directory
* piAddress : IPV6 address of the expansion board
* sleepTime : time interval in milliseconds for pollling of CoAP resources
  • run java -DcoapproxyConfFile=<path to="" config.json="" file=""> -jar <path to="" dist="" directory="">/CoapProxy.jar</path></path>
  • check in Mainspring admin GUI that models and devices for the Merkur board were created. Models are only created if they are not present from a previous run of the CoapProxy. The device name of a Merkur board is derived from its IPV6 address by replacing the ":" in the address with a "."

MongoDB Logo MongoDB