Skip to content

porting from IOS to Android and in trouble #757

@sdetweil

Description

@sdetweil

I have a nicely working Ionic IOS app and system
it has both Peripheral and Central function

we advertise (Peripheral) and our hardware wakes from sleep based on the service UUID (128 bit)
and starts advertising its current UUID (128 bit) of the three services defined.

we scan (Central) looking for our hardware's UUID (UUID), really the trailing 96 bits. as the front 32 bits have information encoded in them .. as there may be multiple phone devices present in the same room, we don't connect as it blocks others access. this data changes live, so the active service UUID (128 bit) of a device changes live.. nRfConnect() shows these changes

anyhow..

  1. when I try to advertise our 128 bit UUID, I get
service: BluetoothLePlugin, action: startAdvertising, actionArgs: [{"timeout":0,"service":"00000000-27b9-42f0-82aa-2e951747bbf9","name":"ConfigApp"}]
http://localhost/js/app.40e959b6.js - Line 1 - Msg: advertise error={"error":"startAdvertising","message":"Too large data"}

thus our hardware will never wake up

if I leave out the service, then advertising starts, nrfConnect can see the device by name, (but we don't use the name), but there are no services, and thus no UUIDs for our device to find...

  1. when scanning, I get the encoded advertisment data, but never the UUIDs.. this is central to our system design.
    because the first 32 bits of the UUID is data, we could have that many different combinations, so I cannot filter in scan.
    I currently compare the trailing part of the UUID with our UUID end ("27b9-42f0-82aa-2e951747bbf9"). if that matches it one of ours.

but I don't get the active service UUID..

  1. one of the services is our firmware upload service.. while present, it is only advertised as the active service in response to a characteristic write on one of the other services..
    so then we switch the active service and restart advertising on the ESP32 device) and our config app then connects to the service and does the firmware upgrade process, updates the eeprom on the ESP32 and reboots..

but I cant see the advertised service in Android..

seems to me I can't support Android as an additional platform for our apps. did I miss something? thanks for any help and insigt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions