YUN and nmea

I want to make a wireless gps server useing YUN. Connecting the GPS module to the YUN: no problem. But how to send and receive the acsii characters (nmea strings) from the YUN via WiFi to my computer, running opencpn, which is an open-source map program? Within this program I can only fill in IP-adress and port-number. The wired version I configured with arduino Mega 2560 and ethernet-shield works fine. But the question is: how to make it wireless whith YUN.

Regards Willy Carote

What is your application written in?

Hi, it is written in C++ and I have it running on windows and Linux (opencpn.org). On my arduino ethernet configuration I can receive the data on Linux (opencpn), on windows (opencpn) and even on my android mobile (running EASYAIS) .

Willy Carote

The interface to the GPS is serial correct?

If you have a TCP/IP stack in the arduino, then you should be able to create a socket that sends data, it doesn't matter if the interface is wired or wireless, the IP stack should enable you to target the Wifi interface.

Sharing raw NMEA GPS data over the network with multiple clients

http://wiki.openwrt.org/doc/howto/networked.gps

by GPSD

http://trac.gateworks.com/wiki/OpenWrt/GPS

With al little bit help from my friends.

I feel that I am almost there.

I can run the sketch (ref: below) on the YUN, than I get 'SSH-2.0-dropbear_2012.55'
and
I can run putty (terminal) and than I also get 'SSH-2.0-dropbear_2012.55'

How to connect them together, so that can I send a character in putty and receive it on my YUN?
Please give the missing link :slight_smile:


#include <YunClient.h>
YunClient client;
IPAddress server(192,168,1,121);
int led_pin = 13;
int led =1;
void setup() {
Serial.begin(9600);
Bridge.begin();
delay(20000);
while (!Serial);
{
Serial.print("Connecting...");

if (client.connect(server, 22))
{
Serial.println("Done!");
}
else
{
Serial.println("Fail");
while (1); // endless loop
}
}
}
void loop() {
if (client.available() > 0){
Serial.write(client.read());
}
if (led == 1)
{
led = 0;
}
else
{
led = 1;
}
digitalWrite(led_pin, led);
delay(100);

}

I have my YUN-wifi-gps-server working.
"Ethernet Shield should be portable to the Yun by replacing EthernetClient/EthernetServer with YunClient/YunServer"
did the trick
AND
ALSO
VERY important:
using processing 2.0 example "chatserver" instead of putty.exe gave me the main leap.