Set up system demo

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Set up system demo

4,987 次查看
dotruonggiang88
Contributor II

Hello Mario Ignacio Castaneda Lopez,

I want to set up a system as below.  Include:

1 Coordinator, 1 router and 5 SED.

PC <- UART -> COORDINATOR<- WIRELESS -> ROUTER: Send data control motor and get data IO status of SED over  ROUTER.

ROUTER<- UART -> MCU <- IO->Control Motor.

SED <- WIRELESS -> ROUTER: Send IO status to ROUTER

How to do that ? Which document/application for me ? Please advise.

Thanks,

Giang

标签 (1)
14 回复数

4,710 次查看
dotruonggiang88
Contributor II

Hi Mario Ignacio Castaneda Lopez,

Thanks for your answer but I run JN-AN1217.

I use UART0 to send data and use UART1 to debug. But nothing data is received to UART. I show here.

https://community.nxp.com/thread/487823?sr=inbox

Please advise.

0 项奖励
回复

4,710 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Giang,

Did you change the Debug defines?

#DEBUG ?= NONE
###############################################################################
# un-comment the lines below for Debugger
# Debug options - define DEBUG to enable
DEBUG ?= UART1
#
# Define which UART to use for HW debug
DEBUG_PORT ?= UART1
# DEBUG_MODE ?= SWD

Regards,

Mario

4,710 次查看
dotruonggiang88
Contributor II

Hi Mario Ignacio Castaneda Lopez,

Thanks for your reply.

I add CFLAGS += -DUART=0 and it works.

I have more question. How to connect 1 specify SED to router ?

Example: I have Coordinator 1, router A, router B, and SED a, SED b

I want to connect a to A, B to b.

Please advise.

0 项奖励
回复

4,710 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Giang,

You could send the permit to join with the ZPS_eAplZdpMgmtPermitJoiningRequest in the coordinator, but the short address will be the short address of the Router.

 return ZPS_eAplZdpMgmtPermitJoiningRequest ( hAPduInst,
                                                0XA085,//Router address
                                                FALSE,//FALSE: 16-bit network address
                                                pu8Seq,
                                                &sAplZdpMgmtPermitJoiningReq );

typedef struct 
{
  uint8 u8PermitDuration;
  bool_t bTcSignificance;
} ZPS_tsAplZdpMgmtPermitJoiningReq;

ZigBee PRO Stack User Guide

Regards,

Mario

4,710 次查看
dotruonggiang88
Contributor II

Hi Mario Ignacio Castaneda Lopez,

Thanks for your reply. Sorry for my missing.

I used ZPS_eAplZdoDirectJoinNetwork() to preconfigured for a specify router connect coordinator.

But when I try with the second router. It connected to the first router, not connect the coordinator.

How to the second router connect coordinator.

Please advise.

0 项奖励
回复

4,710 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Giang,

The coordinator should send the permit join but with the short address of the coordinator 0x0000.

Regards,

Mario

4,710 次查看
dotruonggiang88
Contributor II

Hi Mario Ignacio Castaneda Lopez,

Thanks for your reply. I will try.

0 项奖励
回复

4,710 次查看
dotruonggiang88
Contributor II

Hi Mario Ignacio Castaneda Lopez,

Thanks for your reply.

I used AN-1229.

As above

"You could send the permit to join with the ZPS_eAplZdpMgmtPermitJoiningRequest in the coordinator, but the short address will be the short address of the Router."

I have more two router and a lot of SED. How to know which SED for connecting ?

0 项奖励
回复

4,710 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Giang,

How to know which SED for connecting?

I am not following this question. You want to join  SED with a specific Router, right?

If you want to join a SED with a specific network, the parameter should be the short address of the Router that you want.

Regards,

Mario

0 项奖励
回复

4,710 次查看
dotruonggiang88
Contributor II

Hi Mario Ignacio Castaneda Lopez,

Thanks for your reply.

You want to join  SED with a specific Router, right?

Yes, but  the function ZPS_eAplZdpMgmtPermitJoiningRequest must run in coordinator.

If I have a SED with MAC address,  a router with MAC address.

I preset MAC ROUTER to connect COORDINATOR by ZPS_eAplZdoDirectJoinNetwork.

Can I connect SED to ROUTER over MAC address ?

0 项奖励
回复

4,710 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Gianm

You could also send the ZPS_eAplZdpMgmtPermitJoiningRequest using the Mac address.

https://www.nxp.com/docs/en/user-guide/JN-UG-3101.pdf 

pastedImage_1.png

Regards,

Mario

0 项奖励
回复

4,710 次查看
dotruonggiang88
Contributor II

Hi Mario Ignacio Castaneda Lopez,

Thanks for your reply.

ZPS_eAplZdpMgmtPermitJoiningRequest must run in Coordinator or Router ?

0 项奖励
回复

4,710 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Giang,

If you want to get better control of this request. I recommend running in Coordinator.

Regards,

Mario

0 项奖励
回复

4,710 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi, Giang,

Please look at the JN-AN1217 example.

The coordinator has an app_serial_commands.c file, the communication is over the UART.

Please let me know if you have issues with this.

Regards,

Mario