Code Monkey home page Code Monkey logo

bluetooth_detector's Introduction

Blue Crab

Blue Crab is an app that scans for and identifies Bluetooth tracking devices. The goal of this project is to prevent stalking and to provide wider services for more platforms than what is currently offered (i.e. Apple and Google/Android).

Important note before installation: Blue Crab is not yet functional on Linux, but progress is being made to make it available. Stay tuned!

Getting Started on Linux

Prepping your system

  • Verify that you have bash, file, mkdir, rm, and which installed on your device. These binaries (executable programs) should already be pre-installed with the Linux OS.
which bash file mkdir rm which
/bin/bash
/usr/bin/file
/bin/mkdir
/bin/rm
which: shell built-in command
  • Install curl, git, unzip, xz-utils, zip, and libglu1-mesa
sudo apt-get update -y && sudo apt-get upgrade -y;
sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa
  • Install clang, cmake, ninja-build, pkg-config, libgtk-3-dev, and libstdc++-12-dev
sudo apt-get install \
    clang cmake git \
    ninja-build pkg-config \
    libgtk-3-dev liblzma-dev \
    libstdc++-12-dev

Downloading and extracting the Flutter SDK

You can download and extract the Flutter SDK using two different methods. The first is using snap and is always preferable, but if the first method doesn't work (usually in the rare case where snap is not well supported on certain Linux distributions), the second is still very much a viable option.

  1. Using snap
cd
sudo snap install flutter
flutter --version
  1. To be used only the case where snap is not (well) supported
cd
mkdir flutter
wget https://storage.googleapis.com/flutter_infra/releases/stable/linux/desktop/flutter_linux_3.22.3-stable.tar.xz
tar xf flutter_linux_3.22.3-stable.tar.xz

Add Flutter to your PATH

Check which shell starts when you open a new console window. This is your default shell.

echo $SHELL

Based on your default shell, choose one of the commands below.

  • bash
echo 'export PATH="/flutter/bin:$PATH"' >> ~/.bash_profile
  • zsh
echo 'export PATH="/flutter/bin:$PATH"' >> ~/.zshenv
  • fish
fish_add_path -g -p /flutter/bin
  • csh
echo 'setenv PATH "/flutter/bin:$PATH"' >> ~/.cshrc
  • tcsh
echo 'setenv PATH "/flutter/bin:$PATH"' >> ~/.tcshrc
  • ksh
echo 'export PATH="/flutter/bin:$PATH"' >> ~/.profile
  • sh
echo 'export PATH="/flutter/bin:$PATH"' >> ~/.profile

To apply this change, restart all open terminal sessions.

Check your development setup

Open a shell and run the following command:

flutter doctor

You do not need ALL components. It should resemble something like this:

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.1, on Ubuntu 20.04 (LTS), locale en)
[!] Android toolchain - develop for Android devices
[!] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] Linux toolchain - develop for Linux desktop
[✓] VS Code (version 1.89)
[✓] Connected device (1 available)
[✓] Network resources

! Doctor found issues in 3 categories.

Troubleshoot Flutter doctor issues

  • Run the following command:
flutter doctor -v

Note: Installing the Flutter SDK means that all the packages (including the Dart SDK) are already installed, so nothing else has to be installed separately.

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Cloning Blue Crab

To clone this repository, run the following:

cd /Downloads
git clone [email protected]:DIPrLab/bluetooth_detector.git

Getting packages and setting up your code editor

To get all the Flutter plugins, run the following to get the most updated dependencies available:

flutter pub get
flutter pub upgrade
flutter pub upgrade --major-versions

Now run this command:

flutter pub outdated

If there's a package in the generated "table", this is perfectly fine as long as something similar to what is below is generated after this "table".

You are already using the newest resolvable versions listed in the 'Resolvable' column.
Newer versions, listed in 'Latest', may not be mutually compatible.

If this isn't the case, be sure to run any commands suggested by the program. It may be flutter pub upgrade --major-versions a second time, which is fine.

After run all of these commands, you're set to start coding! All files to edit will be in the folder lib in files ending in .dart.

Running the app

To run the app, run this command:

flutter run

When you do so, you should see something similar to what is below. Keep in mind that Blue Crab is not fully functional on Linux, so if operating on Linux, you may see errors.

Launching lib/main.dart on Linux in debug mode...
Building Linux application...
✓ Built build/linux/x64/debug/bundle/bluetooth_detector

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

Learning Dart

Here are a few resources to get started on your Dart learning journey:

bluetooth_detector's People

Contributors

dylanconklin avatar starlumos avatar imgbotapp avatar

Watchers

 avatar

bluetooth_detector's Issues

Add "aggressive" mode

Allow users to auto-connect to devices to get more data about surrounding devices, and receive a re-connect signal.

Pause/Continue scanning

Allow users to stop gathering data for an extended period of time, and allow them to continue adding data to an already existing report.

Limit the window in which this can occur.

For example: Users should be able to add new data to a report they added data to yesterday, or a few days ago. Users should not be able to add data to a report from a year ago

Add Settings Page

Add Settings page to customize app behavior and sensitivity. Replace all magic numbers.

Add data gathering

Add a data-gathering module to send data to the database. The exact data to be gathered is TBD.

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.