Bluetooth Serial Relay and push button.

Did you provide a continuous stream of characters on the serial line, to allow pin 9 to be read?