Giter Site home page Giter Site logo

Comments (4)

GarryQualls avatar GarryQualls commented on July 30, 2024

I am also having this same problem with a clean Raspbian install on a Pi 3 B+ and an Ubertooth One. Everything is running the latest versions of everything as far as I can tell. I get 4 seconds of data and then it errors out, as above.

from blue_hydra.

GarryQualls avatar GarryQualls commented on July 30, 2024

OK, I seem to have gotten around this error by modifying the "louis.rb" file that is referenced in the 2nd error message above. On a Raspberry Pi running Raspbian Stretch, I did the following:

cd /var/lib/gems/2.3.0/gems/louis-2.1.0/lib/
sudo chmod 777 louis.rb

Then, I opened /var/lib/gems/2.3.0/gems/louis-2.1.0/lib/louis.rb with simple text editor, deleted .compact from line 35 and from line 40, and saved the file. Then I changed the file permissions on louis.rb back to 644 (not that it matters much in a hack this sloppy).

After that, blue_hydra runs without generating errors that bring it to a halt. There are a few warnings about discarding chunks with no addresses in the log file. I do not know if that is related to my change.

From a little googling, compact() in Ruby is supposed to return a copy of the array with all the nil elements removed, so now that section of louis.rb is probably returning the array instead of a copy of the array? This is the first time I've actually seen ruby code, so I don't understand the potential implications of this and I don't know what kind of havoc making this change to louis.rb is likely to unleash.

from blue_hydra.

zhilton avatar zhilton commented on July 30, 2024

This issue is not entirely with BlueHydra. BlueHydra utilizes Louis for looking up addresses and attributing them to a manufacturer. Louis was being developed under https://github.com/pwnieexpress/louis but seems to have gone quiet as of October 2017. One of the contributors @sstelfox seems to have continued the project at https://github.com/sstelfox/louis. As of release 2.0.8 of Louis, the project added Hash#compact to lines 35 and 40 of lib/louis.rb. This serves to remove elements with a 'nil' value from the returned hash (I didn't check if this would negatively impact BlueHydra), but wasn't added to the Ruby language until Ruby 2.4.0. BlueHydra currently claims to require Ruby version 2.1. By default, when you gem install louis, you get the latest version, updated quite recently, and seemingly requiring Ruby >2.4.0.

Possible fixes to this are to either do bundle install as recommended and then change the version of Louis to 2.0.7 (I don't ruby often so I would do

gem uninstall louis
gem install louis -v 2.0.7

but there is likely a better way) or to change the required language from Ruby 2.1 to Ruby 2.4.0. Also I guess it may be possible to define the gemfile to grab the appropriate version, but then BlueHydra will stop receiving updates of Louis...

As for the Raspberry Pi (which is why I also found this bug), the default repository for when you issue apt install ruby-dev is installing Ruby 2.3.3 (at least when I tried this recently), which should work fine for BlueHydra as stated, but doesn't support the latest Louis. I'll be submitting an issue to the new Louis repository as well to up-rev the required language.

from blue_hydra.

zhilton avatar zhilton commented on July 30, 2024

After opening an issue to update the required Ruby version in Louis, @sstelfox implemented a backwards compatible fix, release 2.1.4, that should fix this particular issue.

from blue_hydra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.