Synapse Support Forums  

Go Back   Synapse Support Forums > Synapse > SNAPpy Script Exchange

Reply
 
Thread Tools Display Modes
  #1  
Old 04-04-2008, 02:52 PM
kbanks kbanks is offline
Synapse Developer
 
Join Date: Jan 2008
Location: Huntsville, AL
Posts: 1,173
Default Setting up Point-to-Point Data Mode

Using Synapse SNAP Pro nodes to replace an existing RS-232 serial cable requires two nodes and two scripts (attached).

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.
Attached Files
File Type: py datamode1.py (838 Bytes, 118 views)
File Type: py datamode2.py (838 Bytes, 90 views)
Reply With Quote
  #2  
Old 09-08-2008, 08:27 AM
kbanks kbanks is offline
Synapse Developer
 
Join Date: Jan 2008
Location: Huntsville, AL
Posts: 1,173
Default Setting up Point-to-Point with 2.1 firmware

As mentioned on page 5 (item 6) of the 2.1.5 Release notes (it's mentioned in previous release notes too, but I don't have the page numbers handy), as of 2.1 multicasts messages get sent over the Packet Serial interface (in addition to still going out over the radio).

Also, to ensure connectivity, Packet Serial defaults to ON.

If you want to use the DEFAULT UART for other purposes, be sure and do a

Code:
    crossConnect(DS_NULL, DS_PACKET_SERIAL)
so Packet Serial traffic won't get mixed in with your DATA MODE (AKA TRANSPARENT MODE traffic).

I have attached updated copies of dataMode1.py and dataMode2.py.
Attached Files
File Type: py datamode1.py (928 Bytes, 57 views)
File Type: py datamode2.py (928 Bytes, 44 views)
Reply With Quote
  #3  
Old 09-08-2008, 09:22 AM
kbanks kbanks is offline
Synapse Developer
 
Join Date: Jan 2008
Location: Huntsville, AL
Posts: 1,173
Default The long term solution

We are going to change the way crossConnect() works in the next build of the SNAP core firmware (2.1.6).

The previous post gives you a work-around if you are running build 2.1.1 through 2.1.5.

In 2.1.6, crossConnect() will become "exclusive". If you do something like

Code:
crossConnect(DS_UART1, DS_TRANSPARENT)
then any pre-existing connections to DS_UART1 will be undone.

As of 2.1.6, if you need non-exclusive connections, use the uniConnect() function instead of the crossConnect() function.
Reply With Quote
  #4  
Old 04-16-2009, 09:56 AM
kbanks kbanks is offline
Synapse Developer
 
Join Date: Jan 2008
Location: Huntsville, AL
Posts: 1,173
Default Using example scripts from 2.0 with 2.1

Some of the example scripts were written during the time of SNAP 2.0, and so have lines like:

Code:
from switchboard import *
When we created the 2.1 series, we cleaned up the snappyImages directory some by adding a "synapse" subdirectory, and moving some of the "importable" scripts into this subdirectory.

If you have an example script that won't load, try making a change like

Code:
from synapse.switchboard import *
Reply With Quote
  #5  
Old 01-14-2010, 08:03 PM
KPSECS KPSECS is offline
Junior Member
 
Join Date: Jan 2010
Posts: 1
Default Kpsecs

I am interested in trying the RS-232 data link.
Would like to use the SNAPPY prototype board ?
Would you have a diagram of the connections or do I just use the RS-232 connector on the prototype board ??

Thanks;
Reply With Quote
  #6  
Old 01-15-2010, 08:29 AM
mgenti's Avatar
mgenti mgenti is offline
Synapse Developer
 
Join Date: Jan 2008
Location: Synapse
Posts: 556
Default

Quote:
Originally Posted by KPSECS View Post
Would you have a diagram of the connections or do I just use the RS-232 connector on the prototype board ??
The built-in DB9 on either of our boards would work fine to test data mode.
__________________
--Mark
Synapse Design Engineer
Reply With Quote
  #7  
Old 07-30-2010, 04:37 AM
rsingh161 rsingh161 is offline
Junior Member
 
Join Date: Jul 2010
Posts: 1
Default wanna send and recieve the data b/t two nodes..

Hello to all,

I am using ZICM2400p0 Boards,and scrpits(Attached)
wanna send and recieve the data b/t two nodes..
and wanna see the transfered data on the portal window...
there is no UART interface function in the SNAP LIB.....
What are the changes I need in my scripts Please tell me.
Attached Files
File Type: py datamode1.py (843 Bytes, 2 views)
File Type: py datamode2.py (843 Bytes, 2 views)
Reply With Quote
  #8  
Old 07-30-2010, 10:20 AM
mgenti's Avatar
mgenti mgenti is offline
Synapse Developer
 
Join Date: Jan 2008
Location: Synapse
Posts: 556
Default

The way your scripts are currently configured you are doing point-to-point data mode so Portal would never see these packets. You need to setup your nodes to do point-to-multipoint data mode. There are several threads on this forum on this topic as well as more information in the SNAP manuals included with Portal.
__________________
--Mark
Synapse Design Engineer
Reply With Quote
  #9  
Old 08-02-2010, 01:17 AM
vivekgang vivekgang is offline
Junior Member
 
Join Date: Jul 2010
Location: NOIDA,India
Posts: 14
Default RF communication b\t two nodes.

Hi Mark,

This is vivek from India am just new developer for SNAP.
I Have ZIC2410p0 Boards,on that I wanna run the snap script for Data Transfering b\t the nodes and wanna see the Packets on to portal.
I have facing the problem in transfering and see the data on the portal.
Please help me find the attachement for my script..
If you have any Example related with the RF communication b\t two nodes.
please send me.

Thanks.
vivek.gangwar@nxgn.in
Attached Files
File Type: py datamode2.py (989 Bytes, 2 views)
Reply With Quote
  #10  
Old 08-02-2010, 09:08 AM
mgenti's Avatar
mgenti mgenti is offline
Synapse Developer
 
Join Date: Jan 2008
Location: Synapse
Posts: 556
Default

There are several threads on the forum that describe what you are trying to do and even give example scripts, such as this one.

Looking at your script you are using the wrong command, you need to setup multi-cast data mode using the mcastSerial command.
__________________
--Mark
Synapse Design Engineer

Last edited by mgenti; 08-02-2010 at 09:10 AM. Reason: link
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:26 PM.


Powered by vBulletin® Version 3.7.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.