I have been testing Steve’s answer using the Create cable and Python and have ran into some difficulties.
Enabling hardware flow control when opening the serial port results in nothing happening when sending/receiving data from the Create 2. Page 4 of the guide says “Flow control: None”. While I have never used hardware flow control, I suspect the Create 2 is not properly handling the handshake so data is not flowing properly.
When enabling hardware flow control did not work at the time of opening the connection, I attempted to make use of the setRTS method. (Research into this method and setDTR indicate both are implemented in PySerial.)
I tried the following to see if it would wake the Create 2
serial_port.setRTS(True)
time.sleep(1)
serial_port.setRTS(False)
time.sleep(1)
serial_port.setRTS(True)
where the sleep argument of 1 is in seconds. I also tried the above with the following changes
toggling False, True, then False
setting the sleep period to .5
In addition, I tried all the above with setDTR(). None of the above worked to wake the Create 2.
Next I tried to something simpler – trying to keep the Create 2 from falling asleep. Based on page 6
“To disable sleep, pulse the BRC pin low periodically before these five minutes expire. Each pulse resets this five minute counter. (One example that would not cause the baud rate to inadvertently change is to pulse the pin low for one second, every minute, but there are other periods and duty cycles that would work, as well.)”
With the Create 2 in Passive mode I tried the following
while True:
time.sleep(60)
serial_port.setRTS(True)
time.sleep(1)
serial_port.setRTS(False)
time.sleep(1)
serial_port.setRTS(True)
This had no effect. I then tried all the permutations as above when trying to wake the Create 2, but none of these had any effect. I did find a pdf guide detailing how to make your own Create cable that indicates the BRC line should be connected to the RTS on the computer side, but it does not seem to work.