gpsbee seeduino stalker no data please help

hi all
can someone offer some advice
I have a ublox gps module mounted on bee module that is running off a seeduino stalker 2.1 atmega 328

the gps runs ok when mounted on uartsbee it opens in the binary consol of the ublox software ok

im using the fat16gps_CSVsensor logger example sketch

the gpsbee pinouts TX pin 2 RX pin 3
the baud rate in the ublox software runs at 9600
so I changed the pinouts and the baudrate in the sketch to match.

the code succesfully creates the csv file but no gps data seems to be written

heres the code im using any help in getting this to work would be most appreiciated
cheers ken

[code] // Ladyada’s logger modified by Bill Greiman to use the Fat16 library
// this is a generic logger that does checksum testing so the data written should be always good
// Assumes a sirf III chipset logger attached to pin 0 and 1

uint8_t sensorCount = 3; //number of analog pins to log

#include <Fat16.h>
#include <Fat16util.h>

// macros to use PSTR
#define putstring(str) SerialPrint_P(PSTR(str))
#define putstring_nl(str) SerialPrintln_P(PSTR(str))

#define isdigit(x) ( x >= ‘0’ && x <= ‘9’)

//extern uint16_t _end;

SdCard card;
Fat16 f;

#define led1Pin 3 // LED1 connected to digital pin 4
#define led2Pin 2 // LED2 connected to digital pin 3
#define powerpin 2 // GPS power control

// set the RX_BUFFER_SIZE to 32!
#define BUFFSIZE 73 // we buffer one NMEA sentense at a time, 83 bytes is longer than the max length
char buffer[BUFFSIZE]; // this is the double buffer
char buffer2[12];

uint8_t bufferidx = 0;
uint32_t tmp;
#define LOG_RMC 1 // essential location data
#define RMC_ON “$PSRF103,4,0,1,121\r\n" // the command we send to turn RMC on (1 hz rate)
#define RMC_OFF "$PSRF103,4,0,0,1
20\r\n” // the command we send to turn RMC off

#define LOG_GGA 0 // contains fix, hdop & vdop data
#define GGA_ON “$PSRF103,0,0,1,125\r\n" // the command we send to turn GGA on (1 hz rate)
#define GGA_OFF "$PSRF103,0,0,0,1
24\r\n” // the command we send to turn GGA off

#define LOG_GSA 0 // satelite data
#define GSA_ON “$PSRF103,2,0,1,127\r\n" // the command we send to turn GSA on (1 hz rate)
#define GSA_OFF "$PSRF103,2,0,0,1
26\r\n” // the command we send to turn GSA off

#define LOG_GSV 0 // detailed satellite data
#define GSV_ON “$PSRF103,3,0,1,126\r\n" // the command we send to turn GSV on (1 hz rate)
#define GSV_OFF "$PSRF103,3,0,0,1
27\r\n” // the command we send to turn GSV off

#define LOG_GLL 0 // Loran-compatibility data
// this isnt output by default

#define USE_WAAS 1 // useful in US, but slower fix
#define WAAS_ON “$PSRF151,13F\r\n" // the command for turning on WAAS
#define WAAS_OFF "$PSRF151,0
3E\r\n” // the command for turning off WAAS

#define LOG_RMC_FIXONLY 1 // log only when we get RMC’s with fix?
uint8_t fix = 0; // current fix data

// read a Hex value and return the decimal equivalent
uint8_t parseHex(char c) {
if (c < ‘0’)
return 0;
if (c <= ‘9’)
return c - ‘0’;
if (c < ‘A’)
return 0;
if (c <= ‘F’)
return (c - ‘A’)+10;
}

uint8_t i;

// blink out an error code
void error(uint8_t errno) {
while(1) {
for (i=0; i<errno; i++) {
digitalWrite(led1Pin, HIGH);
digitalWrite(led2Pin, HIGH);
delay(100);
digitalWrite(led1Pin, LOW);
digitalWrite(led2Pin, LOW);
delay(100);
}
for (; i<10; i++) {
delay(200);
}
}
}

