Skip to content

warcollar/DopeScope2

Repository files navigation

Setting up your environment

Flashing

  1. Power on your DopeScope2 and connect it to your computer with the provided USB cable.

  2. Double-click on the dopescope2.ino to bring up the Arduino IDE

  3. Select Tools --> Port and select your DopeScope from the list of connected devices

  4. Use the built-in arduino "Upload" command to compile and upload the software (the Arrow at the top left-hand side of the IDE) to the DopeScope.
    -- Wait for the device to reboot.

  5. Upload the BLE Manufacturer DB by selecting Tools --> ESP32 Sketch Data Upload.

  6. Enjoy

BLE Manufacturer Database

BLE devices use a vendor code to specify the manufacturer of a given device. This is very similar to a MAC address OUI. The database is maintained by the Bluetooth Special Interest Group (SIG) and is available here: (https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers/). This list is too large to put in program memory and would take too long for a microcontroller to do a normal lookup, so a utility is included to generate a ready-to-go solution. When complete, a flat DB file is created where the name of each company is truncated to a fixed length and stored in the file at the offset corresponding to it's ID.

To create or update the database:

  • Go to the linked page:
  • Select the option to view all records (Be sure to leave the default sort option of highest ID to lowest)
  • Select and copy the records
  • Paste them into a file, eg. sourcefile.txt

Run the utiltiy, manpacker.py, with the following arguments:

manpacker.py SOURCEFILE MAXLENGTH

SOURCEFILE is the source tx file we created earlier: sourcefile.txt

MAXLENGTH is the size of each name. Any names shorter that this are padded with spaces and any names longer are truncated to this length. Keep in mind that the base display can't show more than ~23 chars, so there isn't much value in exceeding that.

When done, be sure to move the resulting manufacturers.db to the /data folder in the source tree so it can be uploaded to the DopeScope using the "ESP32 Sketch Data Upload" function

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published