Has anyone been able to get this working?
I am able to compile on IDE 1.0.2 using the above library and tweaks but I cant get any of the xport functions to work.
for example xport.reset() or xport.connect().
I am using the following (modified) example from ladyada:
#include <SoftwareSerial.h>
#include <AF_XPort.h>
//#define IPADDR "207.58.139.246" //www.ladyada.net
#define IPADDR "10.0.0.99" //local http server
#define PORT 8008 //non standard port
char linebuffer[256]; // large buffer for storing data
#define XPORT_RXPIN 2
#define XPORT_TXPIN 3
#define XPORT_RESETPIN 4
#define XPORT_DTRPIN 5
#define XPORT_CTSPIN 6
#define XPORT_RTSPIN 7
AF_XPort xport = AF_XPort(XPORT_RXPIN, XPORT_TXPIN, XPORT_RESETPIN, XPORT_DTRPIN, XPORT_RTSPIN, XPORT_CTSPIN);
void setup() {
Serial.begin(57600);
xport.begin(57600);
xport.reset();
delay(1000);
Serial.println("Finished Setup...");
}
void loop()
{
byte ret;
Serial.println("Connecting...");
xport.connect(IPADDR, PORT);
xport.flush(300);
Serial.println("Getting...");
xport.println("GET /door/index.html");
ret=xport.readline_timeout(linebuffer, 255, 3000); // get first line
while(ret!=0){
Serial.println("Output...");
Serial.print(linebuffer);
ret=xport.readline_timeout(linebuffer,255,4000);
}
Serial.print("Readline returned: ");Serial.println(ret,HEX);
}