Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beacons sample transmits but doesn't scan on my phones. #161

Closed
macgibbon opened this issue Feb 19, 2023 · 5 comments
Closed

Beacons sample transmits but doesn't scan on my phones. #161

macgibbon opened this issue Feb 19, 2023 · 5 comments

Comments

@macgibbon
Copy link

I am seeing the same behavior on Android and Iphone. Would it be possible to provide release bundles as was done on [hello gluon ci project] (https://github.com/gluonhq/hello-gluon-ci/releases/tag/0.0.1)?

That would make it easier to distinguish between changes in hardware vs the development tools.

@macgibbon
Copy link
Author

I suspect additional permissions are required, in particular, android.permission.BLUETOOTH_SCAN.

@macgibbon
Copy link
Author

com.gluonhq.samples.beacons          I  BluetoothAdapter() : com.gluonhq.samples.beacons
2023-03-06 12:55:40.403 16426-16465 BluetoothAdapter        com.gluonhq.samples.beacons          I  STATE_ON
2023-03-06 12:55:40.807  1211-3911  vendor.qti...bs_handler and...are.bluetooth@1.0-service-qti  I  ProcessIbsCmd: Received IBS_WAKE_IND: 0xFD
2023-03-06 12:55:40.807  1211-3911  vendor.qti...bs_handler and...are.bluetooth@1.0-service-qti  D  SerialClockVote: vote for UART CLK ON
2023-03-06 12:55:40.808  1211-3911  vendor.qti...-wake_lock and...are.bluetooth@1.0-service-qti  D  Acquire wakelock is acquired 
2023-03-06 12:55:40.808  1211-3911  vendor.qti...bs_handler and...are.bluetooth@1.0-service-qti  I  ProcessIbsCmd: Writing IBS_WAKE_ACK
2023-03-06 12:55:40.888  1211-3911  vendor.qti...bs_handler and...are.bluetooth@1.0-service-qti  I  ProcessIbsCmd: Received IBS_SLEEP_IND: 0xFE
2023-03-06 12:55:40.888  1211-3911  vendor.qti...bs_handler and...are.bluetooth@1.0-service-qti  D  SerialClockVote: vote for UART CLK OFF
2023-03-06 12:55:41.039  1211-3531  vendor.qti...-wake_lock and...are.bluetooth@1.0-service-qti  D  Release wakelock is released 
2023-03-06 12:55:41.299 16426-16465 BluetoothAdapter        com.gluonhq.samples.beacons          I  STATE_ON
2023-03-06 12:55:41.299 16426-16465 BluetoothAdapter        com.gluonhq.samples.beacons          I  STATE_ON
2023-03-06 12:55:41.300 16426-16465 BluetoothAdapter        com.gluonhq.samples.beacons          I  STATE_ON
2023-03-06 12:55:41.301 16426-16465 BluetoothLeScanner      com.gluonhq.samples.beacons          D  Start Scan with callback
2023-03-06 12:55:42.657  1211-3911  vendor.qti...bs_handler and...are.bluetooth@1.0-service-qti  I  ProcessIbsCmd: Received IBS_WAKE_IND: 0xFD
2023-03-06 12:55:42.657  1211-3911  vendor.qti...bs_handler and...are.bluetooth@1.0-service-qti  D  SerialClockVote: vote for UART CLK ON
2023-03-06 12:55:42.658  1211-3911  vendor.qti...-wake_lock and...are.bluetooth@1.0-service-qti  D  Acquire wakelock is acquired 
2023-03-06 12:55:42.658  1211-3911  vendor.qti...bs_handler and...are.bluetooth@1.0-service-qti  I  ProcessIbsCmd: Writing IBS_WAKE_ACK
2023-03-06 12:55:42.742  1211-3911  vendor.qti...bs_handler and...are.bluetooth@1.0-service-qti  I  ProcessIbsCmd: Received IBS_SLEEP_IND: 0xFE
2023-03-06 12:55:42.743  1211-3911  vendor.qti...bs_handler and...are.bluetooth@1.0-service-qti  D  SerialClockVote: vote for UART CLK OFF
2023-03-06 12:55:42.893  1211-3531  vendor.qti...-wake_lock and...are.bluetooth@1.0-service-qti  D  Release wakelock is released 
**2023-03-06 12:55:43.368 16426-16465 samples.beacons         com.gluonhq.samples.beacons          A  java_vm_ext.cc:594] JNI DETECTED ERROR IN APPLICATION: JNI CallVoidMethod called with pending exception java.lang.SecurityException: Need android.permission.BLUETOOTH_SCAN permission for AttributionSource { uid = 10461, packageName = com.gluonhq.samples.beacons, attributionTag = null, token = android.os.BinderProxy@7b658ed, next = null }: GattService registerScanner
                                                                                                    java_vm_ext.cc:594] (Throwable with no stack trace)
                                                                                                    java_vm_ext.cc:594] 
                                                                                                    java_vm_ext.cc:594]     in call to CallVoidMethod**
2023-03-06 12:55:44.504  1211-3911  vendor.qti...bs_handler and...are.bluetooth@1.0-service-qti  I  ProcessIbsCmd: Received IBS_WAKE_IND: 0xFD
2023-03-06 12:55:44.504  1211-3911  vendor.qti...bs_handler and...are.bluetooth@1.0-service-qti  D  SerialClockVote: vote for UART CLK ON

@macgibbon
Copy link
Author

Pull request at gluonhq/attach#351

@jperedadnr
Copy link
Contributor

@macgibbon Attach 4.0.18-SNAPSHOT has a possible fix for this issue (based on your PR). Can you test it adding:

<repositories>
        <repository>
            <id>Snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </repository>
    </repositories>

to your pom?

@macgibbon
Copy link
Author

This has been fixed, Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants