PDA

View Full Version : Need some help


drew
11-05-2008, 04:05 PM
Ok, here's what I've been trying unsuccessfully to do. I want to take the SN111 board and hook it up to Portal using RS-232, and then send it a command using hyper terminal. I then want this command to be sent wirelessly to the SN171 Protoboard, which will then send the command serially to a third party board. I have the protoboard hooked up to a communications port on the third party board using GND, GPIO3 (UART0 In), and GPIO4 (UART0 Out). Also, I will eventually want to be able to send a command from the third party board to the SN171 and send it wirelessly to the SN111.

In the script for the SN111 I am initializing UART1 at the baud rate I need, cross connecting UART1 with STDIO (I'm thinking this will allow me to communicate with hyper terminal), and cross connecting UART0 with TRANSPARENT (I'm thinking this will allow me to communicate wirelessly with the SN171).

In the script for the SN171 I am initializing UART0 at the baud rate I need, cross connecting UART0 with STDIO (I'm thinking this will allow the SN171 to communicate with the third party board), and cross connecting UART1 with TRANSPARENT (I'm thinking this will allow the SN171 to communicate wirelessly with the SN111).

Am I cross connecting incorrectly for what I need done, or is there something else I need to add to the script? Any help would be appreciated.

kbanks
11-05-2008, 04:56 PM
Ok, here's what I've been trying unsuccessfully to do. I want to take the SN111 board and hook it up to Portal using RS-232, and then send it a command using hyper terminal.

I realize I am being REALLY literal here, but I want to be sure you understand that you cannot use a single RS-232 port on a single board to talk to both Portal and to Hyperterm.

Portal speaks "Packet Serial", our proprietary protocol. Hyperterm speaks straight ASCII.

You could use a SN163 Bridge Demonstration board. The USB port could be configured for Packet Serial, and would be how the node talked to Portal. The serial port could be used for TRANSPARENT MODE or STDIO MODE (depending on your exact needs).

I then want this command to be sent wirelessly to the SN171 Protoboard, which will then send the command serially to a third party board. I have the protoboard hooked up to a communications port on the third party board using GND, GPIO3 (UART0 In), and GPIO4 (UART0 Out).

Since you say you are using UART0, I assume you are making a logic level (3.3 volt) connection using the terminal blocks on the side?

If you are trying to make a RS-232 connection, then you have to be on UART1, not UART0.

Also, I will eventually want to be able to send a command from the third party board to the SN171 and send it wirelessly to the SN111.

You did see the examples in the SNAP Reference Manual and here on the forum in the SNAPpy Script Exchange, right?

In the script for the SN111 I am initializing UART1 at the baud rate I need, cross connecting UART1 with STDIO (I'm thinking this will allow me to communicate with hyper terminal), and cross connecting UART0 with TRANSPARENT (I'm thinking this will allow me to communicate wirelessly with the SN171).

When you say SN111 do you mean SN163? The SN111 only has one serial port.

Doing a crossConnect() with DS_STDIO is correct, *if* you want SNAPpy to deal with the serial data on that UART.

Doing a crossConnect() with DS_TRANSPARENT and the other UART sounds correct, but be sure to also tell DS_TRANSPARENT where to go (see functions ucastSerial() and mcastSerial())

In the script for the SN171 I am initializing UART0 at the baud rate I need, cross connecting UART0 with STDIO (I'm thinking this will allow the SN171 to communicate with the third party board), and cross connecting UART1 with TRANSPARENT (I'm thinking this will allow the SN171 to communicate wirelessly with the SN111).

Seems in the ballpark, as long as you are also doing a ucastSerial() or mcastSerial() call to "finish" establishing the TRANSPARENT link.

Also watch those UART voltage levels (don't hook non-3.3 volt signals to the terminal blocks). (I realize you probably are not, I'm just trying to cover all the bases. We did have a customer fry a board a couple of weeks back).

drew
11-06-2008, 03:22 PM
I have another question. When using mcastSerial or ucastSerial where do I find the group or address to specify where to send the TRANSPARENT signal to? Is it just the network address of the node in Portal?

Ya, I meant the 163 board, not the 111 board. Sorry about that. Also, I am using the terminal blocks on the 171 board for UART0. Thanks for the help so far.

kbanks
11-06-2008, 03:28 PM
For mcastSerial() you get to pick the group. Look on pages 75 and 76 of the SNAP Reference Manual, at ID 5 and ID 6 for more about Groups.

If you are going to send TRANSPARENT data to a particular group, make sure one or more nodes are configured to pay attention to that group.

(The quick answer is to use group 1, which all nodes by default both accept and forward).

For ucastSerial(), yes it is the usual SNAP Network Address that you want. You can see these addresses within Portal, or read them off of the sticker on the RF Engine (last 3 bytes of the 8 byte MAC address)