Strange Problem

Hi Guys,

After the success i had previously on this forum i thought i’d start here first.
I have 2 XBEE series 2.5 modules setup in API mode, one is connected directly to a PC, monitored using X-CTU, the other is connected to a PIC.
I am able to transmit and receive packets between them with what i thought was problem free.

I have now created a sub-routine to create a packet based on a string i pass in. This works, however the problem begins here.

If i create a packet with the string “ULTRAWAVE1”
0x7E,0x00,0x18,0x10,0x01,0x00,0x13,0xA2,0x00,0x40,0x3B,0x8F,0x05,0xFF,0xFE,0x00,0x00,0x55,0x4C,0x54,0x52,0x41,0x57,0x41,0x56,0x45,31,0x41

this gets tranmist to the X-CTU software, The text “ULTRAWAVE1” is also shown on the PC

I then receive on my PIC:

0xBF,0x80,0x8C,0x88,0xC0,0x62,0x74,0xA0,0xE7,0xBC,0xFF,0x80,0x80,0xD5,0x9A,0x2D,0x1D,0x5F,0x07,0x5B,0x17,0xC7,0xD0,0x7E,0x00,0x07,0x8B,0x01,0x00,0x00,0x00,0x00,0x00,0x73

I am not sure what the data prior to the transmit status is, but i eventually receive what i expect. This works for most strings i pass in. However, the occasional string will have a very stange responce from the XBEE module connected to the PC.

I send from the PIC “ULTRAWAVE”:
0x7E,0x00,0x17,0x10,0x01,0x00,0x13,0xA2,0x00,0x40,0x3B,0x8F,0x05,0xFF,0xFE,0x00,0x00,0x55,0x4C,0x54,0x52,0x41,0x57,0x41,0x56,0x45,0x72

this gets tranmist to the X-CTU software, The text “ULTRAWAVE” is also shown on the PC

I then receive on my PIC:

0x00,0x03,0x31,0x1C,0x80,0x62,0x74,0xA0,0xE7,0xBC,0xFF,0x80,0x80,0xD5,0xA9,0x2D,0x1D,0x5F,0x07,0x5B,0x17,0xCB,0x03

This happens exactly the same, each time i send the same data string. The same thing seems to happen with different strings.

Does anyone know what this could possibly be?

Many thanks
Dave

What baud rate are you using? If it’s 115200, try again at a lower rate and tell us what happens. Otherwise I’ll try to think harder…

What baud rate are you using? If it’s 115200,try again at a lower rate and tell us what happens. Otherwise I’ll try to think harder…

Hi John,
Thanks for the reply.

I am using baud rate of 9600. So unfortunately I can’t slow it anymore.
I really can’t understand why some strings work, and others do not :frowning:

Bad news: nor can I.

It does sound like something local to your setup, so maybe it would help if you could tell us more about that…

Its bloody frustrating John!

I will attach my two profiles, one for the end/router and the other for the coord. The only difference between them is the pull ups. I have an external pull up on the end device.

In terms of software for the string output, the routine is the same, so any problems in that should be duplicated in every string write.
Im starting to wonder if it is an XBEE module issue, as when i program the coord, i always get an issue. It states a field is in-correct, but it is a valid value!

Well, I’ve looked at the .PRO files and I can’t see anything there that gives me a clue.

Declaration: I give up :frowning:

Your question is 9 days old and no-one’s come up with an answer, so if I were you I’d now put in a support request to the excellent folks at Digi, with a reference to this thread if you like.

And when you get the answer, it would be a kindness if you could post it here for the benefit of others.

I have a little personal bet that this will turn out to be something quite simple. But I know when I’m beaten…

Well, I’ve looked at the .PRO files and I can’t see anything there that gives me a clue.

Declaration: I give up :frowning:

Your question is 9 days old and no-one’s come up with an answer, so if I were you I’d now put in a support request to the excellent folks at Digi, with a reference to this thread if you like.

And when you get the answer, it would be a kindness if you could post it here for the benefit of others.

I have a little personal bet that this will turn out to be something quite simple. But I know when I’m beaten…

Hi John,

Many thanks again for your help!
I am happy to say, I have finally cracked it!

It seems to be a complier issue.
Whenever the checksum ends with 0, eg 0x20, the data lines seem to stay low.
So any data coming in is incorrect!
If i add a line of code to just output a single 0xFF after the checksum, all works fine without causing problems with the modules!

Thanks again!
Dave