Shop OBEX P1 Docs P2 Docs Learn Events
PMB648, bs2, and data streaming results — Parallax Forums

PMB648, bs2, and data streaming results

softconsoftcon Posts: 217
edited 2012-10-02 00:47 in Accessories
I'm wondering if I'm doing something wrong.
I've been curious what all is being sent from the pmb648 via my bs2. The default code highlights some features, but by no means demonstrates the units complete feature set.
So, I wrote a bs2 program to feed me all the data from the 648, and what I'm seeing doesn't match what I'd expect to see. It's gps data all right, and I can even match it with strings shown on various sites of what the data should look like.
The problem comes when I try to match the demo code with what I'm seeing as a data dump.
In the demo code, the bs2 searches for RMC, as a string locater before it reads the rest of the information out of the data stream and displays it.
And, obviously, it works just fine, because I see the longitude, latitude, and various other pieces of info (I also found the date and time fields which weren't in the demo program), but what I don't see in my data dump is this RMC string anywhere.
The first line of the read code in my bs2 program goes like this:
SERIN 0, n4800, [WAIT("RMC,"), DEC2 thour,DEC2 tmin, DEC2 tsec, SKIP 7,
and it goes on from there to read more values for positioning ones self and date and such.
However, with my dump code, I'm not seeing that RMC, string anywhere.
Here's the code I'm using to dump the gps data stream to the debug window.
  SERIN 0, n4800, [STR1]
  DEBUG STR1
GOTO reread
str1 is defined as a byte.
I let the dump go on for a couple minutes, and while I see all kinds of interesting things in the output, including some strings not documented in the strings used by gpsd which is where I got the info I do have on what this should look like, I don't see the RMC characters anywhere in my data dump.
It's obviously there, or the demo program wouldn't work, but I'll be darned if I can find the silly thing.
Anyone see a problem with my code? Am I missing characters?
I'm puzzled here.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-10-01 11:24
    Reading one byte at a time like that, you will certainly miss characters. The reason is that, during the DEBUG output, no reading is taking place, even though characters are still streaming into the Stamp.

    -Phil
  • softconsoftcon Posts: 217
    edited 2012-10-01 11:38
    Ok, thought it might be something like that.
    I've tried reading multiple bytes, (24 is the longest I can get before getting an out of variable space error, but when reading that many bytes printing them out doesn't work so well. Something else I could try to get the entire stream? It's a basic bs2, unfortunately not a bs2p with scratch ram.
    Any ideas?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-10-01 13:41
    I think you're stuck with that without upgrading to a Stamp that has scratchpad RAM.

    -Phil
  • softconsoftcon Posts: 217
    edited 2012-10-01 14:10
    Ahh, well, that's ok, was planning on getting a bs2p anyhow. :) I guess I could attempt to rewrite it on the propeller, but I don't (yet) know enough pasm or spin to do that, so guess I'll just use what I have, then expand things as I get more knowledgeable.
  • max72max72 Posts: 1,155
    edited 2012-10-02 00:47
    If you have a propeller handy with just a little bit of code you can create a serial mirror, that redirects the GPS stream to the terminal, and in case you can also send what you type to the GPS.
    I used it with GSM module (lot of AT interaction) and with the propeller it is very easy.
    There are some examples posted here:
    http://forums.parallax.com/showthread.php?136417-Interfacing-to-the-tacktick-NMEA-unit

    Massimo
Sign In or Register to comment.