Merge branch 'development' of ssh://git.tcp.direct:2222/freqy/protomolecule into development

This commit is contained in:
kayos 2021-05-08 15:45:42 -07:00
commit 939f0337b4
4 changed files with 27 additions and 9 deletions

@ -5,6 +5,17 @@ Cross platform BLE scanner and logger with teeth \n
***add a better description***
# Dev notes
- **dust** util functions
- **eros** found devices DB
- **phoebe** tiny go stuff
- **scanStuff** well i mean...
- **blueStuff** connect to devices / retreive service characteristics
# TODO
## Short Term Needs
@ -28,10 +39,7 @@ Cross platform BLE scanner and logger with teeth \n
- If GATT exploits are known, present user with options
- ### Logging
- Exportable
- ### Logging vs 6.5 grendel drop
- ### Connect to device
- ### Read / Write GATT
- ### Device selection

@ -0,0 +1,5 @@
package blueStuff
//controls connections to found devices to get service characteristics
//func

@ -1,6 +1,5 @@
package eros
// Eros controls the Bitcask db that holds the devices captured during scanning
//
// MAC (Key)
@ -44,13 +43,13 @@ func Awaken() {
}
// Remember - store device details into the database
func Remember(mac string, name string, adv []byte, services []string) error {
func Remember(mac string, name string, adv []byte /*, services []string*/) error {
var err error
details := Details{
LocalName: name,
Advertisement: adv,
Services: services,
//Services: services,
}
device := Device{
@ -83,5 +82,3 @@ func Recall(mac string) (Device, error) {
json.Unmarshal(bytes, &member)
return member, err
}

@ -4,6 +4,7 @@ import (
"github.com/fatih/color"
"protomolecule/src/dust"
"protomolecule/src/eros"
projVars "protomolecule/src/vars"
"tinygo.org/x/bluetooth"
@ -33,6 +34,9 @@ func Scanners() {
println(device.AdvertisementPayload)
//for _, uuid := range device.AdvertisementFields.ServiceUUIDs {
//places captured devices into the eros DB
eros.Remember(device.Address.String(), device.LocalName(), device.AdvertisementPayload.Bytes())
//TODO: create localname fort devices that dont broadcast one * dust.OhNameMeZaddy() *
projVars.ScanList[device.Address.String()] = device.LocalName()
@ -41,8 +45,12 @@ func Scanners() {
//projVars.InitResults = append( projVars.ScanList[device.Address.String()], 1)
//TESTS and Stuff//
color.Red(i)
//test for data being placed
eros.Recall(device.Address.String())
//time.Sleep(3 * time.Minute)
//results = device