nionata / grapevine

Anonymous proximity-based gossip messaging mobile application
1 stars 0 forks source link

Bluetooth module #5

Closed nionata closed 2 years ago

nionata commented 3 years ago

Get an MVP of a bluetooth module working that at a minimum can both scan and advertise. This is a sanity check to ensure we can use ble the way we plan.

nionata commented 3 years ago

I have been trying to integrate react-native-ble-manager with no success. The npm package has been installed as well as the corresponding ios pods. However, when running npm run ios I get the following build errors:

The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'react-native-ble-manager' from project 'Pods')

I have checked the IPHONEOS_DEPLOYMENT_TARGET for the project and it is 12.0, so this doesn't make sense. I'm wondering if there is some build time injection of this lower value? When switching back to master the issue goes away and the app builds fine.

@paullegrand can you pull down nionata/ble-manager and see if you can repro the build error?

nionata commented 3 years ago

Great resource for RN + BLE managers

nionata commented 3 years ago

I tried installing react-native-ble-plx on a fresh branch from master. Same err message on build:

The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'react-native-ble-plx' from project 'Pods')

Branch: nionata/ble-manager-2

nionata commented 3 years ago

Docs

nionata commented 3 years ago

I tried installing react-native-ble-plx on a fresh branch from master. Same err message on build:

The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'react-native-ble-plx' from project 'Pods')

Branch: nionata/ble-manager-2

We ended up going with the plx module. The errors were resolved by removing some garbage text packages that snuck in??

nionata commented 3 years ago

Scan for peripherals from the web

nionata commented 3 years ago

Peripheral module is working on an iphone. I was able to read a gatt characteristic via web bluetooth. @paullegrand was able to get the manager working yesterday.

Screen Shot 2021-11-18 at 4 12 33 PM

Next step is to integrate the two

nionata commented 2 years ago

Choosing a GATT UUID

TLDR: To not conflict with a reserved UUID avoid XXXXXXXX-0000-1000-8000-00805F9B34FB

nionata commented 2 years ago

Huston we have lift off 🚀

IMG_C0C5817C78D7-1 IMG_4744

nionata commented 2 years ago

Single message transmission is working with a few hiccups.

nionata commented 2 years ago

BLE packet optimization