G GaNdAlF89 Active Member Licensed User Longtime User Feb 26, 2015 #1 Hi, I want to read data from a barcode reader device. The barcode reader is correctly connected with a serial object. After this connection I do this: B4X: AStreamReader.Initialize(BTSerialReader.InputStream,Null,"BTAStreamReader") but nothing happens when I read a barcode: neither BTAStreamReader_NewData nor BTAStreamReader_Error event is raised. Where is the problem? Thanks
Hi, I want to read data from a barcode reader device. The barcode reader is correctly connected with a serial object. After this connection I do this: B4X: AStreamReader.Initialize(BTSerialReader.InputStream,Null,"BTAStreamReader") but nothing happens when I read a barcode: neither BTAStreamReader_NewData nor BTAStreamReader_Error event is raised. Where is the problem? Thanks
Erel B4X founder Staff member Licensed User Longtime User Feb 27, 2015 #2 Make sure to also handle the Terminated event. If NewData is not raised then the barcode is not sending anything. This code is not in a static code module, right? Upvote 0
Make sure to also handle the Terminated event. If NewData is not raised then the barcode is not sending anything. This code is not in a static code module, right?
G GaNdAlF89 Active Member Licensed User Longtime User Feb 27, 2015 #3 Erel said: Make sure to also handle the Terminated event. Click to expand... When this event will be raised? I added the Terminated event, but there is no difference, it doesn't work.. Erel said: This code is not in a static code module, right? Click to expand... Yes, the code is in an activity module Last edited: Feb 27, 2015 Upvote 0
Erel said: Make sure to also handle the Terminated event. Click to expand... When this event will be raised? I added the Terminated event, but there is no difference, it doesn't work.. Erel said: This code is not in a static code module, right? Click to expand... Yes, the code is in an activity module
Erel B4X founder Staff member Licensed User Longtime User Mar 1, 2015 #4 GaNdAlF89 said: When this event will be raised? Click to expand... It is raised when the connection is terminated. Upvote 0
GaNdAlF89 said: When this event will be raised? Click to expand... It is raised when the connection is terminated.
G GaNdAlF89 Active Member Licensed User Longtime User Mar 19, 2015 #5 No event is raised, but the connection is established. I tried also with AsyncStreamsText but I have the same problem. Why? Edit: If I set the focus in an editText, the text is written. Upvote 0
No event is raised, but the connection is established. I tried also with AsyncStreamsText but I have the same problem. Why? Edit: If I set the focus in an editText, the text is written.
Erel B4X founder Staff member Licensed User Longtime User Mar 19, 2015 #6 GaNdAlF89 said: Edit: If I set the focus in an editText, the text is written. Click to expand... Your barcode scanner is acting as an alternative keyboard. It is probably not sending any data through the SPP channel. Upvote 0
GaNdAlF89 said: Edit: If I set the focus in an editText, the text is written. Click to expand... Your barcode scanner is acting as an alternative keyboard. It is probably not sending any data through the SPP channel.
G GaNdAlF89 Active Member Licensed User Longtime User Mar 19, 2015 #7 Erel said: Your barcode scanner is acting as an alternative keyboard. It is probably not sending any data through the SPP channel. Click to expand... I set it in SPP mode with its manual, reading a qrcode in particular. In this manual there is no other to do for SPP connection. What do you think I have to do to fix it? Thanks Upvote 0
Erel said: Your barcode scanner is acting as an alternative keyboard. It is probably not sending any data through the SPP channel. Click to expand... I set it in SPP mode with its manual, reading a qrcode in particular. In this manual there is no other to do for SPP connection. What do you think I have to do to fix it? Thanks
Erel B4X founder Staff member Licensed User Longtime User Mar 20, 2015 #8 Not sure. Assuming that you are handling the event correctly then the barcode isn't sending any data. Upvote 0
Not sure. Assuming that you are handling the event correctly then the barcode isn't sending any data.