Home/Support/Support Forum/XBP9B-DMSTB002 does not work without initialization in XCTU

XBP9B-DMSTB002 does not work without initialization in XCTU

0 votes
Hi, guys.
I have been struggling with XBP9B-DMSTB002 for 3 days.
I have found weird issue on it.

My point is to develop python API which interacts with it via serial bus.

At first, I was trying to send a simple AT command(e.g. NI packet) and receive its response.

Every time I send NI command, it replied with weird values.

NI packet: 7E000408014E495F
response: 00010408014E49205F

But after I run the XCTU and add XBee module(http://docs.digi.com/display/XCTU/Add+radio+modules), it replies with correct values.

So I am guessing that XCTU does something when it addes XBee module.

Is there any additional stuff before starting communication with Programmable module?

I am eager to hear from you soon.

Thanks.
asked Aug 24, 2016 in XBee Programmable Development by wester_weerdt New to the Community (2 points)

Please log in or register to answer this question.

3 Answers

0 votes
Apart from bypassing Freescale MCU, I don't think XCTU do anything additional.

It mere create a socket connection with module similar to any other terminal program like putty or hyperterminal.
answered Aug 25, 2016 by asgm Veteran of the Digi Community (1,408 points)
It does allow you a GUI interface into the RF processors firmware. It will not do anything else though with the Freescale processor.
0 votes
Came here looking for this exact post as i'm having the exact same issue with API mode.

1. Plug XBee's + USB adapter in to USB ports
2. Use Python script to listen on ttyUSB1
3. Use python script to send on ttyUSB0

The above results in nothing, however, if after plugging the XBee modules in you then add them both to XCTU and then set them up to listen and send it works.

It does seem there is something that isn't happening in the setup of the python scripts to prevent them from working.
answered Sep 7, 2016 by jm2k New to the Community (2 points)
The XBee module listed above is a Programmable XBee module. That means that it comes with a 2nd processor located between the RF processor and the XBee modules Pins.  You must, I repeat, must write and load an application on the 2nd processor before you can communicate with the RF processor.
0 votes
Here is how i got it to work.

You will need:

XBee SDK - http://www.digi.com/support/getasset?fn=40003003&tp=10
Codewarrior (option to install as part of SDK setup)
USB XBee adapters (i didn't have the recommended XBIB board)
XMODEM transfer application - I used 'sx' under linux
XCTU-NG - The new/current version of XCTU

So as there is a separate processor in between the radio and the serial connection, we want to upload a program that allows us to passthrough commands direct to the radio, I'm assuming this is what XCTU-NG does when it communicates with programmable radios.

After the XBee SDK and codewarrior are installed, open up code warrior and select the following:

File > New > XBee sample application project > (select your XBee model) > XBee - Serial Bypass > Next & Finish

Then select the following:

Project > Build All

Find you workspace folder and in there there should be a folder called serial_bypass, within this there should be a file called serial_bypass.abs.bin either in the Debug or Release folder. This is the program we need to upload to the processor to allow us to talk directly to the radio.

Now we can prepare a script to write the bin file via the xmodem protocol, dump the following in file, modify to your specific port and make it executable:

#!/bin/bash

sx -vv $1 < /dev/ttyUSB1 > /dev/ttyUSB1

Now open XCTU and connect you radio(s), the first thing we want to do is change the baud rate to 115200 and write the changes.

We need to now get the radio(s) into file upload mode, this can be done via the following:

Go to console mode in XCTU
Set the DTS to on, the RTS to off and BREAK to on
Reset the radio with the reset button on the USB shield
A series of '0' characters should repeat in the console window
Set BREAK to off
In the console window on the left hand side enter a 'B' (capital) and press enter
This should present the bootloader menu (might take a few attempts to the sequence right)
Press 'f' to put the processor into upload mode and the radio should repeat 'C' in the console window
Disconnect the serial console in XCTU (the radio will still be waiting for the file transfer)

Open up a command prompt and use the script we created with the binary we compiled earlier:

./xmodemsend.sh serial_bypass.abs.bin

Repeat the process for any other radios.

Now we can test using the python XBee library, create the two following python scripts:

Send:

from xbee import ZigBee
from serial import Serial

PORT = '/dev/ttyUSB0'
BAUD = 115200
dal = '\x00\x00\x00\x00\x00\x00\xFF\xFF'
da = '\xFF\xFF'
ser = Serial(PORT, BAUD)

xbee = ZigBee(ser)
xbee.send("tx",data="Hello World\n",dest_addr_long=dal,dest_addr=da)

ser.close()

Recieve:

from xbee import ZigBee
from serial import Serial

PORT = '/dev/ttyUSB1'
BAUD = 115200

ser = Serial(PORT, BAUD)

xbee = ZigBee(ser)

while True:
try:
print "waiting"
response = xbee.wait_read_frame()
print response
except KeyboardInterrupt:
break

ser.close()
answered Sep 28, 2016 by jm2k New to the Community (2 points)
...