void setup() // run once, when the sketch starts
{
Serial.begin(9600);
putstring_nl(“GPSlogger”);
pinMode(led1Pin, OUTPUT); // sets the digital pin as output
pinMode(led2Pin, OUTPUT); // sets the digital pin as output
pinMode(powerpin, OUTPUT);
digitalWrite(powerpin, LOW);

if (!card.init()) {
putstring_nl(“Card init. failed!”);
error(1);
}
if (!Fat16::init(&card)) {
putstring_nl(“No partition!”);
error(2);
}
strcpy(buffer, “GPSLOG00.CSV”);
for (i = 0; i < 100; i++) {
buffer[6] = ‘0’ + i/10;
buffer[7] = ‘0’ + i%10;
// create if does not exist, do not open existing, write
if (f.open(buffer, O_CREAT | O_EXCL | O_WRITE)) break;
}

if(!f.isOpen()) {
putstring("couldnt create "); Serial.println(buffer);
error(3);
}
putstring("writing to "); Serial.println(buffer);
putstring_nl(“ready!”);

// write header
if (sensorCount > 6) sensorCount = 6;
strncpy_P(buffer, PSTR(“time,lat,long,speed,date,sens0,sens1,sens2,sens3,sens4,sens5”), 24 + 6*sensorCount);
Serial.println(buffer);
// clear write error
f.writeError = false;
f.println(buffer);
if (f.writeError || !f.sync()) {
putstring_nl(“can’t write header!”);
error(4);
}

delay(1000);

putstring("\r\n");
#if USE_WAAS == 1
putstring(WAAS_ON); // turn on WAAS
#else
putstring(WAAS_OFF); // turn on WAAS
#endif

#if LOG_RMC == 1
putstring(RMC_ON); // turn on RMC
#else
putstring(RMC_OFF); // turn off RMC
#endif

#if LOG_GSV == 1
putstring(GSV_ON); // turn on GSV
#else
putstring(GSV_OFF); // turn off GSV
#endif

#if LOG_GSA == 1
putstring(GSA_ON); // turn on GSA
#else
putstring(GSA_OFF); // turn off GSA
#endif

#if LOG_GGA == 1
putstring(GGA_ON); // turn on GGA
#else
putstring(GGA_OFF); // turn off GGA
#endif
}

