Why my serial port can not be written by ConnectPortX4?

I’ve got a ConnectPortX4 development kit. And I try to send and receive data from PC serial port via the XBIB-U-DEV.
I used the “xbee_serial_terminal” driver, and wrote a yml file myself.
I can write to the device by using " channel_set mydevice.write ‘hello’ ", or by idigi_dia html. But when I use " channel_dump ", it returns always like this:
channel value unit timestamp

read (vacancy) (vacancy) 1970-01-01 00:00:00
write (vacancy) (vacancy) 1970-01-01 00:00:00

I send my data with a serial assistance software, and the leds on the XBIB board blinked, it seems like the data had been sent out. Why my connectport can not read it?

Anybody help??
I dived into the project, that it seems like the read_callback function has not been excuted. So the connectport didn’t call the callback function. Does that mean the data has not been successfully sent or there are something wrong with the driver?

hope for your reply!

Use telnet to the X4 and enter the command “set trace state=on mask=xbee:*”

This will dump ALL Xbee traffic between the X4 and its XBee. My first guess is the X4 is receiving the data, but because the XBIB’s end-points are misaligned, so the X4 is discarding the data as irrelevant.

If you see you data in the above trace, post it here as we can decode the header routing in the Zigbee packets.

Hi lynnl:
Thank you for your reply.
The command has no return data. And if it is just “set trace”, the data is like this:
#> set trace

trace is currently on, using historical mode
syslog is currently off, loghost is
acl : ac___ addp : ac___ address : ac___ alarm : ac___
autoconn: ac___ camera : ac___ chat : ac___ clocksrc: ac___
config : ac___ connect : ac___ ddns : ac___ dhcps : ac___
dialserv: ac___ dma : ac___ dns : ac___ dnsproxy: ac___
edp : ac___ ether : ac___ failover: ac___ flash : ac___
fwupd : ac___ gps : ac___ hostlist: ac___ i2c : ac___
ia : ac___ inetd : ac___ modem : ac___ nat : ac___
netcx : ac___ pmodem : ac___ portsw : ac___ ppp : ac___
printf : ac___ python : ac___ rci : ac___ rciser : ac___
router : ac___ scep : ac___ serial : ac___ sertcp : ac___
serudp : ac___ simplepw: ac___ sms : ac___ snmp : ac___
ssh : ac___ ssl : ac___ st : ac___ surelink: ac___
system : ac___ tftp : ac___ treck : ac___ usb : ac___
user1 : ac___ user2 : ac___ user3 : ac___ user4 : ac___
user5 : ac___ user6 : ac___ user7 : ac___ user8 : ac___
user9 : ac___ user10 : ac___ vpn : ac___ vrrp : ac___
webui : ac___ xbee : acwid

Oh yeah!
It’s the problem of setting endpoints. Now the data reading is ok. Thanks lynnl, you are so brilliant!
But I had tried masking the endpoints with the code “match_spec_set(XBeeAddress turple,(True,False,False,False))”, and it still didn’t work. Dose that mean the mask dosen’t work?

My answers are not ‘brillance’ - just ‘been-there-done-that’ :slight_smile:

I don’t know the details of the match_spec_set().

However, if the XBee in the XBIB retains the default end-points of src/dst both 0xE8, then the Dia stuff should just work. It will filter by MAC address for you, so under ZB or DigiMesh, all XBee use the same end-points and the callback within your xbee_serial_terminal driver will ONLY see the data from the XBee it linked to.

So you could have 10 devices, point 10 instances of your driver to them and each is happy, seeing only their own data.