XBee Basics - Lesson 2 - Simple Chat Between Two XBess in AT Mode

Jack Rhysider · Beginner ·🛠️ AI Tools & Apps ·5y ago

Key Takeaways

This video tutorial covers the basics of XBee, demonstrating how to establish a simple chat between two XBees in AT mode using XCTU software and Arduino for serial communication.

Full Transcript

Hello and welcome to lesson two video tutorial on XB basics. In this lesson, I'm going to show you how to create a simple chat using two XBs in AT mode. All right, let's keep this as simple as we possibly can. Here's a diagram of what we're going to be doing. We have XB number one is going to be the coordinator and it's going to be in AT mode. XB number two is going to be the router in AT mode. They're both going to be connected to the laptop. using a serial ca cable. What we're going to try to do is get into the terminal of router of the router XP and then send data messages over wirelessly to the coordinator XP and see if we can receive that data. Okay, so let's hook everything up. First, we'll deal with the coordinator. We're going to hook the FTDI cable up to the coordinator, and we'll connect this into the laptop. Come on. Okay. So, that one is ready to go. That's done. Next, we'll connect the router. So, first, um, we'll connect this into the breadboard like so. And then we'll connect this into it using the right pins. like so. And I demonstrate all of these different serial capabilities in the previous lesson. So, if you're unsure what I'm doing, just go back a lesson and watch that one. Okay. So, now I'm connecting this one in here. And our connectivity is complete. So now that I have both XBs connected, let's open up the XCTU software. Here you're going to see two comp ports hooked up. Comport 11 I know as a router and compport 12 is the coordinator. So let's let's configure comp port 11 first. So we're going to go into the motor configuration and then read. I'm going to actually restore this to factory default just so that you can follow along with me from scratch. Okay. So, from here we see that the router well this this Ziggb this XB is a router and in AT mode. So, that's great. We'll set the pan ID to 7779. Just something random. Let's keep them all the same. Um, I'm choosing JV as enabled so that I can more aggressively try to join the network. The destination address I'm going to leave as zero, which means that it's going to try to communicate to the coordinator only. So, I'm going to write those settings. And that's it for the router. I'm now going to open up a second XCTU instance. And I'm going to move this to the side. And this time, I'm going to go into 12 COM 12 and check out the modem configuration for this. Again, I'm going to restore and then read. That way, we're setting at factory defaults again. Okay, this one I can see already needs to be changed. The coordinator, yes, but at needs to be what we're dealing with. So, let's write this as a at. The reason why they're both at is because we're going to be using transparent communication through the XBs and not to them. Okay. So now it's the coordinator and I'm going to read after it finished uploading. That's good. Okay. So now the pen ID, we need to set this to the same which is 7779. And basically that's all we need to do here. So I'm going to write that and that's going to save the settings to the XP itself. So here it says write as complete. So now what I'm going to do is go into terminal tab on both of these and on the router side I'm going to type a message and you can see it showing up on the coordinator side. So basically anything that I chat on the left side shows up on the right side. Um the router is wirelessly sending data to the coordinator. I just want to talk about these lights real quick. So I could tell that this is the coordinator one because the green light here is blinking about once per second. Uh the router one is blinking about two times per second and endpoint will also blink two times per second. So this little green light helps you understand which one is doing which. If the light is solid, it either means that it's booting up or it's looking for a network. Whenever we send data across the network, you can see the red light turns on. Here I'm hitting enter key. And you can see the red light here is turning on and the red light here is turning on. So anytime that I send traffic across, the two red lights turn on. So, I think that was a little bit too easy. Let's complicate this chat program a little bit more and make use of Arduinos. So, I love diagrams. And once again, I'm drawing a diagram to show you exactly what we're going to be doing in the next step. So, XB1 is still going to be the coordinator and it's still going to be in AT mode. And XB2 is still going to be a router and an AT mode. And what we're going to do is connect an Arduino up to each one. this Arduino, the TX is connected to the RX port on XB and the Arduino RX port is connected to the XBTX port. And the same thing here, Arduino TX is connected to XBrx and Arduino RX is connected to XBTX. Then the both Arduinos are connected to the laptop. And what we're going to do is tell the lab tell the Arduino program to send a message to XB which is then going to wirelessly communicate that to the other XB which is then going to be read into Arduino. And then we're going to monitor that Arduino session on the uh terminal on the laptop. There's actually no changes that we need to do to the XBs themsel. All we're really going to do is add the Arduinos into the network. So let's get to work on building this. So this I've configured as the coordinator. So I'll use this Arduino as the coordinator's Arduino. So first I'll plug it into the breadboard. And now I need four pins connected here. Um first we'll do TX on the XB to RX. And then we'll do RX to TX. And now we're going to need 5 vols plugged into it which is there and ground which is that one. So now the coordinator Arduino XB pair is complete. So now let's do the other one. Uh we'll put this guy right here at the end. Can you hear that? That's my neighbor shooting fireworks off in his front yard. So now the router XB I plugged into the breadboard and we'll use this um Arduino here and we're going to do the exact same thing. Um TX here goes to RX here. It's hard to see at it. And then RX goes to TX. And now we'll do plus 5 volts here goes to 5 volts here. And ground here goes to ground there. Okay. So, now let's get let's get these guys connected. We'll use this guy here. All right. So, they're all connected the way we want. So, now let's look at the Arduino software. So, I've loaded up the Arduino software. Um, on the left side is the router. On the right side is the coordinator. So, let's start with the router. First we have to establish the serial port and then our main loop is just print line hello world wait for 5 seconds and then do it again and again and again and again. So basically just sending out the serial on the coordinator side. Same thing. Start the serial connection in the loop. If serial is available if it's more than zero, then we're going to do serial write whatever is in the serial buffer. So serial read and then write whatever is in serial read out to the buffer. So, whenever you go to upload a uh a program to the Arduino and the RX and TX ports are connected to the Arduino, you need to disconnect those to upload it. Otherwise, you get an AVR dude error. So, I've already uploaded both of these files to the Arduino. And I'm just going to head the serial monitor on the receiving side. So, this is the one that we're receiving it to. And although it doesn't look exciting, it certainly is working. The router is sending the message hello world to its XB. The XB is then transmitting that wirelessly to the other XB, the coordinator, which is then sending that data to the Arduino. And then I am reading the comp port for the Arduino on the on the coordinator side. This is actually the coordinator on this side. Now you can see it blinking once per second. This is blinking twice per second. The red light goes on. It stays on for 4 seconds. Now it went off for a second because every 5 seconds we're actually sending data from this Arduino to this XB over to this XB to this Arduino. And then the output of that is right here on the screen. Hello world. So that is a simple chat program that you now know how to make between two XBs using a combination between combination of either serial cables or an Arduino. And as you can see, it was really simple to do this. But that's just scratching the surface of what XB is capable of doing. In the next few lessons, we're going to be learning how to get data from individual pins off of the XB and communicate to the XB and um gather data from the XB itself. So, basically on the remote side, we won't be needing this Arduino anymore. Hopefully you tune in to those and I'll see you next