void loop() // run over and over again
{
//Serial.println(Serial.available(), DEC);
char c;
uint8_t sum;

// read one ‘line’
if (Serial.available()) {
c = Serial.read();
//Serial.print(c, BYTE);
if (bufferidx == 0) {
while (c != ‘$’)
c = Serial.read(); // wait till we get a $
}
buffer[bufferidx] = c;

//Serial.print(c, BYTE);
if (c == '\n') {
  //putstring_nl("EOL");
  //Serial.print(buffer);
  buffer[bufferidx+1] = 0; // terminate it
 
  if (buffer[bufferidx-4] != '*') {
    // no checksum?
    Serial.print('*', BYTE);
    bufferidx = 0;
    return;
  }
  // get checksum
  sum = parseHex(buffer[bufferidx-3]) * 16;
  sum += parseHex(buffer[bufferidx-2]);
  
  // check checksum 
  for (i=1; i < (bufferidx-4); i++) {
    sum ^= buffer[i];
  }
  if (sum != 0) {
    //putstring_nl("Cxsum mismatch");
    Serial.print('~', BYTE);
    bufferidx = 0;
    return;
  }
  // got good data!

  if (strstr(buffer, "GPRMC")) {
    // find out if we got a fix
    char* p = buffer;
    p = strchr(p, ',')+1;
    p = strchr(p, ',')+1;       // skip to 3rd item
    
    if (p[0] == 'V') {
      digitalWrite(led1Pin, LOW);
      fix = 0;
    } else {
      digitalWrite(led1Pin, HIGH);
      fix = 1;
    }
  } else {
    // not GPRMC
    bufferidx = 0;
    return;
  }

#if LOG_RMC_FIXONLY
if (!fix) {
Serial.print(’_’, BYTE);
bufferidx = 0;
return;
}
#endif
// rad. lets print it!

  Serial.print(buffer);

  // time to clean up the string
  // find time
  char* p = buffer;
  p = strchr(p, ',')+1;
  buffer[0] = p[0];
  buffer[1] = p[1];
  buffer[2] = ':';
  buffer[3] = p[2];
  buffer[4] = p[3];
  buffer[5] = ':';
  buffer[6] = p[4];
  buffer[7] = p[5];
  // we ignore milliseconds
  buffer[8] = ',';
  
  p = strchr(buffer+8, ',')+1;
  // skip past 'active' flag
  p = strchr(p, ',')+1;
  // find lat
  p = strchr(p, ',')+1;

  buffer[9] = '+';
  buffer[10] = p[0];
  buffer[11] = p[1];
  buffer[12] = ' ';
  strncpy(buffer+13, p+2, 7);
  buffer[20] = ',';
  
  p = strchr(buffer+21, ',')+1;
  if (p[0] == 'S')
    buffer[9] = '-';
  
  // find long
  p = strchr(p, ',')+1;
  buffer[21] = '+';
  buffer[22] = p[0];
  buffer[23] = p[1];
  buffer[24] = p[2];
  buffer[25] = ' ';
  strncpy(buffer+26, p+3, 7);
  buffer[33] = ',';
  
  p = strchr(buffer+34, ',')+1;
  if (p[0] == 'W')
    buffer[21] = '-';
  
  // find speed
  p = strchr(p, ',')+1;
  tmp = 0;
  if (p[0] != ',') {
    // ok there is some sort of speed
    while (p[0] != '.' && p[0] != ',') {
      tmp *= 10;
      tmp += p[0] - '0';
      p++;       
    }
    tmp *= 10;
    if (isdigit(p[1])) 
      tmp += p[1] - '0'; // tenths
    tmp *= 10;
    if (isdigit(p[2])) 
    tmp += p[2] - '0'; // hundredths
    
    // tmp is knots * 100
    // convert to mph (1.15 mph = 1 knot)
    tmp *= 115;
    // -OR- convert km/h 
    // tmp *= 185
  } 
  tmp /= 100;
  
  buffer[34] = (tmp / 10000) + '0';
  tmp %= 10000;
  buffer[35] = (tmp / 1000) + '0';
  tmp %= 1000;
  buffer[36] = (tmp / 100) + '0';
  tmp %= 100;
  buffer[37] = '.';
  buffer[38] = (tmp / 10) + '0';
  tmp %= 10;
  buffer[39] = tmp + '0';
   
  buffer[40] = ',';
  p = strchr(p, ',')+1;
  // skip past bearing
  p = strchr(p, ',')+1;
  //mod for bug when speed,bearing are missing (bill greiman)
  uint8_t date[6];
  for (uint8_t id = 0; id < 6; id++) date[id] = p[id];
  // get date into 2001-01-31 style 
  buffer[41] = '2';
  buffer[42] = '0';
  buffer[43] = date[4];
  buffer[44] = date[5];
  buffer[45] = '-';
  buffer[46] = date[2];
  buffer[47] = date[3];
  buffer[48] = '-';
  buffer[49] = date[0];
  buffer[50] = date[1];
  buffer[51] = 0;
  digitalWrite(led2Pin, HIGH);  
  if(f.write((uint8_t*) buffer, 51) != 51) {
     putstring_nl("can't write fix!");
 return;
  }
  Serial.print(buffer);
  // clear write error
  f.writeError = false;      
  // add sensor data
  for (uint8_t ia = 0; ia < sensorCount; ia++) {
    Serial.print(',');
    f.print(',');
    uint16_t data = analogRead(ia);
    Serial.print(data);
    f.print(data);
  }
  Serial.println();
  f.println();
  if (f.writeError || !f.sync()) {
     putstring_nl("can't write data!");
 return;
  }
  digitalWrite(led2Pin, LOW);
  bufferidx = 0;
  return;
}
bufferidx++;
if (bufferidx == BUFFSIZE-1) {
   Serial.print('!', BYTE);
   bufferidx = 0;
}

}
}
[/code]

Is there any connectivity problems with gpsbee or seeduino stalker?
And the gps runs ok when mounted on uartsbee.It that means you can read and written any data?
At last you changed the pinouts and the baudrate in the sketch to match.We do not know which pinouts or baudrate you changed,so please tell us.
The function of each pin is certainly not change.If you have other questions please check the wiki.

hi yuriq
thanks for your reply

Ive now tried this code which I think is more appropriate

using the newsoftserial library
and tiny gps

I changed the pin settings to TX pin2 RXpin 3 and the nss baud rate to 9600 to match the ublox gps reciver

but still cant get any thing to print to serial monitor I have tried the example tiny test with gps device
and all it returns is this…

Testing TinyGPS library v.
by Mikal Hart
Sizeof(gpsobject) = 103

this is the main code that im using [code] #include <NewSoftSerial.h>
#include <TinyGPS.h>

/* This sample code demonstrates the normal use of a TinyGPS object.
It requires the use of NewSoftSerial, and assumes that you have a
4800-baud serial GPS device hooked up on pins 2(rx) and 3(tx).
*/

TinyGPS gps;
NewSoftSerial nss(2, 3);

void gpsdump(TinyGPS &gps);
bool feedgps();
void printFloat(double f, int digits = 2);

void setup()
{
Serial.begin(115200);
nss.begin(9600);

Serial.print("Testing TinyGPS library v. "); Serial.println(TinyGPS::library_version());
Serial.println(“by Mikal Hart”);
Serial.println();
Serial.print("Sizeof(gpsobject) = "); Serial.println(sizeof(TinyGPS));
Serial.println();
}

void loop()
{
bool newdata = false;
unsigned long start = millis();

// Every 5 seconds we print an update
while (millis() - start < 5000)
{
if (feedgps())
newdata = true;
}

if (newdata)
{
Serial.println(“Acquired Data”);
Serial.println("-------------");
gpsdump(gps);
Serial.println("-------------");
Serial.println();
}
}

void printFloat(double number, int digits)
{
// Handle negative numbers
if (number < 0.0)
{
Serial.print(’-’);
number = -number;
}

// Round correctly so that print(1.999, 2) prints as “2.00”
double rounding = 0.5;
for (uint8_t i=0; i<digits; ++i)
rounding /= 10.0;

number += rounding;

// Extract the integer part of the number and print it
unsigned long int_part = (unsigned long)number;
double remainder = number - (double)int_part;
Serial.print(int_part);

// Print the decimal point, but only if there are digits beyond
if (digits > 0)
Serial.print(".");

// Extract digits from the remainder one at a time
while (digits-- > 0)
{
remainder *= 10.0;
int toPrint = int(remainder);
Serial.print(toPrint);
remainder -= toPrint;
}
}

void gpsdump(TinyGPS &gps)
{
long lat, lon;
float flat, flon;
unsigned long age, date, time, chars;
int year;
byte month, day, hour, minute, second, hundredths;
unsigned short sentences, failed;

gps.get_position(&lat, &lon, &age);
Serial.print("Lat/Long(10^-5 deg): “); Serial.print(lat); Serial.print(”, “); Serial.print(lon);
Serial.print(” Fix age: "); Serial.print(age); Serial.println(“ms.”);

feedgps(); // If we don’t feed the gps during this long routine, we may drop characters and get checksum errors

gps.f_get_position(&flat, &flon, &age);
Serial.print("Lat/Long(float): “); printFloat(flat, 5); Serial.print(”, “); printFloat(flon, 5);
Serial.print(” Fix age: "); Serial.print(age); Serial.println(“ms.”);

feedgps();

gps.get_datetime(&date, &time, &age);
Serial.print("Date(ddmmyy): “); Serial.print(date); Serial.print(” Time(hhmmsscc): “); Serial.print(time);
Serial.print(” Fix age: "); Serial.print(age); Serial.println(“ms.”);

feedgps();

gps.crack_datetime(&year, &month, &day, &hour, &minute, &second, &hundredths, &age);
Serial.print(“Date: “); Serial.print(static_cast(month)); Serial.print(”/”); Serial.print(static_cast(day)); Serial.print("/"); Serial.print(year);
Serial.print(" Time: “); Serial.print(static_cast(hour)); Serial.print(”:"); Serial.print(static_cast(minute)); Serial.print(":"); Serial.print(static_cast(second)); Serial.print("."); Serial.print(static_cast(hundredths));
Serial.print(" Fix age: "); Serial.print(age); Serial.println(“ms.”);

feedgps();

Serial.print("Alt(cm): “); Serial.print(gps.altitude()); Serial.print(” Course(10^-2 deg): “); Serial.print(gps.course()); Serial.print(” Speed(10^-2 knots): "); Serial.println(gps.speed());
Serial.print("Alt(float): “); printFloat(gps.f_altitude()); Serial.print(” Course(float): "); printFloat(gps.f_course()); Serial.println();
Serial.print("Speed(knots): “); printFloat(gps.f_speed_knots()); Serial.print(” (mph): “); printFloat(gps.f_speed_mph());
Serial.print(” (mps): “); printFloat(gps.f_speed_mps()); Serial.print(” (kmph): "); printFloat(gps.f_speed_kmph()); Serial.println();

feedgps();

gps.stats(&chars, &sentences, &failed);
Serial.print("Stats: characters: “); Serial.print(chars); Serial.print(” sentences: “); Serial.print(sentences); Serial.print(” failed checksum: "); Serial.println(failed);
}

bool feedgps()
{
while (nss.available())
{
if (gps.encode(nss.read()))
return true;
}
return false;
} [/code]

any advice thanks
ken

Sorry we do not provide software design services.If you have questions on the hardware products that you can consult us.