android测试rs232,Android的RS232通讯

I am new in USB communication in Android and I want to communicate my android phone with an rs232 device. Firstly , i have an OTG cable an and USB to RS232 converter (model : Digitus USB to serial adaptor).

Now, i try to communicate my computer and my android phone using these cables. My first question is, Is that way correct or should i use another thing such as ardunio between android phone with my computer?

In my code , i defined my android phone an usb host and i send data from my computer's rs232 port but i never get any data in android phone. In this sutiation ,should my android phone be an usb host device like i do?

Note : My android phone is Samsung Note 2.

I know, My english is not good sorry for this.If you don't understood the problem i can write detail.

解决方案

You want to connect your Note 2 with your computer? So why dont you do this with adb?

Add internet-permission to your app, activate port forwarding on your pc and create a tcp socket.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值