cthuun / python-xbee

Automatically exported from code.google.com/p/python-xbee
MIT License
1 stars 0 forks source link

dio7 missing on the printed frame #52

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.set dio0 to dio7 = 3 ( digital input )
2.
3.

What is the expected output? What do you see instead?
I was expecting that all dioX will show on the frame. 
What I noticed is dio7 is missing in the frame, but IC = FF is triggering the 
Xbee to send the package

What version of the product are you using? On what operating system?
2.1.0 over Vista or Windows 8

Please provide any additional information below.
all dioX activated on the Xbee as digital inputs are showing on the frame. I am 
using form 0 to 7 but xbio7 is not showing. is missing. Please notice that i am 
not an expert on this and easily I could be doing something wrong.

#! /usr/bin/python

from xbee import ZigBee
import serial
import datetime
import time

#open the serial communication for windows
ser = serial.Serial(port = 'COM4', baudrate=9600)
#ser = serial.Serial('/dev/ttyUSB0', 9600) this is for Ubuntu
xbee = ZigBee(ser)

#this line is to filter what readios we want to receive for the test.
MAC_x6 = '\x00\x13\xA2\x00\x40\x9C\x65\xC5'
MAC_x11 = '\x00\x13\xA2\x00\x40\x30\xC7\xA0'

#print xbee.wait_read_frame()['status']

while True:
    try:
        packet = xbee.wait_read_frame()
    if packet['source_addr_long'] == MAC_x6 or packet['source_addr_long'] == MAC_x11 :
        print (packet)
        print "--------------"
        print (packet['source_addr_long'])
        ctime = datetime.datetime.now().time()
        print ctime 
        print packet['id']

    except KeyboardInterrupt:
        break

ser.close()

Original issue reported on code.google.com by diegoc.a...@gmail.com on 18 Jun 2014 at 7:51