Android Question Connect Leica DISTO via Bluetooth SPP

Discussion in 'Android Questions' started by Steini1980, Apr 21, 2015.

  1. Steini1980

    Steini1980 Member Licensed User

    Hi, I'm trying to communigate via Bluetooth Serial with a Leica DISTO. Pairing and receiving data from DISTO works fine, but I get an Error on DISTO after sending data via Bluetooth. It seems the DISTO is waiting for a response from Android Device for 2 Seconds else it throws Error 240, see

    But how can I confirm the data as successfully received?
    I can't find any further instruction. I found some documentation about other Bluetooth devices and tried sending "?<CRLF>", "a<CRLF>" and some other chars, but I get always the error after receiving data.

    Has somebody an Idea or experience with DISTO or other Bluetooth devices?
    May be I can use something like a Bluetooth sniffer (like whireshark, but I didn't have experience) to find out, which confirmation code is send by the original Leica app?
  2. Erel

    Erel Administrator Staff Member Licensed User

    First make sure that you are not using prefix mode.

    Are you handling AsyncStreams_NewData?
  3. Steini1980

    Steini1980 Member Licensed User

  4. Steini1980

    Steini1980 Member Licensed User

    No, I'm using just this serial tutorial.

    Here's what I have tried to confirm the received data:

    Sub Timer1_Tick
    If connected Then
    If TextReader1.Ready Then 'check if there is any data waiting to be read
              Dim text As String = TextReader1.ReadLine
                txtLog.text = txtLog.text & text & 
                txtLog.SelectionStart = txtLog.text.Length
    If text.StartsWith("@") = False Then
    "?" & CRLF)
    End If
    End If
    End If
    End Sub
    The Response on DISTO Display is Error 240 and App response is: "@E203".

    If I search "@E203" on Google I can't found any information from Leica, but some other manuals of Bluetooth devices and "@E203" is always

    I seems the Error Message is standardised so I think the syntax should also used in other devices. But everything I replied, it's the same Error.

    P.S.: This documentation looks like very similar.
    Last edited: Apr 22, 2015
  5. Steini1980

    Steini1980 Member Licensed User

    Solved: I just have to respond CRLF

    DonManfred likes this.
  6. Erel

    Erel Administrator Staff Member Licensed User

    You shouldn't use TextReader / TextWriter with a serial connection. It will not work reliably and eventually hang the whole app.
  7. Steini1980

    Steini1980 Member Licensed User

    OK, I will change it.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice