I'm having another issue where when I change scan ...
# juul-libraries
g
I'm having another issue where when I change scan filter=null I can get serviceUuid show like the screenshot, But actually the serviceUuid is "000000F4-0000-1000-8000-00805F9B34FB" than "000000FF-0000-1000-8000-00805F9B34FB".
t
It appears your peripheral is advertising
000000FF-0000-1000-8000-00805F9B34FB
service, so that is the UUID you should use for the
Scanner
service filter.
Copy code
Scanner {
    filters {
        match {
            services = listOf(uuidFrom("000000FF-0000-1000-8000-00805F9B34FB"))
        }
    }
}
The actual peripheral services/characteristic UUIDs may differ from what are advertised. You can examine the the service/characteristic UUIDs that are available (after connecting) using nRF Connect.
g
I use LBE tools to test, serviceUuid is "000000F4-0000-1000-8000-00805F9B34FB"
t
That looks like a service & associated characteristic that you can transfer data with (read, write or observe) once you've connected. 👍
g
Thanks, When I add filters like as below
Copy code
filters {
    Filter.Service(SERVICE_UUID)
    Filter.Name.Prefix("H03_")
}
I scan many devices that prefix is not H03_
t
Filters can be combined via either
AND
or
OR
logic:
Copy code
filters {
    match {
        filter1
        AND
        filter2
        AND
        filterN
        ..
    }
    OR
    match {
        filter1
        AND
        filter2
        AND
        filterN
        ..
    }
}
For your specific example, you could do either of the following:
Copy code
filters {
    match {
        services = listOf(SERVICE_UUID)
        // AND
        name = Filter.Name.Prefix("H03_")
    }
}
Copy code
filters {
    match {
        services = listOf(SERVICE_UUID)
    }
    // OR
    match {
        name = Filter.Name.Prefix("H03_")
    }
}
g
Yes thanks very much
👍 1