vrajroham / python-xbee

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

xbee.wait_read_frame waits forever and returning no response #59

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Python simple app, which tries to change remote xbee digital output and receive 
response.

What is the expected output? What do you see instead?
I want to get any response from remote AT command, when I send AT command 
localy, response is immediate.

What version of the product are you using? On what operating system?
Linux, xbee 2.1.0, Python 2.7.9

Please provide any additional information below.

Here is my code:

from xbee import ZigBee

import time
import serial

PORT = '/dev/ttyUSB0'
BAUD_RATE = 9600

# Open serial port
ser = serial.Serial(PORT, BAUD_RATE, serial.EIGHTBITS, serial.PARITY_NONE, 
serial.STOPBITS_ONE, 5)

xbee = ZigBee(ser)

device={ 
        "gate":'\x00\x13\xa2\x00\x40\xba\xf3\x41',
        "lights":"\x00\x13\xa2\x00\x40\xb1\x37\x44"         
} 

xbee.remote_at(dest_addr_long=device["lights"], command='D3', parameter='\x05', 
frame_id='A') 

response = xbee.wait_read_frame(100) 
print response 

xbee.halt()
ser.close()

Original issue reported on code.google.com by juraurb...@gmail.com on 30 Mar 2015 at 9:12

GoogleCodeExporter commented 8 years ago
It gets stuck at xbee.wait_read_frame(100)  and waiting and waiting ... even 
provided timeout did not help.
BUT AT command is by remote xbee received and performed

Original comment by juraurb...@gmail.com on 30 Mar 2015 at 9:14

GoogleCodeExporter commented 8 years ago
There is a mode, if iḿ not mistaken, where you can avoid answer from the 
remote Xbee if the task is correctly fulfilled.

Maybe, you have that mode activated and are waiting for an answer that will 
never come.

Original comment by lmbpsoa...@gmail.com on 9 Jun 2015 at 9:29