Original Description

This is lesson 2 video tutorial on XBee basics. In this video I show you how to make a simple chat program between two XBees in AT mode. Reuploading this because the old one got messed up. The old one was at 213,973 downloads when I replaced it with this one.
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Jack Rhysider · Jack Rhysider · 13 of 60

1 XBee Basics - Lesson 3 - API Mode: Digital Input from Remote Sensor
XBee Basics - Lesson 3 - API Mode: Digital Input from Remote Sensor
Jack Rhysider
2 XBee Basics - Lesson 4 - API mode: Reading analog data from remote XBee
XBee Basics - Lesson 4 - API mode: Reading analog data from remote XBee
Jack Rhysider
3 XBee Basics - Lesson 5 - API mode: Send Digital Output to a Rmote XBee
XBee Basics - Lesson 5 - API mode: Send Digital Output to a Rmote XBee
Jack Rhysider
4 Diamond Model of Intrusion Analysis - An Overview
Diamond Model of Intrusion Analysis - An Overview
Jack Rhysider
5 Getting Started with Metasploit
Getting Started with Metasploit
Jack Rhysider
6 Darknet Diaries - Ep 1: The Phreaky World of PBX Hacking
Darknet Diaries - Ep 1: The Phreaky World of PBX Hacking
Jack Rhysider
7 Ep 2: The Peculiar Case of the VTech Hacker
Ep 2: The Peculiar Case of the VTech Hacker
Jack Rhysider
8 Ep 5: #ASUSGATE
Ep 5: #ASUSGATE
Jack Rhysider
9 Ep 7: Manfred Part 1: Hacking Online Video Games for Fun
Ep 7: Manfred Part 1: Hacking Online Video Games for Fun
Jack Rhysider
10 Ep 8: Manfred Part 2: Hacking Online Video Games for Profit
Ep 8: Manfred Part 2: Hacking Online Video Games for Profit
Jack Rhysider
11 Ep 12: Crypto Wars
Ep 12: Crypto Wars
Jack Rhysider
12 Highlights from ToorCamp 2018
Highlights from ToorCamp 2018
Jack Rhysider
XBee Basics - Lesson 2 - Simple Chat Between Two XBess in AT Mode
XBee Basics - Lesson 2 - Simple Chat Between Two XBess in AT Mode
Jack Rhysider
14 What Lives Behind The Blue Screen | Human Readable
What Lives Behind The Blue Screen | Human Readable
Jack Rhysider
15 Top 7 Most Elite Nation State Hackers
Top 7 Most Elite Nation State Hackers
Jack Rhysider
16 The Raven by Edgar Allan Poe
The Raven by Edgar Allan Poe
Jack Rhysider
17 Podcast Promotion Strategies that Work
Podcast Promotion Strategies that Work
Jack Rhysider
18 Top 7 Most Notorious Video Game Hackers
Top 7 Most Notorious Video Game Hackers
Jack Rhysider
19 8 Biggest Cyber Heists Ever Pulled Off
8 Biggest Cyber Heists Ever Pulled Off
Jack Rhysider
20 10 Biggest Exit Scams of All Time
10 Biggest Exit Scams of All Time
Jack Rhysider
21 The Hack That Made Google Shut Down | Darknet Diaries Ep. 19: Operation Aurora
The Hack That Made Google Shut Down | Darknet Diaries Ep. 19: Operation Aurora
Jack Rhysider
22 AT&T Charged Him $900 So He Took Down Their Network | Darknet Diaries Ep. 20: mobman
AT&T Charged Him $900 So He Took Down Their Network | Darknet Diaries Ep. 20: mobman
Jack Rhysider
23 A Clipboard is All You Need to Break Into a Building | Darknet Diaries Ep. 22: Mini-Stories Vol. 1
A Clipboard is All You Need to Break Into a Building | Darknet Diaries Ep. 22: Mini-Stories Vol. 1
Jack Rhysider
24 Darknet Diaries (Theme Music) - True Stories From the Dark Side of the Internet
Darknet Diaries (Theme Music) - True Stories From the Dark Side of the Internet
Jack Rhysider
25 Why an Innocent Man Confessed to Medical Extortion Hacking🎙Darknet Diaries Ep. 25: Alberto
Why an Innocent Man Confessed to Medical Extortion Hacking🎙Darknet Diaries Ep. 25: Alberto
Jack Rhysider
26 How to Get Your Podcast to the Top of Apple for $5🎙Darknet Diaries Ep. 27: Chartbreakers
How to Get Your Podcast to the Top of Apple for $5🎙Darknet Diaries Ep. 27: Chartbreakers
Jack Rhysider
27 The Secret Hacking Unit of the Israeli Military🎙Darknet Diaries Ep. 28: Unit 8200
The Secret Hacking Unit of the Israeli Military🎙Darknet Diaries Ep. 28: Unit 8200
Jack Rhysider
28 Jon's Spooky Job Interview🎙Darknet Diaries CLIP ✂ (Ep. 119 Hot Wallets)
Jon's Spooky Job Interview🎙Darknet Diaries CLIP ✂ (Ep. 119 Hot Wallets)
Jack Rhysider
29 He Took Control of 50,000 Printers With 3 Lines of Code🎙Darknet Diaries Ep. 31: Hacker Giraffe
He Took Control of 50,000 Printers With 3 Lines of Code🎙Darknet Diaries Ep. 31: Hacker Giraffe
Jack Rhysider
30 Hacking Is Life-or-Death When You Target a Hospital🎙Darknet Diaries Ep. 121: Ed
Hacking Is Life-or-Death When You Target a Hospital🎙Darknet Diaries Ep. 121: Ed
Jack Rhysider
31 The Sewage Incident - When Operational Technology Isn't Secure
The Sewage Incident - When Operational Technology Isn't Secure
Jack Rhysider
32 The Cybergang That Stole $1 Billion From ATMs🎙Darknet Diaries Ep. 35: Carbanak
The Cybergang That Stole $1 Billion From ATMs🎙Darknet Diaries Ep. 35: Carbanak
Jack Rhysider
33 The New Guy at the Office Is a Secret Super Hacker🎙Darknet Diaries Ep. 36: Jeremy From Marketing
The New Guy at the Office Is a Secret Super Hacker🎙Darknet Diaries Ep. 36: Jeremy From Marketing
Jack Rhysider
34 Why Was This Bitcoin Millionaire Digging Tunnels Under His House?🎙Darknet Diaries Ep. 39
Why Was This Bitcoin Millionaire Digging Tunnels Under His House?🎙Darknet Diaries Ep. 39
Jack Rhysider
35 It Shouldn't Be THIS Easy to Break Into a Utility Company🎙Darknet Diaries Ep. 40: No Parking
It Shouldn't Be THIS Easy to Break Into a Utility Company🎙Darknet Diaries Ep. 40: No Parking
Jack Rhysider
36 The $30 Million Stock Market Hack🎙Darknet Diaries Ep. 123: Newswires
The $30 Million Stock Market Hack🎙Darknet Diaries Ep. 123: Newswires
Jack Rhysider
37 How to Protect Your Crypto Assets From Thieves
How to Protect Your Crypto Assets From Thieves
Jack Rhysider
38 Sometimes the Best Hacking Tool Is Confidence🎙Darknet Diaries Ep. 41: Just Visiting
Sometimes the Best Hacking Tool Is Confidence🎙Darknet Diaries Ep. 41: Just Visiting
Jack Rhysider
39 The Scammer Who Got Rich Invoicing Facebook & Google for $100 Million🎙Darknet Diaries Ep. 124
The Scammer Who Got Rich Invoicing Facebook & Google for $100 Million🎙Darknet Diaries Ep. 124
Jack Rhysider
40 The Secret Signals Hiding at Hacking's Biggest Conferences🎙Darknet Diaries Ep. 43: PPP
The Secret Signals Hiding at Hacking's Biggest Conferences🎙Darknet Diaries Ep. 43: PPP
Jack Rhysider
41 If You Don't Want to Get Hacked, Try Locking Your Doors🎙Darknet Diaries Ep. 125: Jeremiah
If You Don't Want to Get Hacked, Try Locking Your Doors🎙Darknet Diaries Ep. 125: Jeremiah
Jack Rhysider
42 The Most Epic Xbox Hacker Story You'll Ever Hear🎙Darknet Diaries Ep: 45 Xbox Underground (Part 1)
The Most Epic Xbox Hacker Story You'll Ever Hear🎙Darknet Diaries Ep: 45 Xbox Underground (Part 1)
Jack Rhysider
43 How Hacking an Xbox Destroyed These Teens' Lives🎙Darknet Diaries Ep. 46: Xbox Underground (Part 2)
How Hacking an Xbox Destroyed These Teens' Lives🎙Darknet Diaries Ep. 46: Xbox Underground (Part 2)
Jack Rhysider
44 The Ransomware Group That Went Too Far 🎙️ Darknet Diaries Ep. 126: REvil
The Ransomware Group That Went Too Far 🎙️ Darknet Diaries Ep. 126: REvil
Jack Rhysider
45 This Text Can Hack Your Phone, Even If You Never Open It🎙Darknet Diaries Ep. 47: Project Raven
This Text Can Hack Your Phone, Even If You Never Open It🎙Darknet Diaries Ep. 47: Project Raven
Jack Rhysider
46 Her Never-Ending Quest to Make Zero Days Hard🎙Darknet Diaries Ep. 127: Maddie
Her Never-Ending Quest to Make Zero Days Hard🎙Darknet Diaries Ep. 127: Maddie
Jack Rhysider
47 Rare Interview Where US Cyber Command Reveals Their Ops🎙Darknet Diaries Ep. 50: Op Glowing Symphony
Rare Interview Where US Cyber Command Reveals Their Ops🎙Darknet Diaries Ep. 50: Op Glowing Symphony
Jack Rhysider
48 Inside the Cyber War for Kashmir🎙Darknet Diaries Ep. 51: The Indo-Pak Conflict
Inside the Cyber War for Kashmir🎙Darknet Diaries Ep. 51: The Indo-Pak Conflict
Jack Rhysider
49 How Hackers Jack Your Credit Card When You Shop Online🎙Darknet Diaries Ep. 52: Magecart
How Hackers Jack Your Credit Card When You Shop Online🎙Darknet Diaries Ep. 52: Magecart
Jack Rhysider
50 Jammer! He Just Wanted Privacy, But This Little Device Caused Big Trouble
Jammer! He Just Wanted Privacy, But This Little Device Caused Big Trouble
Jack Rhysider
51 Who Stole the NSA's Top Secret Hacking Tools?🎙Darknet Diaries Ep. 53: Shadow Brokers
Who Stole the NSA's Top Secret Hacking Tools?🎙Darknet Diaries Ep. 53: Shadow Brokers
Jack Rhysider
52 How a Blow-Up Doll Can Be Used To Break Into Buildings🎙Darknet Diaries Ep. 130: Jason's Pen Test
How a Blow-Up Doll Can Be Used To Break Into Buildings🎙Darknet Diaries Ep. 130: Jason's Pen Test
Jack Rhysider
53 How Bitcoin Tracers Rescued 23 Kids From Sex Abuse🎙Darknet Diaries Ep. 131: Welcome to Video
How Bitcoin Tracers Rescued 23 Kids From Sex Abuse🎙Darknet Diaries Ep. 131: Welcome to Video
Jack Rhysider
54 The Dangerous Flaw in Windows XP's 45 Million Lines of Code🎙Darknet Diaries Ep. 57: MS08-067
The Dangerous Flaw in Windows XP's 45 Million Lines of Code🎙Darknet Diaries Ep. 57: MS08-067
Jack Rhysider
55 They Had Permission to Break In, So Why Are They In Jail?🎙Darknet Diaries Ep. 59: The Courthouse
They Had Permission to Break In, So Why Are They In Jail?🎙Darknet Diaries Ep. 59: The Courthouse
Jack Rhysider
56 This Hacker Makes $160K a Day ⁠— After He Got Out of Federal Prison🎙Darknet Diaries Ep. 60: dawgyg
This Hacker Makes $160K a Day ⁠— After He Got Out of Federal Prison🎙Darknet Diaries Ep. 60: dawgyg
Jack Rhysider
57 He Fell Asleep Hacking Sea World and Woke Up in a World of Trouble🎙 Darknet Diaries Ep. 62: Cam
He Fell Asleep Hacking Sea World and Woke Up in a World of Trouble🎙 Darknet Diaries Ep. 62: Cam
Jack Rhysider
58 "I rob banks for a living," but it's all totally legal🎙Darknet Diaries Ep. 66: Freakyclown
"I rob banks for a living," but it's all totally legal🎙Darknet Diaries Ep. 66: Freakyclown
Jack Rhysider
59 Mom Hacked a Prison With a Clipboard & USB Stick🎙Darknet Diaries Ep. 67: The Big House
Mom Hacked a Prison With a Clipboard & USB Stick🎙Darknet Diaries Ep. 67: The Big House
Jack Rhysider
60 Cyber Terror: Who Sabotaged This Saudi Chemical Plant?🎙Darknet Diaries Ep. 68: Triton
Cyber Terror: Who Sabotaged This Saudi Chemical Plant?🎙Darknet Diaries Ep. 68: Triton
Jack Rhysider

