Skip to content

Android things using UART on Intel Edison #1

@avirup171

Description

@avirup171

Hi,
The sample was tried using an Intel Edison but it seems not to work at all.

image

The data you are seeing is not sent by me.

The code for transferUartData() is mentioned below

private void transferUartData() {
        if (mLoopbackDevice != null) {
            // Loop until there is no more data in the RX buffer.
            try {
                //Log.e(TAG, "Reading1");
                byte[] buffer = new byte[CHUNK_SIZE];
                mLoopbackDevice.write(buffer, 45);
                int read;
                while ((read = mLoopbackDevice.read(buffer, buffer.length))!=0) {
                    mLoopbackDevice.write(buffer, read);
                    Log.e(TAG, String.valueOf(read));
                }
            } catch (IOException e) {
                Log.w(TAG, "Unable to transfer data over UART", e);
            }
        }
    }

And I am not sending anything through the cable.

If possible, guide me to implement the same thing on an Intel Edison on an Arduino breakout board. Do I need to do any extra steps for the UART or anything will be helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions