Android Tutorial Android Serial tutorial

BluSky76

Member
Licensed User
Longtime User
Erel,

does not work. If between a write command and the subsequent enter even a simple log ("x") does not match the consequence that it is impossible to read the answers.

You can create an example of sending two strings based on the response?
 

Felix Maria

Member
Licensed User
Longtime User
Thanks Erel, It did work with AsyncStreams.
And Agraham's lovely Byteconvertor lib also came in handy to convert the bytes to hex as needed.

Your Forum is excellent.
Think of the Doubt and the Solution is already on the forum.

Love B4A!
 

BluSky76

Member
Licensed User
Longtime User
Erel,
sorry but I do not understand.

You can try to send 10 strings of type

1) send
reply

how to stop the program here to read the response and then send.

2) send
reply

etc.
 

BluSky76

Member
Licensed User
Longtime User
Erel,
I have to send a binary file into blocks of 48byte you have a solution?

With FileTrasfer did not succeed.

Thanks
 

BluSky76

Member
Licensed User
Longtime User
Erel,
use

Dim As InputStream in = File.OpenInput (dir, fileName)
countingStream.Initialize (In)

now I can not go on. How to send byte blocks at a constant length using astreams.Write
 

Tommy Green

New Member
Hi,

I am trying to send a 2 digit number to my bluetooth device and it not working properly.

Sub btnSend_Click
If connected Then
TextWriter1.WriteLine(12)
TextWriter1.Flush
End If
End Sub


Its is sending 1 and then 2 instead of 12

Can anyone help me?
 

agus mulyana

Member
Licensed User
Longtime User
Hi Erel,

I still got an error, when I try to read serial data from arduino uno via Bluetooth, my device is freeze, i use LG Mobile Phone, what should i do ? ( I use an arduino Uno, Bluetooth HC-05/HC-06 )



How can I solve it?

thanks you
 

StillLearning

Member
Licensed User
Longtime User
Is there a way to make the choose list only be populated with HID or SPP devices?

Like a list of serial or keyboard devices?

I would prefer just SPP devices if possible, but I think I read that that is not possible

Thank You
 

luciano deri

Active Member
Licensed User
Longtime User
Hy, with this method can i connect a barcode scanner bluetooth? Can i read the flow of chars on port by scanner before view in a edit text?
Thanks
 

luciano deri

Active Member
Licensed User
Longtime User
It depends on the scanner. If it supports the SPP profile then you can connect to it and read the data.
Yes, Motorola CS3070 support it, could give me an example for understand right? In the test that i have done with Serial Example i had finded some difficult.
The problem is here
B4X:
Sub Timer1_Tick
    If connected Then
        If TextReader1.Ready Then 'check if there is any data waiting to be read
' the Up is blocked in this line after scanned barcode!
            txtLog.Text = TextReader1.ReadLine
          
        End If
    End If
End Sub
 
Last edited:

Similar Threads

  • Locked
  • Article
Android Tutorial Android JSON tutorial
Replies
90
Views
159K
  • Locked
  • Article
Android Tutorial SQL tutorial
Replies
161
Views
278K
  • Locked
  • Article
Android Tutorial GPS tutorial
Replies
310
Views
255K
Cookies are required to use this site. You must accept them to continue using the site. Learn more…