Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
8a05459
Remove metas, files under which are not necessary any more
yatch Apr 25, 2019
64630da
Add License
yatch Apr 25, 2019
8bc25fd
Update README.md
yatch Apr 25, 2019
15a009a
Remove get_eui64.py, that seems obsolete
yatch Apr 25, 2019
dc5ccd0
Remove mercatorCli.py that is a test program for the firmware
yatch Apr 25, 2019
438636c
Remove OpenCli.py that was used by mercatorCli.py
yatch Apr 25, 2019
853f70d
Remove MoteHandler.py
yatch Apr 25, 2019
f05d836
Remove MercatorDefines.py, values in which will be placed somewhere
yatch Apr 25, 2019
cfb9600
Remove unnecessary files
yatch Apr 25, 2019
015b1a8
Move and rename Hdlc.py
yatch Apr 25, 2019
265f0c1
Remove mercatorRunExperiment.py and other stuff
yatch May 17, 2019
e26dc70
Remove iotlab-m3.elf that is based on an old OpenWSN firmware
yatch May 17, 2019
c79dd3f
hdlc: code-style fixes
yatch Apr 25, 2019
a72d40d
hdlc: refactor the entire code
yatch May 17, 2019
686409e
Re-implement mercator
yatch May 17, 2019
e8039da
Add OpenTestbed support
yatch May 17, 2019
7b4b31d
Add -C option to print a sample YAML file
yatch May 20, 2019
2283f9d
Add -q (quiet) option
yatch May 20, 2019
1fee4d8
Record 'start_time' and 'end_time' of a set of Mercator measurements
yatch May 20, 2019
3fe9310
mercator: print an error message when mercator.yml is not found
yatch May 21, 2019
404b07d
mercator: add -l option to specify path to logging.yml
yatch May 21, 2019
05bd270
mercator: gracefully stop by Ctrl-C
yatch May 23, 2019
6a37753
Remove 'tx_power_dbm' setting, which is not supported by openwsn-fw
yatch May 20, 2019
e537c33
Change the default logging level to INFO
yatch May 20, 2019
e61c5e6
mercator: record nodes' indexes to output file
yatch May 24, 2019
14aeba1
Add mercator/k7conv.py (converter to K7 format)
yatch May 20, 2019
86605bc
Add test_hdlc.py
yatch May 21, 2019
c324638
Add test_node.py
yatch May 21, 2019
35089e0
hdlc: change APIs, do away with hdlcify and dehdlcify
yatch May 29, 2019
2d6be86
hdlc: handle byte-drops in an HDLC frame
yatch May 29, 2019
b2bebe7
Update README.md
yatch May 21, 2019
f851cc3
Add LICENSE for OpenWSN firmwares (openwsn-fw)
yatch May 21, 2019
4205127
Update .gitignore
yatch May 21, 2019
ebd5235
Add firmwares/README.md
yatch May 21, 2019
5ec78f4
Add build-firmwares.sh
yatch May 23, 2019
5fa4d7b
logging: integrate logging.yml into mercator.yml
yatch May 24, 2019
7d81c4d
update firmwares
yatch May 22, 2019
777f0ad
mercator.yml
yatch May 23, 2019
ae9a28f
mercator: introduce 'tx_nodes' setting to config['measurement']
yatch May 24, 2019
8ee9b86
Rename 'mercator/platform' to 'mercator/platforms'
yatch May 24, 2019
8d67d41
k7analyze.py
yatch May 24, 2019
99f1fce
Add -s (--only-platform-setup) option
yatch May 29, 2019
c8de110
k7analyze: escape '%' symbol in help message
yatch Jun 7, 2019
24d5ef0
k7analyze: don't show vertical red line for mean value
yatch Jun 18, 2019
f1bcd00
k7analize: change xticks of CDF of node degrees
yatch Jun 18, 2019
0ae95e3
build-firmwares.sh: update the hash even if it's not 7-character long
yatch Jul 17, 2019
cfa5b69
firmwares: update the firmwares using the latest openwsn-fw
yatch Jul 17, 2019
c7b8b45
README.md: add text about build-firmwares.sh
yatch Jul 17, 2019
58b2b26
mercator: update mercator-opentestbed.yml
yatch Aug 13, 2019
ef1216a
Comment out "iotlabclient" in requirements.txt for now
yatch Aug 13, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
*.pyc
*.log
.idea/
*.log.*
*.jsonl.gz
*.k7.gz
mercator.egg-info
30 changes: 30 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Copyright (c) Inria
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the
distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 changes: 23 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
[![Code Health](https://landscape.io/github/openwsn-berkeley/mercator/master/landscape.svg?style=flat)](https://landscape.io/github/openwsn-berkeley/mercator/master)

_You are watching the raw data. To visualize it: https://openwsn-berkeley.github.io/mercator/._

## Mercator: Dense Wireless Connectivity Datasets for the IoT
# Mercator: Dense Wireless Connectivity Datasets for the IoT

<img src="https://raw.githubusercontent.com/wiki/openwsn-berkeley/mercator/figures/mercator.jpg" align="left">

**Mercator** is a collection of connectivity datasets gathered on the IoT-LAB sites. These datasets are:
**Mercator** is a collection of tools to gather connectivity traces, which are:
* **dense in time**, meaning the connectivity is continuously assessed over a long period of time; it allows one to see variation of connectivity over time.
* **dense in space**, meaning the connectivity is assessed over hundreds of measurements points; it allows one to see how connectivity is affected by the location of transmitter and receivers.
* **dense in frequency**, meaning the connectivity is assessed for each of the 16 IEEE802.15.4 frequencies; it allows one to see how connectivity is affected by the communication frequency.

Want to learn more? [See the wiki.](https://github.com/openwsn-berkeley/mercator/wiki)
## Get Mercator
1. Make sure you have Python 3.7 or above installed (Python 2 is not supported)
1. Clone or download Mercator repository
1. Move into your local Mercator repository
1. Install Mercator: `$ pip install . -r requirements.txt`

## How to Run
1. Edit mercator.yml as you like
1. Run `$ mercator`
1. You will have `output.jsonl.gz`, which is a raw output file
1. You can convert the raw file to a K7 file; run `$ mercator-k7conv -l grenoble output.jsonl.gz`

## How to Develop
1. Install Mercator in "editable mode": `$ pip install -e . -r requirements.txt`
1. Edit the source code
1. Run test: `$ pytest -x`
1. Open a PR if you want :-)

## Useful Options
* You can get a sample mercator.yml by `-C` option: `$ mercator -C iotlab`
* You can program a firmware to nodes in your OpenTestbed by `-p` option: `$ mercator -p`
105 changes: 105 additions & 0 deletions build-firmwares.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
#!/bin/sh

IOTLAB_M3="iot-lab_M3"
OPENMOTE_B="openmote-b-24ghz"

BOARDS="${IOTLAB_M3} ${OPENMOTE_B}"
TOOLCHAIN='armgcc'

# usage
usage() {
echo "Usage: ./build-firmwares.sh OPENWSN_FW_LOCAL_REPO"
echo ""
echo " OPENWSN_FW_LOCAL_REPO: path to opewsn-fw local repository"
}
if [ $0 != "./build-firmwares.sh" ]; then
echo "ERROR: build-firmware.sh must be executed at mercator dir"
echo ""
usage
exit 1
fi
if [ $# -ne 1 ]; then
usage
exit 1
fi

# identify openwsn-fw directory
OPENWSN_FW_LOCAL_REPO=$1
if [ ! -d ${OPENWSN_FW_LOCAL_REPO} ]; then
echo "${OPENWSN_FW_LOCAL_REPO} is not found"
exit 1
fi
echo ${OPENWSN_FW_LOCAL_REPO} | grep -E '^/' > /dev/null
if [ $? -ne 0 ]; then
# convert it to the absolute path
WORKING_DIR_PATH=`pwd`
OPENWSN_FW_LOCAL_REPO="${WORKING_DIR_PATH}/${OPENWSN_FW_LOCAL_REPO}"
fi


# check docker
which docker > /dev/null 2>&1
if [ $? -eq 1 ]; then
echo "Need docker installed"
exit 1
fi

# check git
which git > /dev/null 2>&1
if [ $? -eq 1 ]; then
echo "Need git installed"
exit 1
fi

# identify the commit hash value
COMMIT_HASH=`cd ${OPENWSN_FW_LOCAL_REPO}; \
git rev-parse --short HEAD 2> /dev/null`
if [ $? -ne 0 ]; then
echo "Seems $1 is not an openwsn-fw git repository"
echo "Cannot build firmwares"
exit 1
fi

# build firmwares and copy them under 'firmware' directory
DOCKER_SCONS_CMD="docker run"
DOCKER_SCONS_CMD+=" --mount type=bind,"
DOCKER_SCONS_CMD+="source=${OPENWSN_FW_LOCAL_REPO},"
DOCKER_SCONS_CMD+="destination=/home/user/openwsn-fw"
DOCKER_SCONS_CMD+=" -ti yatch/openwsn-docker scons"
TIMESTAMP=`date +%Y%m%d-%H%M%S`
BUILD_LOG_FILE="build-firmwares-${TIMESTAMP}.log"

echo "Create ${BUILD_LOG_FILE}"
touch ${BUILD_LOG_FILE}
for board in ${BOARDS}; do
echo "Build a firmware for ${board}..."
scons_args="board=${board} toolchain=${TOOLCHAIN} oos_mercator"
${DOCKER_SCONS_CMD} --clean ${scons_args} >> ${BUILD_LOG_FILE}
${DOCKER_SCONS_CMD} ${scons_args} >> ${BUILD_LOG_FILE}
if [ $? -ne 0 ]; then
echo ""
echo "ERROR: Build failed for ${board}..."
echo "Check ${BUILD_LOG_FILE}"
exit 1
fi

echo "Copy a firmware..."
src_path=${OPENWSN_FW_LOCAL_REPO}
src_path+="/build/${board}_${TOOLCHAIN}/projects/common/03oos_mercator_prog"
dst_path="./firmwares/openwsn-${board}"
if [ ${board} = ${IOTLAB_M3} ]; then
dst_path+=".elf"
fi
if [ ${board} = ${OPENMOTE_B} ]; then
src_path+=".ihex"
dst_path+=".ihex"
fi
cp -p ${src_path} ${dst_path}
done
echo "Build logs can be found in ${BUILD_LOG_FILE}"

# update firmwares/README.md
echo "Update the commit hash value in firmwares/README.md with ${COMMIT_HASH}"
sed -i \
-E 's/commit hash: `[0-9a-f]\{1,\}`/commit hash: `'${COMMIT_HASH}'`/' \
firmwares/README.md
4 changes: 0 additions & 4 deletions code/firmware/README.md

This file was deleted.

Binary file removed code/firmware/iotlab-m3.elf
Binary file not shown.
2 changes: 0 additions & 2 deletions code/software/README.md

This file was deleted.

1 change: 0 additions & 1 deletion code/software/app/README.md

This file was deleted.

Empty file removed code/software/app/__init__.py
Empty file.
197 changes: 0 additions & 197 deletions code/software/app/get_eui64.py

This file was deleted.

Loading