hey guys
I try to use the SerlialIP library under osx 10.6.4 - it looks like they dropped slattach: http://discussions.apple.com/thread.jspa?threadID=2491031
any idea how to use slip on a mac?
cheers
hey guys
I try to use the SerlialIP library under osx 10.6.4 - it looks like they dropped slattach: http://discussions.apple.com/thread.jspa?threadID=2491031
any idea how to use slip on a mac?
cheers
I try to use socat to redirect my serial port to an tcp port, thats my command:
socat -d -d -d -x -s -t 30 TCP-LISTEN:4441,reuseaddr,fork PTY:/dev/tty.usbmodem621,raw,nonblock,ispeed=115200,ospeed=115200,ignoreeof,echo=0,onlcr=0,iexten=0,echoctl=0,echoke=0,sane
I can connect to the port, but I didnt succeed! anyone tried this?
Why would I do that? two reasons:
btw thats my test sketch:
#define BAUD_RATE 115200
byte serInStr[16]; // array that will hold the serial input string
#define SERIALBUFFERSIZE 16
byte serialResonse[SERIALBUFFERSIZE];
static void sendAck() {
digitalWrite(13, HIGH);
serialResonse[0] = 'A';
serialResonse[1] = 'K';
Serial.write(serialResonse, 2);
}
void setup() {
pinMode(13, OUTPUT);
memset(serialResonse, 0, SERIALBUFFERSIZE);
Serial.begin(BAUD_RATE); //Setup high speed Serial
Serial.flush();
}
void loop() {
if (readCommand(serInStr) == 0) {
return;
}
digitalWrite(13, HIGH);
delay(200);
digitalWrite(13, LOW);
sendAck();
}
byte readCommand(byte *str) {
byte b,i,sendlen;
i=0;
while (Serial.available()>0 && i==0) {
b = Serial.read();
i=1;
}
return i;
}