Power Cord
ADB Debugging
Serial Cable/Jump Cap
youyeetooRJ Development Board
Use DuPont wires to connect on the 30-pin connector.
The youyeetooRJ development board provides 5 UARTs for customer use. UART2 is used as the debug port, and the others are registered as ttyS3, ttyS4, ttyS8, and ttyS9 respectively. Please refer to the schematic diagram for the corresponding hardware locations.

This section uses UART1 as an example; users can refer to it to use other serial ports. **
# Switch Administrator User
su
# View Device UART Nodes
ls /dev/ttyS*
# View Serial Port Information
stty -F /dev/ttyS3
# Set Serial Port Baud Rate to 115200
stty -F /dev/ttyS3 speed 115200
# Set Serial Port to 8 Data Bits, No Parity, 1 Stop Bit, No Echo
stty -F /dev/ttyS3 cs8 -parenb -cstopb -echo
# Receive Data in the Background
cat /dev/ttyS3 &
# Send Data in the Foreground
echo -e "1234567890\n" > /dev/ttyS3
First, create the app according to the app creation section. Key code is provided here for customer verification. A compiled app will be provided.
Download materials, click to jump

package com.youyeetoo.uart
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Refresh
import androidx.compose.material3.Button
import androidx.compose.material3.Checkbox
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateListOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.unit.dp
import com.youyeetoo.uart.ui.theme.UartTheme
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
class MainActivity : ComponentActivity() {
private val helper = SerialPortHelper()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
UartTheme {
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
SerialScreen(
modifier = Modifier.padding(innerPadding),
helper = helper
)
}
}
}
}
override fun onDestroy() {
super.onDestroy()
helper.release()
}
}
@Composable
fun SerialScreen(modifier: Modifier = Modifier, helper: SerialPortHelper) {
val uiScope = rememberCoroutineScope()
var path by remember { mutableStateOf("/dev/ttyS3") }
var baud by remember { mutableStateOf("115200") }
var dataBits by remember { mutableStateOf("8") }
var stopBits by remember { mutableStateOf("1") }
var parity by remember { mutableStateOf(Parity.NONE) }
var asHex by remember { mutableStateOf(false) }
var enableRx by remember { mutableStateOf(true) }
var sendText by remember { mutableStateOf("") }
var status by remember { mutableStateOf("not open") }
var opened by remember { mutableStateOf(false) }
val txLogs = remember { mutableStateListOf<String>() }
val rxLogs = remember { mutableStateListOf<String>() }
val scroll = rememberScrollState()
val txScroll = rememberScrollState()
val rxScroll = rememberScrollState()
Column(
modifier = modifier
.fillMaxSize()
.padding(16.dp)
.verticalScroll(scroll),
verticalArrangement = Arrangement.spacedBy(16.dp)
) {
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
OutlinedTextField(
value = path,
onValueChange = { path = it },
label = { Text("Device path (example: /dev/ttyS3)") },
singleLine = true,
modifier = Modifier.fillMaxWidth()
)
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { NumberField("Baud Rate", baud, Modifier.weight(1f)) { baud = it }
NumberField("Data Bits", dataBits, Modifier.weight(1f)) { dataBits = it }