XBee Communication Problem : uP & PC

Bluetooth, XBee, RF......

XBee Communication Problem : uP & PC

Postby khairul » Sun Mar 17, 2013 10:52 am

Hai, i have problem to communicate XBee S2 between uP & PC..

Note
*****
When i refer to XBee means i use XBee with SKXBEE Module

What i have Done
*********************
1) I have configure the Source & Destination address for both XBee.
2) I also have test the communication between 2 XBee using X-CTU and it work fine. (If i type "A" in X-CTU XBee#1, X-CTU XBee#2 will display "A")

The Problem
**************
1) When i connect XBee#2 to PIC and program it to transmit data to X-CTU XBee#1 nothing display at the X-CTU.
2) The LED X_RX and X_TX blinking rapidly so i thought the data actually transmitted.
khairul
Novice
 
Posts: 17
Joined: Wed Feb 02, 2011 2:07 pm

Re: XBee Communication Problem : uP & PC

Postby shahrul » Sun Mar 17, 2013 3:29 pm

Maybe your microcontroller code. Try first wired TX-RX from SKXBEE and microcontroller.
or show your clear photo of your hardware.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: XBee Communication Problem : uP & PC

Postby robosang » Sun Mar 17, 2013 8:59 pm

Check the connection between PIC and XBee.

Also, verify the PIC is working or not by connecting it to computer.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: XBee Communication Problem : uP & PC

Postby khairul » Mon Mar 18, 2013 10:11 am

En.Shahrul
+++++++++
1) I have check the connection. The XBee_TX is connected to uP_RX and XBee_RX is connected to uP_TX...
2) I also have check the communication between XBee using X-CTU software and it work fine.. (It can communicate : See Attachment )

3) Refer to attachment 1, i configure the XBee based on tutorial at UTube
4) Refer to attachment 2, i think that only XBee#1(COM19) can transmit data and XBee#2(COM20) can only received.. Pleased verify.

5) I have look tutorial and Coding from Cytron, i want to use comment "ATMY1111" but i always get "ERROR", anyone have idea what the problem. (Refer to Attachment 3)

Mr.Robosang
+++++++++++
1) I have connect my PIC with Laptop using UART to USB converter (from Cytron), i have code it to send data and monitor it using Hyperterminal and everything work fine.

For All
++++++
1) Here my programming if anyone one to view it.

void ON_LINE_MODE(void)
{
int i;

LCD_CLR();
LCD_WRITE(0, " ON LINE MODE");

while(1)
{
LEDG = 1;
LEDR = 0;
for(i=0;i<=10;i++)
{
UART_SEND(50);
DELAY(5000);
}
}
}
//======================================
// PARTIAL OF UART LIBRARY
//======================================
#define RX_PIN PORTCbits.RC7
#define TX_PIN LATCbits.LATC6


void INIT_UART(void)
{
TRISCbits.TRISC7 = 1; // Set RC7 as Input
TRISCbits.TRISC6 = 0; // Set RC6 as Output

TXSTA=0b00100100;
RCSTA=0b10010000;
PIE1bits.RCIE = 0;
IPR1bits.RCIP = 1;
SPBRG=64; //Fosc = 10MHz | SPBRG = 64 | Baud = 9600

}
void UART_SEND(unsigned char data) //function to send out a byte via uart
{
while(PIR1bits.TXIF==0); //wait for previous data to finish send out
TXREG=data; //send new data
}
Attachments
1.png
Modem Configuration
2.png
Data Transmit between 2 XBee
3.png
Error AT Command
khairul
Novice
 
Posts: 17
Joined: Wed Feb 02, 2011 2:07 pm

Re: XBee Communication Problem : uP & PC

Postby khairul » Mon Mar 18, 2013 10:26 am

Assalamulaikum & peace to all

I have found the problem, The problem is XBee#1 only transmit data while XBee#2 only received data.. So anyone have idea how to make both XBee can transmit and received. I think the problem about the configuration especially the part like ATTACHMENT 3.
khairul
Novice
 
Posts: 17
Joined: Wed Feb 02, 2011 2:07 pm

Re: XBee Communication Problem : uP & PC

Postby shahrul » Mon Mar 18, 2013 10:28 am

khairul WROTE:Assalamulaikum & peace to all

I have found the problem, The problem is XBee#1 only transmit data while XBee#2 only received data.. So anyone have idea how to make both XBee can transmit and received. I think the problem about the configuration especially the part like ATTACHMENT 3.

Make ATMY and ATDL same number.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: XBee Communication Problem : uP & PC

Postby robosang » Tue Mar 19, 2013 10:07 am

In that case, you did not swap the SKXBee to verify it is bi-directional :)

BTW, you are using Series 2 right? It is not the same as series 1, do you know that?

I think cytron did a tutorial on how to configure series 2 XBee, you should check that out.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: XBee Communication Problem : uP & PC

Postby nuffy » Fri Apr 12, 2013 12:27 am

hi,

i have the same problem before...my xbee1 cannot detect what my xbee2 is transmitting ..i follow all the instruction from cytron tutorial...u know what i did? i restore all the data back to original ( Xbee )..then i just set he PAN ID only ( both must be set same number....the others is in default setting... it works realy2 well.. i can communicate from my pc via xbee to my arduino :)

im using XBEE S2..
nuffy
Greenhorn
 
Posts: 3
Joined: Fri Apr 12, 2013 12:02 am


Return to Wireless Device

Who is online

Users browsing this forum: No registered users and 10 guests