Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when no bluetooth adapter #4

Open
dlech opened this issue Feb 19, 2018 · 1 comment
Open

Error when no bluetooth adapter #4

dlech opened this issue Feb 19, 2018 · 1 comment

Comments

@dlech
Copy link

dlech commented Feb 19, 2018

I don't have built-in bluetooth, so after creating the bluetooth address config file, I get the following error

/home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/connection/bluetooth.rb:19:in `connect': No route to host - connect(2) for unknown address family 31 (Errno::EHOSTUNREACH)
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/connection/bluetooth.rb:19:in `initialize'
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/connection.rb:8:in `new'
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/connection.rb:8:in `rescue in create'
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/connection.rb:5:in `create'
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/direct_commands.rb:5:in `initialize'
        from hello.rb:4:in `new'
        from hello.rb:4:in `<main>'

A friendly error message, such as "no Bluetooth or USB devices found", would be better.

@mvidner
Copy link
Owner

mvidner commented Feb 19, 2018

Ah, even my oldest machines have a built-in BT adapter, but I guess I can remove the kernel module to simulate the absence. (Note to self: rmmod btusb does it)

OK, I just need to poke a bit so that the library does not swallow too much details of other exceptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants