Show Posts
Pages: [1] 2 3
1  Using Arduino / Networking, Protocols, and Devices / Re: WiFlySerial and WiFly RN-XV on: July 20, 2012, 11:21:26 am
Have you checked your Streaming library if the << operator is doing what you expect it to do? The standard Print class does not support that operator.

Rather than pick apart the streaming library ( I wouldn't know where to begin) I've tried this:

Code:
strRequest = "GET " + String(MY_SERVER_GET_URL) + "?count=" + iLoopCounter + " HTTP/1.0\n" + "Host: " + String(MY_SERVER_GET) + "\n" + "Connection: close\n\n\n";

which looks a lot more familar to me.  Works fine when the php GET check isn't there but fails with the check as the other string did.
2  Using Arduino / Networking, Protocols, and Devices / Re: WiFlySerial and WiFly RN-XV on: July 19, 2012, 07:21:01 am
I found it: "\n" is just a newline, a correct client request must have "\r\n" to end a line.

mmm I tried changing them all and no difference. 

Code:
// Build GET expression
    strRequest << F("GET ") << MY_SERVER_GET_URL << F("?count=") << iLoopCounter
    << F(" HTTP/1.0") << "\r\n"
    << F("Host: ") << MY_SERVER_GET << "\r\n"
    << F("Connection: close") << "\r\n"
    << "\r\n";
    // send data via request
    // close connection

What's strange is when I look at the output in the serial monitor, it looks like this:

Code:
$$$set u m 1 set u b 9600 vershow conn open www.mysite.com 80GET /in-progress/arduino-test/counter/index.php?count=17 HTTP/1.0
Host: www.mysite.com
Connection: close

The GET is pushed right up against the 80.  I tried a \r\n there as well (which would make sense since php doesn't see it as a GET) but it didn't make any difference.
3  Using Arduino / Networking, Protocols, and Devices / Re: WiFlySerial and WiFly RN-XV on: July 18, 2012, 07:20:05 am
ok found the issue, this:

Code:
   // Build GET expression
    strRequest << F("GET ") << MY_SERVER_GET_URL << F("?count=") << iLoopCounter
    << F(" HTTP/1.0") << "\n"
    << F("Host: ") << MY_SERVER_GET << "\n"
    << F("Connection: close") << "\n"
    << "\n\n";
    // send data via request
    // close connection

is not a true or correct GET request (I don't know which it is or why and I would quite like to know why).  So my php check for the GET request was failing:

Code:
if ($_SERVER['REQUEST_METHOD'] == 'GET')

It didn't fail through the browser, command line or my Max/MSP tests as they are all true GET requests.  The request string is almost identical to the one in the WebClientGetPost example that comes with WiFly (I just changed the variable and value) so that must be wrong as it's normal to check php side if it's a GET or POST request (amongst some other checks to see if the request originates from the right source).

Thanks for all your help and patience pylon, this I think has been technically the most gruelling thing I've ever done.

Garrett
4  Using Arduino / Networking, Protocols, and Devices / Re: WiFlySerial and WiFly RN-XV on: July 18, 2012, 06:49:26 am
I did a quick test this morning to test calling my php page from something other than the browser.  30 seconds to make in Max/MSP the equivalent of what I'm trying to do with the Arduino:

Code:
download http://www.mysite.com/in-progress/arduino-test/counter/index.php?count=2
|
jit.uldl

My computer is wirelessly on the same network as the WiFly and my txt counter on the remote server updates without any issues.  So the problem has to be with the Arduino or WiFly.
5  Using Arduino / Networking, Protocols, and Devices / Re: WiFlySerial and WiFly RN-XV on: July 17, 2012, 12:24:00 pm
ok, I couldn't filter the hosts, WireShark just kept telling me the syntax was wrong but I did a capture and located the following for UDP:

Code:
No.     Time           Source                Destination           Protocol Length Info
    345 5.138944000    192.168.1.68          255.255.255.255       UDP      152    Source port: cisco-sccp  Destination port: 55555

Frame 345: 152 bytes on wire (1216 bits), 152 bytes captured (1216 bits) on interface 0
    Interface id: 0
    WTAP_ENCAP: 1
    Arrival Time: Jul 17, 2012 18:01:55.419436000 BST
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1342544515.419436000 seconds
    [Time delta from previous captured frame: 0.019490000 seconds]
    [Time delta from previous displayed frame: 0.019490000 seconds]
    [Time since reference or first frame: 5.138944000 seconds]
    Frame Number: 345
    Frame Length: 152 bytes (1216 bits)
    Capture Length: 152 bytes (1216 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: eth:ip:udp:data]
    [Coloring Rule Name: UDP]
    [Coloring Rule String: udp]
Ethernet II, Src: RovingNe_80:1f:f2 (00:06:66:80:1f:f2), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol Version 4, Src: 192.168.1.68 (192.168.1.68), Dst: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: cisco-sccp (2000), Dst Port: 55555 (55555)
Data (110 bytes)

0000  00 18 f6 93 6c cd 01 28 07 d0 00 00 01 42 0c 4a   ....l..(.....B.J
0010  0d 11 54 69 6d 65 20 4e 4f 54 20 53 45 54 00 00   ..Time NOT SET..
0020  57 69 46 6c 79 20 56 65 72 20 32 2e 33 32 2c 20   WiFly Ver 2.32,
0030  30 32 2d 31 33 2d 32 30 31 32 00 00 57 69 46 6c   02-13-2012..WiFl
0040  79 2d 45 5a 58 00 00 00 00 00 00 00 00 00 00 00   y-EZX...........
0050  00 00 00 00 00 00 00 00 00 00 00 00 b9 00 00 00   ................
0060  00 00 00 00 00 00 00 00 00 00 00 00 00 00         ..............

Follow UDP Stream of that was:

Code:
....l..(.....B.J
.Time NOT SET..WiFly Ver 2.32, 02-13-2012..WiFly-EZX.............................................l..(.....K.I
1Time NOT SET..WiFly Ver 2.32, 02-13-2012..WiFly-EZX.........................................

The TCP one is:

Code:
No.     Time           Source                Destination           Protocol Length Info
    396 5.855564000    62.81.51.152          192.168.1.68          TCP      54     http > 61394 [ACK] Seq=1 Ack=82 Win=5840 Len=0

Frame 396: 54 bytes on wire (432 bits), 54 bytes captured (432 bits) on interface 0
    Interface id: 0
    WTAP_ENCAP: 1
    Arrival Time: Jul 17, 2012 18:01:56.136056000 BST
    [Time shift for this packet: 0.000000000 seconds]
    Epoch Time: 1342544516.136056000 seconds
    [Time delta from previous captured frame: 0.000630000 seconds]
    [Time delta from previous displayed frame: 0.000630000 seconds]
    [Time since reference or first frame: 5.855564000 seconds]
    Frame Number: 396
    Frame Length: 54 bytes (432 bits)
    Capture Length: 54 bytes (432 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: eth:ip:tcp]
    [Coloring Rule Name: HTTP]
    [Coloring Rule String: http || tcp.port == 80]
Ethernet II, Src: ThomsonT_93:6c:cc (00:18:f6:93:6c:cc), Dst: RovingNe_80:1f:f2 (00:06:66:80:1f:f2)
Internet Protocol Version 4, Src: 62.81.51.152 (62.81.51.152), Dst: 192.168.1.68 (192.168.1.68)
Transmission Control Protocol, Src Port: http (80), Dst Port: 61394 (61394), Seq: 1, Ack: 82, Len: 0

Follow TCP Stream of that was:

Code:
HTTP/1.1 200 OK
Date: Tue, 17 Jul 2012 17:01:56 GMT
Server: Apache/2.0.52 (Red Hat)
X-Powered-By: PHP/5.2.2
Content-Length: 0
Connection: close
Content-Type: text/html

There was also a HTTP stream:

Code:
No.     Time           Source                Destination           Protocol Length Info
    401 5.906948000    62.81.51.152          192.168.1.68          HTTP     231    HTTP/1.1 200 OK

Frame 401: 231 bytes on wire (1848 bits), 231 bytes captured (1848 bits) on interface 0
Ethernet II, Src: ThomsonT_93:6c:cc (00:18:f6:93:6c:cc), Dst: RovingNe_80:1f:f2 (00:06:66:80:1f:f2)
Internet Protocol Version 4, Src: 62.81.51.152 (62.81.51.152), Dst: 192.168.1.68 (192.168.1.68)
Transmission Control Protocol, Src Port: http (80), Dst Port: 61394 (61394), Seq: 1, Ack: 118, Len: 177
Hypertext Transfer Protocol

Both TCP and HTTP have my sites correct ip address.

I've gone back into CMD mode for the WiFly to check it's configuration and it looks fine:

Code:
show net

SSid=BTHomeHub-2BF6
Chan=1
Assoc=OK
Rate=12, 24Mb
Auth=OK
Mode=WEP
DHCP=OK,renew=64651
Boot=148
Time=FAIL
Links=1
<2.32>
6  Using Arduino / Networking, Protocols, and Devices / Re: WiFlySerial and WiFly RN-XV on: July 17, 2012, 07:50:47 am
[No, I mean server side. A web client requests a resource on the server. That resource has a path (better: location) on the server and that's what you have to supply on the GET line.

I think we are talking at cross purposes though.  I'm used to programming in things like php and when I mean server-side path I don't mean the tail end of the url.

i.e. not /in-progress/arduino-test/counter/index.php from:
http://www.mysite.com/in-progress/arduino-test/counter/index.php

I mean the server path of that file which might be:
/www/html/in-progress/arduino-test/counter/index.php

You do mean the tail end of the url don't you, as it's visible on the web?


That doesn't mean it's available for the Arduino. Is that www.mysite.com a local or a remote site? Meaning, is it in your LAN or somewhere else in the Internet?

It's remote.


This is just a connection test, you haven't sent the request. After you have the connection send that line with hitting return twice at the end:

Code:
GET /in-progress/arduino-test/counter/index.php?count=237 HTTP/1.0

Post the result you get (you can change all IPs and domain names if your security imposes).

Here's the output, looks fine.

telnet mysite.com 80
Trying 62.81.51.152...
Connected to mysite.com.
Escape character is '^]'.
   
GET /in-progress/arduino-test/counter/index.php?count=237 HTTP/1.0

HTTP/1.1 200 OK
Date: Tue, 17 Jul 2012 12:40:48 GMT
Server: Apache/2.0.52 (Red Hat)
X-Powered-By: PHP/5.2.2
Content-Length: 0
Connection: close
Content-Type: text/html
7  Using Arduino / Networking, Protocols, and Devices / Re: WiFlySerial and WiFly RN-XV on: July 16, 2012, 06:46:02 pm
On the GET line you must not supply a URL (with the http:// and the server) but the path (location) on the server.

You mean path client side not server side right?


Have you checked if you WiFly gets an IP? And a DNS server? Does your www.mysite.com resolve on that DNS server?

Through my router configuration panel yes.  It has the ip 192.168.1.68.  A DNS server, for my WiFly or for www.mysite.com?  Mysite.com works, I can access it through a browser.  If I type it's ip address it also works.


Have tried doing the same request manually (using the telnet command on the command line)?

Yes and it works fine.

Code:
telnet mysite.com 80
Trying 62.81.51.152...
Connected to mysite.com.
8  Using Arduino / Networking, Protocols, and Devices / Re: WiFlySerial and WiFly RN-XV on: July 16, 2012, 11:26:19 am
This

Code:
#define MY_SERVER_GET "www.mysite.com"
#define MY_SERVER_GET_URL "http://www.mysite.com/in-progress/arduino-test/counter/index.php"

without the http:// seems to be doing something.  In the Serial Monitor I'm now getting:

Code:
$$$open www.mysite.com 80
GET http://www.mysite.com/in-progress/arduino-test/counter/index.php?count=237 HTTP/1.1
Host: www.mysite.com
Connection: close

with the count number incrementing up each time.  My php counter however still doesn't seem to be called.  The full code is below again.

thanks
Garrett

Code:
#include <Arduino.h>
#include <Time.h>
#include <SoftwareSerial.h>
#include <Streaming.h>
#include <PString.h>
#include <WiFlySerial.h>


//various buffer sizes
#define REQUEST_BUFFER_SIZE 180
#define TEMP_BUFFER_SIZE 60

//server hosting GET example php script
#define MY_SERVER_GET "www.mysite.com"
#define MY_SERVER_GET_URL "http://www.mysite.com/in-progress/arduino-test/counter/index.php"

//xbee pro shiel uses pins 0, 1
WiFlySerial wifi(0, 1);
char bufRequest[REQUEST_BUFFER_SIZE];
char bufTemp[TEMP_BUFFER_SIZE];

//sotware serial pins for testing
//SoftwareSerial mySerial(4, 5);

//loop counter
int iLoopCounter = 0;

//start time
unsigned long startTime = 0;


void setup()
{
  //set up serial
  //Serial.begin(9600);
 
  //set the data rate for the SoftwareSerial port and send a message to test
  //mySerial.begin(9600);
  //mySerial.println("Software serial working");
 
  //start up WiFly
  wifi.begin();

  //mySerial.println("Joined");
}


void loop()
{
  //calculate the time since last time the cycle was completed
  unsigned long loopTime = millis() - startTime;

  //to test
  //mySerial.println("test 0");

  //if the timer is greater than or equal to 5 seconds (5000 milliseconds)
  if (loopTime >= 5000)
  {
    char bufRequest[REQUEST_BUFFER_SIZE];
    PString strRequest(bufRequest, REQUEST_BUFFER_SIZE);
     
    // Build GET expression
    strRequest << F("GET ") << MY_SERVER_GET_URL << F("?count=") << iLoopCounter
    << F(" HTTP/1.1") << "\n"
    << F("Host: ") << MY_SERVER_GET << "\n"
    << F("Connection: close") << "\n"
    << "\n\n";
    // send data via request
    // close connection
 
    //to see what the GET request looks like
    //mySerial << F("GET request:")  << strRequest << endl;
     
    //open connection, then send GET Request, and display response.
    if (wifi.openConnection(MY_SERVER_GET))
    {
      wifi <<  (const char*) strRequest << endl;
   
      //to test
      //mySerial.println("test 2");
   
      // Show server response

      //how long to wait before timing out on the GET request
      unsigned long TimeOut = millis() + 3000;

      while (millis()  < TimeOut && wifi.isConnectionOpen())
      {
        if (wifi.available() > 0)
        {
            wifi.read();
        }
      }

      //force-close connection
      wifi.closeConnection();
    }
    else
    {
      //failed to open
      //mySerial.println("Failed to open connection");
    }
 
    //restart timer
    startTime = millis();
  }

  //increment the loop counter
  iLoopCounter++;

  //to prevent spamming serial monitor too much
  delay(250);
}
9  Using Arduino / Networking, Protocols, and Devices / Re: WiFlySerial and WiFly RN-XV on: July 16, 2012, 10:54:45 am
I have tried

Code:
#define MY_SERVER_GET "http://www.mysite.com/"
#define MY_SERVER_GET_URL "in-progress/arduino-test/counter/index.php"

and this

Code:
#define MY_SERVER_GET "http://www.mysite.com"
#define MY_SERVER_GET_URL "/in-progress/arduino-test/counter/index.php"

Still no change, my php page doesnot get called.
10  Using Arduino / Networking, Protocols, and Devices / Re: WiFlySerial and WiFly RN-XV on: July 16, 2012, 09:18:45 am
ah sorry I mistyped it here when I changed the url, the slash is there on the MY_SERVER_GET

Code:
#define MY_SERVER_GET "http://www.mysite.com/"
#define MY_SERVER_GET_URL "in-progress/arduino-test/counter/index.php"
11  Using Arduino / Networking, Protocols, and Devices / Re: WiFlySerial and WiFly RN-XV on: July 16, 2012, 06:31:27 am
Yes, you're using the pins 2 and 3 but your shield is connected to 0 and 1 (http://www.shieldlist.org/dfrobot/xbee).

ok I did suspected that was the case and had tried 0, 1 but it didn't work for me (what I didn't know was that using softwareserial to debug was causing a conflict).  I've commented out all the software serial debugging lines for now and in serial monitor I now see the line:

open http://www.mysite.com/ 80

every three seconds so it looks like it's connecting and the loop is firing.  However when I check my php page (which saves to a txt counter file) it's not being called.  The full url is (I've changed the domain name here):

http://www.mysite.com/in-progress/arduino-test/counter/index.php?count=1

The php works fine and the txt has write permissions.  This is how my query string is being formed:

Code:
#define MY_SERVER_GET "http://www.mysite.com"
#define MY_SERVER_GET_URL "in-progress/arduino-test/counter/index.php"

Code:
strRequest << F("GET ") << MY_SERVER_GET_URL << F("?count=") << iLoopCounter
    << F(" HTTP/1.1") << "\n"
    << F("Host: ") << MY_SERVER_GET << "\n"
    << F("Connection: close") << "\n"
    << "\n\n";

Is this being formed correctly?  What's the 80 in the serial monitor message, the port or an error number?

With this shield you should think about using another library that uses the hardware UART instead of the SoftwareSerial library. Because you are using the same library for debugging and only one instance can be actively receiving data.

I'm looking for an alternative.

Thanks.

Garrett
12  Using Arduino / Networking, Protocols, and Devices / WiFlySerial and WiFly RN-XV on: July 15, 2012, 10:26:15 am
Hi

This is a follow on from a previous thread here (http://arduino.cc/forum/index.php/topic,109308.0.html) as I'm still unable to get my wireless arduino up and running.

I'm using a:

- WiFly RN-XV (http://www.sparkfun.com/products/11047)
- xBee Pro Shield (http://www.dfrobot.com/wiki/index.php?title=Xbee_Shield_For_Arduino_%28no_Xbee%29_%28SKU:DFR0015%29)
- Arduino Duemilanove

(images attached below) on Arduino 1.0 with WiFly Driver for 1.0 (http://sourceforge.net/projects/arduinowifly/files/).

I'm also using softwareserial for debugging through pins 4 and 5.

I've managed to get my WiFly configured (directly from the computer), the green led blinks slowly and my router devices shows the WiFly is on the network.  The reason I did it this way was so I could keep my arduino code to a minimum so I could understand how to just start the wiflyserial and send a GET request from the arduino to a php webpage (no dealing with network configuration, passwords etc.).

Below is my arduino and php code which I can't get to work.  It stops as soon as it gets to wifi.begin();.  Now I assume there is nothing wrong with the WiFlySerial library itself so the only thing I can see that could go wrong this early is a) I'm not including something I should be or b) I'm using the wrong RX/TX in WiFlySerial wifi(2, 3);?

I think that it's the later, that my arduino isn't communicating with the rn-xv.  Is there a way to test this?

Thanks in advance
Garrett


Code:
#include <Arduino.h>
#include <Time.h>
#include <SoftwareSerial.h>
#include <Streaming.h>
#include <PString.h>
#include <WiFlySerial.h>


//various buffer sizes
#define REQUEST_BUFFER_SIZE 180
#define TEMP_BUFFER_SIZE 60

//server hosting GET example php script
#define MY_SERVER_GET "http://www.mysite.com/"
#define MY_SERVER_GET_URL "in-progress/arduino-test/counter/index.php"

WiFlySerial wifi(2, 3);
char bufRequest[REQUEST_BUFFER_SIZE];
char bufTemp[TEMP_BUFFER_SIZE];

//sotware serial pins for testing
SoftwareSerial mySerial(4, 5);

//loop counter
int iLoopCounter = 0;

//start time
unsigned long startTime = 0;


void setup()
{
  //set up serial
  //Serial.begin(9600);
 
  //set the data rate for the SoftwareSerial port and send a message to test
  mySerial.begin(9600);
  mySerial.println("Software serial working");
 
  //start up WiFly
  wifi.begin();
  mySerial.println("Joined");
}


void loop()
{
  //calculate the time since last time the cycle was completed
  unsigned long loopTime = millis() - startTime;

  //to test
  mySerial.println("test 0");

  //if the timer is greater than or equal to 5 seconds (5000 milliseconds)
  if (loopTime >= 5000)
  {

    char bufRequest[REQUEST_BUFFER_SIZE];
    PString strRequest(bufRequest, REQUEST_BUFFER_SIZE);
     
    // Build GET expression
    strRequest << F("GET ") << MY_SERVER_GET_URL << F("?count=") << iLoopCounter
    << F(" HTTP/1.1") << "\n"
    << F("Host: ") << MY_SERVER_GET << "\n"
    << F("Connection: close") << "\n"
    << "\n\n";
    // send data via request
    // close connection
 
    //to see what the GET request looks like
    mySerial << F("GET request:")  << strRequest << endl;
     
    //open connection, then send GET Request, and display response.
    if (wifi.openConnection(MY_SERVER_GET))
    {
      wifi <<  (const char*) strRequest;
   
      //to test
      mySerial.println("test 2");
   
      // Show server response

      //how long to wait before timing out on the GET request
      unsigned long TimeOut = millis() + 3000;

      while (millis()  < TimeOut && wifi.isConnectionOpen())
      {
        if (wifi.available() > 0)
        {
            wifi.read();
        }
      }

      //force-close connection
      wifi.closeConnection();
    }
    else
    {
      //failed to open
      mySerial.println("Failed to open connection");
    }
 
    //restart timer
    startTime = millis();
  }

  //increment the loop counter
  iLoopCounter++;

  //to prevent spamming serial monitor too much
  delay(250);
}


index.php

Code:
<?php

//error_reporting(E_ALL ^ E_NOTICE);

//if their is a GET request
if ($_SERVER['REQUEST_METHOD'] == 'GET'
{
//for debugging
//print_r($_GET);

//if count number in url
if ($_REQUEST['count'])
{
//get count number in url
$count $_REQUEST['count'];
}
else
{
//error no count number in url
$error "No count passed in url.";
}

//name of the counter database file
$logfile "counter.txt";

//open the counter file
$handle fopen($logfile"r+") or die("Can't write to log file! Please Change the file permissions (CHMOD to 666 on UNIX machines!)");

//write the passed count to the file
fwrite($handle$count);

//close file
fclose($handle);
}

?>
13  Using Arduino / Networking, Protocols, and Devices / Re: First steps with WiFly and Arduino on: June 26, 2012, 08:32:43 am
Hi

Yes that worked perfectly, thanks very much, I read the diagram I was looking at wrong (http://www.flickr.com/photos/oskay/3614014331/).

So I'm testing with software serial in my WiFly code now and it seems that the begin() command being sent to the WiFly is where everything stops.  I've stripped it down to keep it simple (i.e. just starting up the wifi) and in the code below it never gets as far as the loop().  Physically all the connections on the arduino to the shield and RN-XV look good, the switch is on xbee and I have no problems configuring the RN-XV from CoolTerm on my computer so I think this elimintates any issues with connections.  Maybe I'm forgetting to include a key library that's needed or could there be something wrong wih the WiFlySerial.h library?

Thanks in advance
Garrett

Code:
#include <Arduino.h>
#include <Time.h>
#include <SoftwareSerial.h>
#include <Streaming.h>
#include <PString.h>
#include <WiFlySerial.h>


//various buffer sizes
#define REQUEST_BUFFER_SIZE 180
#define TEMP_BUFFER_SIZE 60

//server hosting GET example php script
#define MY_SERVER_GET "http://www.asquare.org/"
#define MY_SERVER_GET_URL "in-progress/arduino-test/counter/index.php"


//WiFly pins
#define ARDUINO_RX_PIN  2
#define ARDUINO_TX_PIN  3

WiFlySerial wifi(ARDUINO_RX_PIN, ARDUINO_TX_PIN);
char bufRequest[REQUEST_BUFFER_SIZE];
char bufTemp[TEMP_BUFFER_SIZE];


//sotware serial pins for testing
SoftwareSerial mySerial(4, 5);



//loop counter
int iLoopCounter = 0;

//start time
unsigned long startTime = 0;


void setup()
{
  //set up serial
  //Serial.begin(9600);
 
  //set the data rate for the SoftwareSerial port and send a message to test
  mySerial.begin(9600);
  mySerial.println("Software serial working");
 
  //start up WiFly
  wifi.begin()
 
  //I tried testing with this in the hope it would send back an error code of some sort but nothing
  //mySerial.write(wifi.begin());
 
}


void loop()
{
  //to test
  mySerial.println("test");

  //to prevent spamming serial monitor too much
  delay(250);
}
14  Using Arduino / Networking, Protocols, and Devices / Re: First steps with WiFly and Arduino on: June 23, 2012, 08:23:05 am
Hi

My usbserial cable has arrived and I'm not having much luck getting software serial to work.  At the moment I've disconnected the RN-XV and xBee Shield to keep things simple to just test how software serial works.  I've installed the VCP driver (http://www.ftdichip.com/Drivers/VCP.htm), I guess this is the one I need as opposed to the D2XX driver?  I've restarted and I'm using osx terminal to monitor the software serial port, so I ls /dev/tty.* like so:

Code:
garrett-macbook:~ garrett$ ls /dev/tty.*
/dev/tty.Bluetooth-File-Exchange /dev/tty.Bluetooth-PDA-Sync
/dev/tty.Bluetooth-File-Transfer /dev/tty.usbserial-A6008dRD
/dev/tty.Bluetooth-Modem /dev/tty.usbserial-AH019JWT

I'm following the instructions here (http://hcgilje.wordpress.com/resources/arduino-terminal-and-two-serial-ports/) but I don't see anything like the "/dev/tty.SparkFun-BT-COM0" port he has.  Anyway I connect to the last one:

Code:
screen /dev/tty.usbserial-AH019JWT 9600

This is the code I'm testing which I upload to the arduino via hardware serial:

Code:
#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3);

void setup()  
{
  Serial.begin(57600);
  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600);
  mySerial.println("Hello, world?");
}

void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}

In Arduinos Serial Monitor (set to 57600 baud), the serial lines execute but the software serial lines are never shown in terminal.  I've attached a photo of the usbserial cable wired up just in case there is anything wrong there but I've used the same RX,TX in the script.

Any suggestions as to what I'm doing wrong, perhaps I'm missing another driver or something small like that, would be greatly appreciated.

Thanks in advance.
Garrett
15  Using Arduino / Networking, Protocols, and Devices / Re: First steps with WiFly and Arduino on: June 20, 2012, 11:01:57 am
Ah ok I should probably stick to one of the others then.  Thanks again.

Garrett
Pages: [1] 2 3