Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
93e71a9
Create easyMeshConnection.cpp
sfranzyshen Sep 23, 2016
db28937
Delete eashMeshConnection.cpp
sfranzyshen Sep 23, 2016
c54ce7b
Update easyMeshSync.cpp
sfranzyshen Sep 23, 2016
0c98644
Update main.js
sfranzyshen Sep 25, 2016
4212c06
Update and rename easyMesh.h to easyMesh.h_
sfranzyshen Oct 8, 2016
8ff91a4
Create easyMesh.h
sfranzyshen Oct 8, 2016
87623df
Delete easyMesh.h_
sfranzyshen Oct 8, 2016
9013a06
Update demoToy.ino
sfranzyshen Oct 11, 2016
9b5f936
Update startHere.ino
sfranzyshen Oct 11, 2016
2a3c45e
Update startHere.ino
sfranzyshen Oct 11, 2016
5c269be
Update demoToy.ino
sfranzyshen Oct 11, 2016
bf558d9
Update README.md
sfranzyshen Oct 12, 2016
01a93ca
Update startHere.ino
sfranzyshen Oct 12, 2016
322cb69
Update demoToy.ino
sfranzyshen Oct 12, 2016
8f1d4dd
Update easyMesh.cpp
sfranzyshen Oct 12, 2016
209ae85
Update easyMesh.h
sfranzyshen Oct 12, 2016
c2f1ada
Update easyMeshAP.cpp
sfranzyshen Oct 12, 2016
0bf1be0
Update easyMeshComm.cpp
sfranzyshen Oct 12, 2016
781b681
Update easyMeshConnection.cpp
sfranzyshen Oct 12, 2016
1af0b70
Update easyMeshDebug.cpp
sfranzyshen Oct 12, 2016
4e98c4b
Update easyMeshSTA.cpp
sfranzyshen Oct 12, 2016
d3e9198
Update easyMeshSync.cpp
sfranzyshen Oct 12, 2016
dc24402
Add files via upload
sfranzyshen Oct 12, 2016
8419983
Update README.md
sfranzyshen Oct 12, 2016
26c7104
Update README.md
sfranzyshen Oct 12, 2016
90078ab
Update easyMeshSTA.cpp
sfranzyshen Oct 12, 2016
34a429d
Update README.md
sfranzyshen Oct 13, 2016
d803c02
Update README.md
sfranzyshen Oct 13, 2016
a4b308d
Update demoToy.ino
sfranzyshen Oct 15, 2016
a38a8a2
Update easyMesh.cpp
sfranzyshen Oct 15, 2016
a730b77
Update easyMesh.h
sfranzyshen Oct 15, 2016
a8a94e7
Update easyMeshAP.cpp
sfranzyshen Oct 15, 2016
aaadfb4
Update easyMeshSTA.cpp
sfranzyshen Oct 15, 2016
561ef1e
Update README.md
sfranzyshen Oct 15, 2016
842c1de
Update easyMeshAP.cpp
sfranzyshen Oct 15, 2016
456764c
Update easyMeshAP.cpp
sfranzyshen Oct 15, 2016
2c6746f
Add files via upload
sfranzyshen Oct 16, 2016
6a11be8
Update easyMeshConnection.cpp
sfranzyshen Oct 20, 2016
bce8b4f
Update easyMeshSync.cpp
sfranzyshen Oct 20, 2016
58e4c29
Create temp
sfranzyshen Oct 23, 2016
034a770
Add files via upload
sfranzyshen Oct 23, 2016
348129f
Add files via upload
sfranzyshen Oct 23, 2016
a81511d
Add files via upload
sfranzyshen Oct 23, 2016
1a2f810
Add files via upload
sfranzyshen Oct 23, 2016
d5abc31
Add files via upload
sfranzyshen Oct 23, 2016
827ef84
Add files via upload
sfranzyshen Oct 23, 2016
ee3f530
Add files via upload
sfranzyshen Oct 23, 2016
5262ee4
Add files via upload
sfranzyshen Oct 23, 2016
8d242eb
Update easyMeshSTA.cpp
sfranzyshen Oct 24, 2016
9f62709
Update easyMeshConnection.cpp
sfranzyshen Oct 26, 2016
9f071fa
Update easyMeshSTA.cpp
sfranzyshen Oct 26, 2016
84872c0
Update easyMeshSTA.cpp
sfranzyshen Oct 27, 2016
c3c3400
Update easyMeshSync.cpp
sfranzyshen Oct 27, 2016
9d85d32
Update easyMeshConnection.cpp
sfranzyshen Oct 27, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
#This my HACK version
This is my development version ... please see the original authors code https://github.com/Coopdis/easyMesh

