设为首页收藏本站
查看: 19252|回复: 0

[FAQ] Android系统上如何使用UART串口

[复制链接]

231

主题

64

回帖

2145

积分

管理员

积分
2145
玉米糊 发表于 2014-12-17 17:53:51 | 显示全部楼层 |阅读模式
请参考谷歌说明:https://code.google.com/p/android-serialport-api/wiki/android_to_rs232_guideline。因为在国内上谷歌可能不太方便,所以如下直接把原文复制出来:

Introduction
Here is a page describing the different ways you could use to connect an Android device to an RS232 peripheral.

Solutions
sk_suBCzayQFh1cy-2a94GQ.png

Solution 1
  • pros
    • No need for external API, the Android SDK provides the class BluetoothSocket
    • No need for hardware modifications
    • hardware flow control is supported
  • cons
    • Bluetooth consume battery
    • high latency
    • low bandwidth
  • API


Solution 2
  • pros
    • USB to RS232 adapters are cheap and easy to find
    • no hardware modification needed
    • no external battery needed
    • low latency
    • high bandwidth
  • cons
    • your Android device needs an USB host connector (most tablets have one, but phones usually don't)
    • your may need to root your device in order to change /dev/ttyUSB0 file permission, and to load a kernel module.
  • API
    • android-serialport-api

Solution 3
Solution 4
  • pros
    • compatible with any Android device with an USB slave connector, i.e. 99.9% of the Android devices.
    • no need to root your phone
    • low latency
    • high bandwidth
    • you may use other GPIOs of the microcontroller at the same time
  • cons

  • API



回复

使用道具 举报

您需要登录后才可以回帖 登录

本版积分规则

Archiver|手机版|小黑屋|米尔科技论坛   

GMT+8, 2024-4-20 12:19 , Processed in 0.056999 second(s), 26 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表