PDA

View Full Version : Setting Up A Synapse Mesh


hanseen
03-14-2008, 09:52 PM
I would like to setup my EK2500 as a mesh that allows the master unit to talk to any one of the slave units either directly or with some number of jumps inbetween. So I want to hook my master unit up to the SN163 bridge demo board. Probably to the DB9. Then on the slave end, I want to hook up my unit to the SN171 proto board. Again, probably to the DB9 connector. Probably the next thing I need to do is send AT commands to the RFE's at each end to configure the UARTs. Then, I just send bytes to the master and they pop out on the slave end. Do I have that correct? I know this bypasses lots of fun capability in the RFE's, but I am just doing a very simple thing - I want to replace a couple of comms wires with a pair of RFE's. So here's the question - does Synapse have an example or tutorial that will talk me through this process? It seems like a popular application for your RFE's. Thanks in advance.

mgenti
03-17-2008, 11:29 AM
The EK2500 kit no longer uses AT commands to configure the units. Instead each unit is configured through it's SNAPpy script. For a short demonstration of this check out our video at the following link:
http://www.synapse-wireless.com/index.php?option=com_content&task=view&id=114

To configure the units to do transparent serial you will want to create a SNAPpy script that sets this up. In your SNAPpy script you will probably want to add these commands to the startup hook method. You can configure the UART with the command initUart(uartNum, baudRate) and also flowControl(uartNum, isEnabled). Next, you will want to connect the UART data source you are using to the transparent mode data source. This is done with the command crossConnect(dataSrc1, dataSrc2). Lastly we need to tell transparent mode what network address to send to with the command ucastSerial(dstAddr).

Here is an example setup:

initUart(0, 9600)
crossConnect(DS_UART0, DS_TRANSPARENT) #If you are not importing switchboard than replace with 1 and 3
ucastSerial('\x00\x1b\x5a')

kbanks
03-18-2008, 03:22 PM
Using Synapse SNAP Pro nodes to replace an existing RS-232 serial cable requires two nodes and two scripts (two modified copies of the same script actually).

Save out two copies of the following script:


"""
Example of using two SNAP Pro wireless nodes to replace a RS-232 cable
Edit this script to specify the OTHER node's address, and load it into a node
Node addresses are the last three bytes of the MAC address
MAC Addresses can be read off of the RF Engine sticker
For example, a node with MAC Address 001C2C1E 86001B67 is address 001B67
In SNAPpy format this would be address "\x00\x1B\x67"
"""
from switchboard import *

otherNodeAddr = "\x4B\x42\x35" # <= put the address of the OTHER node here

def startupEvent():
initUart(1, 9600) # <= put your desired baudrate here!
flowControl(1, False) # <= set flow control to True or False based on the needs of your application
crossConnect(DS_UART1, DS_TRANSPARENT)
ucastSerial(otherNodeAddr)

snappyGen.setHook(SnapConstants.HOOK_STARTUP, startupEvent)


You will need to know the addresses of your two nodes (readable from the RF Engine stickers, and also displayed within Portal).

Edit each script, and change the “otherNodeAddr” to match what you really have.

You can also edit each script to specify baud rate, and whether or not you want to use hardware flow control.

Put one script in one unit, and the other script in the other. Make sure each node gets the script specifying the OTHER nodes address!

Each unit will send data it receives over its RS-232 port to the other node, who will forward the data out it’s RS-232 port.

truemanr
12-05-2008, 12:49 PM
I'm attempting to run Wireless UART script below, but I'm getting an error:

"ImportError: No module named switchboard"

Suggestions?

+++++++++++++++++++++

Save out two copies of the following script:

Code:
"""Example of using two SNAP Pro wireless nodes to replace a RS-232 cableEdit this script to specify the OTHER node's address, and load it into a nodeNode addresses are the last three bytes of the MAC addressMAC Addresses can be read off of the RF Engine stickerFor example, a node with MAC Address 001C2C1E 86001B67 is address 001B67In SNAPpy format this would be address "\x00\x1B\x67""""from switchboard import *otherNodeAddr = "\x4B\x42\x35" # <= put the address of the OTHER node heredef startupEvent(): initUart(1, 9600) # <= put your desired baudrate here! flowControl(1, False) # <= set flow control to True or False based on the needs of your application crossConnect(DS_UART1, DS_TRANSPARENT) ucastSerial(otherNodeAddr)snappyGen.setHook(SnapCo nstants.HOOK_STARTUP, startupEvent)
You will need to know the addresses of your two nodes (readable from the RF Engine stickers, and also displayed within Portal).

Edit each script, and change the “otherNodeAddr” to match what you really have.

You can also edit each script to specify baud rate, and whether or not you want to use hardware flow control.

Put one script in one unit, and the other script in the other. Make sure each node gets the script specifying the OTHER nodes address!

Each unit will send data it receives over its RS-232 port to the other node, who will forward the data out it’s RS-232 port.

admin
12-05-2008, 04:12 PM
I'm attempting to run Wireless UART script below, but I'm getting an error:

"ImportError: No module named switchboard"

I believe you have stumbled upon an error in our documenation, it should read:
from synapse.switchboard import *
The switchboard script got moved to the synapse sub directory but we apparently forgot to update the documentation. Sorry for the confusion.