This branch of the easyMesh Library is for setting all of the mesh nodes to have one (the same) SSID instead of embbeding the chipid within the SSID of each node. This is accomplished by using part (the last 4 octets) of the bssid(mac address) of the AP wireless interface of each node to poulate a uint32 interger that is used for the unique node id.

![Encode easyMesh NodeId](/easymesh_nodeid.png?raw=true "Encode easyMesh NodeId")

I have tested setting all APs to a single IP address ... but it didn't work ...the two nodes stop responding to one another ... although the client wifi device connectes fine ...

#Intro to easyMesh
easyMesh is a library that takes care of the particulars for creating a simple mesh network using Arduino and esp8266. The goal is to allow the programmer to work with a mesh network without having to worry about how the network is structured or managed.

Expand All @@ -11,7 +20,7 @@ easyMesh uses JSON objects for all its messaging. There a couple of reasons for
easyMesh is designed to be used with Arduino, but it does not use the Arduino WiFi libraries, as I was running into performance issues (primarily latency) with them. Rather the networking is all done using the native esp8266 SDK libraries, which are available through the Arduino IDE. Hopefully though, which networking libraries are used won’t matter to most users much as you can just include the .h, run the init() and then work the library through the API.

###easyMesh is not IP networking
easyMesh does not create a TCP/IP network of nodes. Rather each of the nodes is uniquely identified by its 32bit chipId which is retrieved from the esp8266 using the system_get_chip_id() call in the SDK. Every esp8266 will have a unique number. Messages can either be broadcast to all of the nodes on the mesh, or sent specifically to an individual node which is identified by its chipId.
easyMesh does not create a TCP/IP network of nodes. Rather each of the nodes is uniquely identified by its 32bit nodeId which is retrieved from the esp8266 using the wifi_get_macaddr(SOFTAP_IF) call from the SDK and encoding it into a 32bit interger. Every esp8266 will have a unique number. Messages can either be broadcast to all of the nodes on the mesh, or sent specifically to an individual node which is identified by its nodeId.

###Examples
demoToy is currently the only example. It is kind of complex, uses a web server, web sockets, and neopixel animations, so it is not really a great entry level example. That said, it does some pretty cools stuff… here is a video of the demo.
Expand All @@ -35,14 +44,14 @@ easyMesh mesh;

##Member Functions

###void easyMesh::init( String prefix, String password, uint16_t port )
###void easyMesh::init( String ssid, String password, uint16_t port )
Add this to your setup() function.
Initialize the mesh network. This routine does the following things…
- Starts a wifi network
- Begins searching for other wifi networks that are part of the mesh
- Logs on to the best mesh network node it finds… if it doesn’t find anything, it starts a new search in 5 seconds.

prefix = the name of your mesh. The wifi ssid of this node will be prefix + chipId
ssid = the ssid of your mesh.
password = wifi password to your mesh
port = the TCP port that you want the mesh server to run on

Expand Down Expand Up @@ -87,8 +96,8 @@ returns true if everything works, false if not. Prints an error message to Seri
###uint16_t easyMesh::connectionCount()
Returns the total number of nodes connected to this mesh.

###uint32_t easyMesh::getChipId( void )
Return the chipId of the node that we are running on.
###uint32_t easyMesh::getNodeId( void )
Return the nodeId of the node that we are running on.

###uint32_t easyMesh::getNodeTime( void )
Returns the mesh timebase microsecond counter. Rolls over 71 minutes from startup of the first node.
126 changes: 126 additions & 0 deletions docs/html/annotated.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>easyMesh: Class List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">easyMesh
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li class="current"><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('annotated.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
<div class="headertitle">
<div class="title">Class List</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><div class="directory">
<table class="directory">
<tr id="row_0_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="classeasy_mesh.html" target="_self">easyMesh</a></td><td class="desc"></td></tr>
<tr id="row_1_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structmesh_connection_type.html" target="_self">meshConnectionType</a></td><td class="desc"></td></tr>
<tr id="row_2_" class="even"><td class="entry"><img src="ftv2lastnode.png" alt="\" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="classtime_sync.html" target="_self">timeSync</a></td><td class="desc"></td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated on Sun Oct 23 2016 10:05:01 for easyMesh by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
</ul>
</div>
</body>
</html>
6 changes: 6 additions & 0 deletions docs/html/annotated.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var annotated =
[
[ "easyMesh", "classeasy_mesh.html", "classeasy_mesh" ],
[ "meshConnectionType", "structmesh_connection_type.html", "structmesh_connection_type" ],
[ "timeSync", "classtime_sync.html", "classtime_sync" ]
];
Binary file added docs/html/bc_s.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/html/bdwn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading