Hello,
I would like to integrate a Zebra ZD411 printer into my React Native Android application.
I am developing on macOS, but the application runs on an Android device.
I am using the Android SDK correctly, but when I try to send a print command to the printer, here is the error."
bt_upio : upio_set : open(/proc/bluetooth/sleep/btwrite) for write failed: Permission denied (13)
The following permissions are in my AndroidManifest:".
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
When I try to start a print with the mobile application 'Printer Setup,' it works.
However, printing was working on another Zebra model with the same sdk. (Unfortunately, I no longer have the number of the old model).
Thank you
3 Replies
Starting from Android 6.0 (API level 23), an app must request the user to approve the ACCESS_FINE_LOCATION permission explicitly. See this article for more details - Link-OS SDK for Android | Permissions and Bluetooth API
Thank you for the response. I did the explicit request about permissions, but the issue persists.
The printer model that didn't have this problem is the ZD510. Is there any difference between both ?
Assuming you are trying to write to the Bluetooth Classic connection. Does your ZD411 printer have Bluetooth Classic or is Bluetooth Classic on the ZD411 enabled? You can use the Bluetooth SGD (or use the Zebra Setup Utility app) to check the ZD411's Bluetooth configuration. Make sure the bluetooth.le.controller_mode is set as either both or classic. If the Choices only has the le option for the bluetooth.le.controller_mode, it means the ZD411 you have only has Bluetooth Low Energy and does not have Bluetooth Classic.