def rfcomm_send (self, data):
        dbg ("sending: [%s]" % data)
        status, written = self._wc.write (data)
        if status == _widcomm.RFCOMM_SUCCESS:
            dbg ("sent okay")
            return written
        else:
            raise BluetoothError (_port_return_code_to_str (status))
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/pybluez/bluetooth/widcomm.py/BluetoothSocket.rfcomm_send/original