Zigbee Communication Problem

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Zigbee Communication Problem

Post by JohnCrow »

Hi
Im having trouble getting my new zigbee e-blocks to communicate.

Hardware 16F877A
Zigbee on port c
Jumpers C &1

1) I have tried the test program on both board and they both pass, so i hope the boards are ok
2) Using the files from the zigbee e-blocks bundle example 1

Node 1 inits with a string of at commands on the LCD (Co-ordinator Board)
Then shows waiting for node 2
LED flashes 1 / sec

LED on node 2 flashes 2 /sec (Router.EndNode Board)
Pressing switchs on switch board has no effect

These are the files I've been using

TestRoutine-zigbee.fcf
(7 KiB) Downloaded 402 times
Node 1.fcf
(8.5 KiB) Downloaded 389 times
Node 2.fcf
(8 KiB) Downloaded 377 times

What am I doing wrong?
Thanks
John
1 in 10 people understand binary, the other one doesn't !

User avatar
misoct
Posts: 64
Joined: Sat Sep 04, 2010 11:03 pm
Location: Egypt
Has thanked: 8 times
Been thanked: 17 times
Contact:

Re: Zigbee Communication Problem

Post by misoct »

Hi JohnCrow
I think that you made the first two programs as coordinator
you must change the configuration from properties as on cordinator and the other as router
BR
tharowat

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Zigbee Communication Problem

Post by JohnCrow »

Hi Tharowat
Thanks for the replay,

The first program (TestRoutine-zigbee) is the Matrix E-block test program, its used on its own to test the board (not as part of the network)

Node 1 & Node 2 are the programs im using as the network, again they are from Matrix's website (Part of the zigbee bundle download)
Did just double check but they are set as co-ordinator and router.
1 in 10 people understand binary, the other one doesn't !

User avatar
misoct
Posts: 64
Joined: Sat Sep 04, 2010 11:03 pm
Location: Egypt
Has thanked: 8 times
Been thanked: 17 times
Contact:

Re: Zigbee Communication Problem

Post by misoct »

Hi JohnCrow
I tried to solve the problem through yasterday on my ZigBee e-blocks but I cannot to reach the error
I ll try agian
thanks

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Zigbee Communication Problem

Post by JohnCrow »

Hi Tharowat

Do you mean the files I posted are working on your zigbee e-blocks?

My boards are brand new, only got them last week. Didnt get to try anything with them till the weekend.

Thanks
1 in 10 people understand binary, the other one doesn't !

User avatar
misoct
Posts: 64
Joined: Sat Sep 04, 2010 11:03 pm
Location: Egypt
Has thanked: 8 times
Been thanked: 17 times
Contact:

Re: Zigbee Communication Problem

Post by misoct »

JohnCrow wrote:Hi Tharowat

Do you mean the files I posted are working on your zigbee e-blocks?
sorry JohnCrow
No I tried with your files and I can not to connect the modules

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Zigbee Communication Problem

Post by JohnCrow »

Ok thanks for trying them
Sounds like it could be a problem with the flowcharts rather than my hardware.
1 in 10 people understand binary, the other one doesn't !

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Zigbee Communication Problem

Post by Benj »

Hello,

The two Zigbee E-blocks are marked differently using the check boxes on the board, please can you confirm that your coordinator E-block is the one being sent the node 1 coordinator program.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Zigbee Communication Problem

Post by JohnCrow »

Hi Benj

Yes
N1 = Co-ordinator board

N2 = Router/End Node board
1 in 10 people understand binary, the other one doesn't !

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Zigbee Communication Problem

Post by Benj »

Hi John,

Right ok I will try and find some time today to rig up the circuits and test everything is working correctly.

Are the LEDs on the Zigbee boards flashing at different rates? The LED on the Coordinator board should be flashing 2x slower then the one on the router board.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Zigbee Communication Problem

Post by JohnCrow »

Hi Benj
The leds are flashing as you say

Co-ord board 1 per sec

Router board 2 per sec

If you look at Tharowats post from yesterday, he also could not get the files to work
Thanks for looking
1 in 10 people understand binary, the other one doesn't !

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Zigbee Communication Problem

Post by JohnCrow »

Hi Benj

Ive have managed to get my Zigbee E-blocks to commucate transmitting a simple byte from endnode to co-ordinator.

However, the programs from example 1 in the zigbee bundles still wont work as downloaded.

It seems they have a problem where they are polling for each other at the start of the program. I deleted this part and they also work,the co-ordinator display the binary for the keypress on the switch board.

Also when the end node is starting up, if I have verbose enabled 1 of the AT commands shows

ATJN ERROR

I have noticed when the connect to coordinator macro is executed it returns a 0 even if no co-ordinator is present.


But It does seem now that the hardware is working ok.
Thanks.
1 in 10 people understand binary, the other one doesn't !

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Zigbee Communication Problem

Post by DavidA »

Hi John,

I will try and have a look at what may be happening on the zigbee example 1 for you!

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Zigbee Communication Problem

Post by JohnCrow »

Hi
As I posted earlier, end node to co-ordinator works fine
Ive just tried it the other way round (co-ordindator to end node) the end node does not receive anything
Co_Node_test Program.fcf
(7 KiB) Downloaded 332 times
End_node_test_program.fcf
(7 KiB) Downloaded 334 times
1 in 10 people understand binary, the other one doesn't !

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Zigbee Communication Problem

Post by Benj »

Hello John,

In your coordinator program try adding a "connect to all" or "connect to name - end" component macro after the Zigbee Init macro and you should then be able to communicate both ways.

Let me know how you get on.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Zigbee Communication Problem

Post by JohnCrow »

Hi Benj

Thanks
That did it. They are communicating in both directions now.

Also that was the problem with the bundle example file. I added a connect to all macro at the start of the co-ordinator flowchart, and it also works.
1 in 10 people understand binary, the other one doesn't !

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Zigbee Communication Problem

Post by Benj »

Aha :idea:

Thanks for letting me know John, I will get the example updated so that it works correctly.

lewisrendal
Flowcode V4 User
Posts: 61
Joined: Tue Feb 01, 2011 7:21 pm
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Zigbee Communication Problem

Post by lewisrendal »

Hi Guys,

Maybe you can help me with my problem.

Two eb006 boards with EB51 attached one co-or and the other end node.
Program downloaded attached.

Help please

james :?
Attachments
end_node_v1.fcf
(14 KiB) Downloaded 226 times
co_ordinator_v1.fcf
(13.04 KiB) Downloaded 232 times

Post Reply