Coder Social home page Coder Social logo

Comments (10)

danilocatalanoapsystem avatar danilocatalanoapsystem commented on June 30, 2024

I have the same problem too

from bluetooth_print.

danilocatalanoapsystem avatar danilocatalanoapsystem commented on June 30, 2024

I managed to solve the problem. I had changed an image. In my opinion the printer memory or bluetooth is unable to receive or store data internally.

from bluetooth_print.

mtaweel avatar mtaweel commented on June 30, 2024

@danilocatalanoapsystem What image? Can you please elaborate more, i'm running the example app. When I search for the printer, I found it, but when I click on connect, it connects for 1 sec and then disconnects throwing the above Exception. I don't print anything yet. It just disconnects directly after connect

from bluetooth_print.

jboffog avatar jboffog commented on June 30, 2024

same problem here:

D/BluetoothPrintPlugin(25057): start scan
D/BluetoothAdapter(25057): isLeEnabled(): ON
D/BluetoothLeScanner(25057): onScannerRegistered() - status=0 scannerId=10 mScannerId=0
D/BluetoothSocket(25057): mRstricteState = false
D/BluetoothAdapter(25057): isLeEnabled(): ON
D/BluetoothSocket(25057): startRecord connect mPfd = {ParcelFileDescriptor: java.io.FileDescriptor@3de5e6e}fd = 132
E/DeviceConnFactoryManager(25057): ******************* wait read
D/BluetoothSocket(25057): close() this: android.bluetooth.BluetoothSocket@c4bb3a5, channel: 6, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@395f37a, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@164072b, mSocket: android.net.LocalSocket@8085788 impl:android.net.LocalSocketImpl@168e521 fd:java.io.FileDescriptor@3de5e6e, mSocketState: CONNECTED
D/BluetoothSocket(25057): removeChangeCallback
D/BluetoothSocket(25057): startRecord close mPfd = {ParcelFileDescriptor: java.io.FileDescriptor@3de5e6e}fd = 132
W/System.err(25057): java.io.IOException: bt socket closed, read return: -1
W/System.err(25057): 	at android.bluetooth.BluetoothSocket.read(BluetoothSocket.java:620)
W/System.err(25057): 	at android.bluetooth.BluetoothInputStream.read(BluetoothInputStream.java:91)
W/System.err(25057): 	at java.io.InputStream.read(InputStream.java:205)
W/System.err(25057): 	at com.gprinter.io.BluetoothPort.readData(BluetoothPort.java:130)
D/BluetoothSocket(25057): close() this: android.bluetooth.BluetoothSocket@c4bb3a5, channel: 6, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@395f37a, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@164072b, mSocket: null, mSocketState: CLOSED
W/System.err(25057): 	at com.example.bluetooth_print.DeviceConnFactoryManager.readDataImmediately(DeviceConnFactoryManager.java:308)
D/BluetoothSocket(25057): close() this: android.bluetooth.BluetoothSocket@c4bb3a5, channel: 6, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@395f37a, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@164072b, mSocket: null, mSocketState: CLOSED
W/System.err(25057): 	at com.example.bluetooth_print.DeviceConnFactoryManager$PrinterReader.run(DeviceConnFactoryManager.java:387)
E/BluetoothPort(25057): connection device is lost
E/DeviceConnFactoryManager(25057): ******************* read 0

from bluetooth_print.

biloo-dev avatar biloo-dev commented on June 30, 2024

Is there any update on this issue?
I have the same problem with the pin code??
Please let us know if it has been resolved. Thanks!

from bluetooth_print.

ebecenek avatar ebecenek commented on June 30, 2024

I am trying to solve the same problem. I can list and select the printer but when I tap connect, it's connecting but immediatly after connection breaks. I'm using a Zebra printer with an Android 12 tablet.

I would appriciate any help.

D/BluetoothPrintPlugin( 4207): stateStreamHandler, current action: android.bluetooth.device.action.ACL_CONNECTED I/flutter ( 4207): ******************* cur device status: 1 E/DeviceConnFactoryManager( 4207): ******************* wait read D/BluetoothSocket( 4207): close() this: android.bluetooth.BluetoothSocket@43cb4e9, channel: 1, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@22e356e, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@308740fmSocket: android.net.LocalSocket@902c9c impl:android.net.LocalSocketImpl@7a2b6a5 fd:java.io.FileDescriptor@c8c3a7a, mSocketState: CONNECTED W/System.err( 4207): java.io.IOException: bt socket closed, read return: -1 D/BluetoothSocket( 4207): close() this: android.bluetooth.BluetoothSocket@43cb4e9, channel: 1, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@22e356e, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@308740fmSocket: null, mSocketState: CLOSED W/System.err( 4207): at android.bluetooth.BluetoothSocket.read(BluetoothSocket.java:751) D/BluetoothSocket( 4207): close() this: android.bluetooth.BluetoothSocket@43cb4e9, channel: 1, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@22e356e, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@308740fmSocket: null, mSocketState: CLOSED W/System.err( 4207): at android.bluetooth.BluetoothInputStream.read(BluetoothInputStream.java:91) W/System.err( 4207): at java.io.InputStream.read(InputStream.java:101) W/System.err( 4207): at com.gprinter.io.BluetoothPort.readData(BluetoothPort.java:130) W/System.err( 4207): at com.example.bluetooth_print.DeviceConnFactoryManager.readDataImmediately(DeviceConnFactoryManager.java:308) W/System.err( 4207): at com.example.bluetooth_print.DeviceConnFactoryManager$PrinterReader.run(DeviceConnFactoryManager.java:387) E/BluetoothPort( 4207): connection device is lost

from bluetooth_print.

AmanBhangre avatar AmanBhangre commented on June 30, 2024

I am facing the same issue. Any updates would help.

from bluetooth_print.

krunalagrawal avatar krunalagrawal commented on June 30, 2024

I am also facing this issue in old Android version. Printer connected for 1 sec and then disconnected.

from bluetooth_print.

AmanBhangre avatar AmanBhangre commented on June 30, 2024

I am also facing this issue in old Android version. Printer connected for 1 sec and then disconnected.

For me, the device was supporting V2 Bluetooth for android but the package is only supporting V4. I switched to this package named flutter_blue_plus package and it worked for me

from bluetooth_print.

DedeSnrwn13 avatar DedeSnrwn13 commented on June 30, 2024

I am also facing this issue in old Android version. Printer connected for 1 sec and then disconnected.

Yes, same here

from bluetooth_print.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.