its not that your bluetooth did not receive any data your bluetooth.connect() returns a boolean, so your connection in connection = bluetooth.connect(...) is also a boolean, and boolean dont have a output() method