Ravn::Bluez::State::

Unconnected class

Manage a Bluez-Profile event loop, responsible for creating a SPP (RFCOMM) destination socket for a bluetooth client to attach to.

Public Instance Methods

on_start()

Install the RFCOMM SPP socket, begin waiting on incoming clients.

# File lib/ravn/bluez/state/unconnected.rb, line 17
def on_start
        self.device.stop_scanning
        self.device.start_socket_callback
end
on_stop()

Cleanly shutdown the socket event loop.

# File lib/ravn/bluez/state/unconnected.rb, line 24
def on_stop
        self.device.stop_socket_callback
end
update( * )

Transition once we have a valid client socket.

# File lib/ravn/bluez/state/unconnected.rb, line 30
def update( * )
        return :connection_opened if self.device.socket
end