Frame data for S3B Digimesh

I have a project where I will have payload data of GPS float values (coordinates), time and a single digit integer. Any way to my question. I have read Robert Faludi's excellent book "Building Wireless Sensor Networks". He talks about S1,S2 radios and I am not sure how much of the S3B Digimesh radios differ. Referancing the XBee manual for the radio I came across a question on the transmit options. at offset 16 the digimesh option is b'11. I am not sure how to interpret this.

The next part of this question is the use of union to break down a float number (the coordinates). Offset 17 to 24 is the space I have for data transmission. 5110.9000 and 11430.1923 needs to be broken down. How many bites will this take up in the RF Data frame?

Thanks for you time in pointing me in the right direction. Bryan

Manual for S3B http://ftp1.digi.com/support/documentation/90002173_N.pdf

5110.9000 and 11430.1923 needs to be broken down. How many bites will this take up in the RF Data frame?

Are these character strings or floats? If they are character strings, you can count as well as I can. If they are floats, a float is 4 bytes.

Float (as I said in the post). so does that mean the entire payload will be taken up with just the GPS coordinates? each float is broken down via the union function into 4 bites each. Each byte takes up one offset location. Oh I hope I am wrong because I need room for at least one more bite.

so does that mean the entire payload will be taken up with just the GPS coordinates? each float is broken down via the union function into 4 bites each.

Using the chomp() function? That's bytes, not bites.

Why can't you make the payload larger?

I guess I am a little confused with this module to be honest. I thought that there was a limit to the size of the payload and the example is just showing a small portion used. I cant find the max size in the manual but I am assuming its quite massive now that I have seen the speed tests transmit 100K of data for a benchmark.

BTW I just put my hands on an Arduino for the first time a month ago, I like to think that I learn quite fast and spend cubic time trying to find answers through searches before posting. XBee modules seem to just mess me up. I tried for a couple weeks to get a S1 to work without very much success. Learning how to build a frame field and read it on the other end is busting my balls at the moment. :/

Found that setting the transmit option to 0xC1 is the option for Digi-Mesh, so thats a good step.

I thought that there was a limit to the size of the payload

There probably is, but it is not likely to cause a problem by adding a couple more bytes. Now, if you wanted to send another 500 bytes, that might be a problem.

I cant find the max size in the manual but I am assuming its quite massive now that I have seen the speed tests transmit 100K of data for a benchmark.

No. The timing tests are done sending many small(er) packets.

I received my Div board from Digi today (my sparkfun explorer was not working with these radios even with the RSSI LED removed).
Anyway I have a terrible time with these radios. I just cant seem to make any progress with any of them that I have played with (beyond transparent mode).

I am trying to make a simple API-1 frame to transmit and learn how to get these radios talking. In transparent mode, I can see data coming in, and using XCTU I can discover the radios that are on the network (beyond the one plugged into the com port). So I know the radios are talking. Here is the simple code I am trying to transmit but on my terminal I am not receiving ANYTHING regardless if the receiving radio is set for API-1 or transparent mode. What am I missing or doing completely wrong?

  Serial.print(0x7E); //Start Byte
  Serial.print(0x00); // MSB number of bytes between length and checksum
  Serial.print(0x16); // LSB number of bytes between length and checksum
  
  Serial.print(0x10); // Frame type
  
Serial.print(0x01); //no response 

Serial.print(0x00FFFF); //64bit address for Broadcast. <--I have tired to break this down to each Byte, still no joy

Serial.print(0xFF); // reserved set 0xFFFE
Serial.print(0xFE);

Serial.print(0x00); // Max Hops 

Serial.print(0x00); // transmit options

Serial.print(0x54); // Payload
Serial.print(0x78); 
Serial.print(0x44);
Serial.print(0x61);
Serial.print(0x74);
Serial.print(0x61);
Serial.print(0x30);
Serial.print(0x41); 


//Checksum
long sum = 0x10 + 0x01 + 0x00FF + 0xFF + 0xFE + 0x54 + 0x78 + 0x44 + 0x61 + 0x74 + 0x61 + 0x30 + 0x41;
Serial.print((0xFF - (sum & 0xFF)));

What am I missing or doing completely wrong?

I'd be inclined to use Serial.write() to send binary data, instead of Serial.print() which is meant to send ASCII data.

Are you sending the checksum?

  Serial.print(0x16); // LSB number of bytes between length and checksum

You are sending 16 bytes between here and the checksum, not 0x16.

PaulS: I'd be inclined to use Serial.write() to send binary data, instead of Serial.print() which is meant to send ASCII data.

Thanks for that, this makes sense, I will change the code.

Are you sending the checksum?

I am, its at the bottom of the quote I posted. I hope the formula is correct.

  Serial.print(0x16); // LSB number of bytes between length and checksum

You are sending 16 bytes between here and the checksum, not 0x16.

This is a late night, not paying attention mistake. Thanks for catching it!

I got a hold of Digi this morning, turns out the radios I had were programmable. That explains some of my frustrations. I have the proper, non-programmable ones coming tomorrow.

I really do appreciate your help PaulS. Bryan

Update:

Great success!!!!!!!!!!!! I received the non-programmable radios and they work perfect.

For reference to anyone that stumbles across this thread, the S3B radios do work with the x.bee library for series 2 radios. Saved me allot of manual frame building!

PaulS, (or anyone else) can you point me in the direction of code that triggers if a radio has lost communication with all other radios? If it receives NO packets for XX time it will execute?

PaulS, (or anyone else) can you point me in the direction of code that triggers if a radio has lost communication with all other radios? If it receives NO packets for XX time it will execute?

I presume that you mean that the Arduino has not received any information from the radio in XX time. That's really pretty simple. Simply note when you DO get information.

if(gotInfo)
    lastTime = millis();

Then, periodically, see how long it's been:

if(millis() - lastTime > panicTime)
   panic();

Yep that is the easiest way to do it.