This video teaches how to configure XBee modules for simple chat in AT mode and establish serial communication with Arduino, enabling wireless data transmission between two XBees. The tutorial covers the use of XCTU software, Arduino programming, and serial communication protocols.

Key Takeaways
  1. Connect XBee coordinator to laptop via serial cable
  2. Connect XBee router to laptop via serial cable
  3. Configure XBee router using XCTU
  4. Configure XBee coordinator using XCTU
  5. Restore XBee to factory default using XCTU
  6. Connect Arduino TX to XB RX
  7. Connect Arduino RX to XB TX
  8. Connect 5V and GND to Arduino
  9. Upload Arduino program to the board
  10. Start serial connection in the loop
💡 XBee modules can be configured for transparent communication, allowing them to send and receive data wirelessly using serial communication protocols.

Related AI Lessons

I Built a Free AI-Powered YouTube SEO Toolkit With Zero Budget. Here’s What Actually Happened.
Learn how a solo dev built a free AI-powered YouTube SEO toolkit with zero budget and the lessons they learned from the experience
Medium · Startup
How to Create a Second Version of Yourself Inside Obsidian Using AI (Step-by-Step Guide)
Learn to create a second version of yourself inside Obsidian using AI with a step-by-step guide
Medium · ChatGPT
How to prepare for Spain civil service TIC exam using AI in 2026
Learn how to prepare for the Spain civil service TIC exam using AI in 2026, boosting your chances of success with technology-driven study techniques
Dev.to · David García
Going Viral! How I Created AI Kissing Videos Step by Step Easily Using AIAI.com
Create viral AI kissing videos using AIAI.com in a step-by-step process, leveraging AI technology for creative content creation
Medium · AI
Up next
Low-Tech, High-Impact: Replacing Your Receptionist With a $15 AI Phone System
Maximum Lawyer
Watch →