Remember
Register
Home
/
Support
/
Support Forum
/
help me with arduino code to make zigbee router & zigbee coordinator & connect to PC via LAN shield?
Digi Forum
All Activity
Q&A
Questions
Hot!
Unanswered
Tags
Categories
Users
Ask a Question
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.
All categories
Digi Remote Manager
(387)
Python
(1,016)
RF Solutions and XBee
(8,439)
Device Cloud-enabled RF Gateways
(97)
XBee3
(482)
IEEE 802.11 (Wi-Fi)
(267)
IEEE 802.15.4
(1,646)
ZigBee PRO Featureset (and legacy ZNet 2.5)
(1,490)
ZigBee Smart Energy Profile 1.1
(111)
DigiMesh Proprietary Mesh Networking
(785)
Multipoint Proprietary
(197)
XLR PRO
(17)
XStream
(40)
XTend
(137)
XCite
(4)
XPress
(8)
Miscellaneous Hardware and Software
(515)
XBee Programmable Development
(778)
XBee Cellular
(120)
MicroPython
(66)
Digi TransPort
(789)
Digi Connect Cellular
(447)
DAL
(5)
Embedded Devices
(4,170)
Google Coral
(2)
Rabbit
(3,200)
Console Servers
(354)
Modbus and Industrial Automation
(246)
Realport
(603)
Serial Servers
(837)
Satellite Modules
(25)
USB
(1,273)
Serial Cards
(715)
ConnectPort Display
(58)
Feedback/Wish List
(93)
Other/Legacy
(377)
help me with arduino code to make zigbee router & zigbee coordinator & connect to PC via LAN shield?
0
votes
need arduino program to happen interaction between sensor & PC via IP. Thanks.
zigbee
arduino-xbee
programming
asked
Dec 2, 2015
in
XBee Programmable Development
by
roy_2015
New to the Community
(
0
points)
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1 Answer
0
votes
Which zigbee module are you using; S2B or S2C?
answered
Dec 3, 2015
by
asgm
Veteran of the Digi Community
(
1,499
points)
i'm not sure. probably S2C.
If its S2C, then write a code to create serial socket connection with modules and pass one "CE" AT command to it with appropriate parameter. This parameter is used to configure module to Coordinator/Router.
I wrote a similar code in python, you can use it for reference:
import serial
import sys
import time
######### USER DATA ###########
com_port = 'COM4'
baud_rate = 9600
###############################
## Create serial connection to module
ser = serial.Serial(com_port, baud_rate, timeout=1)
while True:
cmd = raw_input("Enter Command (to quit type EXIT): ")
if cmd == 'EXIT':
break
count = 0
while True:
print "Attempting to enter AT Mode"
count += 1
ser.write("+++")
time.sleep(1)
resp = ser.read(2)
if (resp == "OK"):
print "Successfully entered Command Mode"
ser.write("AT" + cmd + '\r')
print "Response from module: "
print ser.readline()
print "-----------------------------------------"
break
elif (count > 5):
print "** Unable to enter Command Mode. Check parameters **"
break
ser.close()
Please
log in
or
register
to add a comment.
...