关于http://code.google.com/p/android-serialport-api/有个可读写串口的API 遇到的问题以及解决办法
来源:互联网 发布:外貌协会 知乎 编辑:程序博客网 时间:2024/06/07 00:52
参考帖子
http://bbs.csdn.net/topics/320267733
我试过在串口终端
chmod 777 /dev/s3c2410_serial0
chmod 777 /dev/s3c2410_serial1
chmod 777 /dev/s3c2410_serial2——Sate210 调试串口,也可以当做普通串口用
chmod 777 /dev/s3c2410_serial3
这样http://code.google.com/p/android-serialport-api/有个可读写串口的API
编译出的串口apk 就可以使用,不会提示you do not hava read/write permission to the serial port
了!
不过重启后,又会提示you do not hava read/write permission to the serial port
只能重新再在串口终端逐一输入
chmod 777 /dev/s3c2410_serial0
chmod 777 /dev/s3c2410_serial1
chmod 777 /dev/s3c2410_serial2——Sate210 调试串口,也可以当做普通串口用
chmod 777 /dev/s3c2410_serial3
不过也有解决办法,就是修改内核在
1·要重新编APK文件
工程copy到NDK的samples中, 修改jni下的SerialPort.c文件
其中一行改为open(path_utf,O_RDWR | O_SYNC); 去掉中间选项
重新编译生成 ***.apk文件, 装载就行啦!
2·要更改权限
在根目录下init.rc文件的最后添加命令,修改serail_uart0 读写权限。保存,重启reboot。
工程copy到NDK的samples中, 修改jni下的SerialPort.c文件
其中一行改为open(path_utf,O_RDWR | O_SYNC); 去掉中间选项
重新编译生成 ***.apk文件, 装载就行啦!
2·要更改权限
在根目录下init.rc文件的最后添加命令,修改serail_uart0 读写权限。保存,重启reboot。
- 关于http://code.google.com/p/android-serialport-api/有个可读写串口的API 遇到的问题以及解决办法
- Android串口的源码(android-serialport-api)
- Android串口操作,简化android-serialport-api的demo
- Android串口操作,简化android-serialport-api的demo
- Android串口操作,简化android-serialport-api的demo
- Android串口操作,简化android-serialport-api的demo
- Android串口操作,简化android-serialport-api的demo的问题
- 关于SDK更新遇到Failed to fetch URL http://dl-ssl.google.com/android refused问题的解决办法
- android http://code.google.com/p/roboguice/
- 基于google项目android-serialport-api的MAT分析
- 仿写android-serialport-api
- Android 基于Google API的串口开发
- Android 串口通讯-------android -serialport-api
- android-serialport-api串口工具测试随笔
- android-serialport-api串口工具测试随笔
- Android串口操作,简化android-serialport-api的demo(附源码)
- Android串口操作,简化android-serialport-api的demo(附源码)
- Android串口操作,简化android-serialport-api的demo(附源码)
- JAVASCRIPT学习笔记(1)
- android异常处理
- Rose 2003 破解版在Win7上的步骤详解
- woj1009 - The Legend of Valiant Emigration
- windows server 2003断开远程之后自动注销用户
- 关于http://code.google.com/p/android-serialport-api/有个可读写串口的API 遇到的问题以及解决办法
- C++ 四种类型转换运算符详解
- javascript入门
- ZOJ 2706 Thermal Death of the Universe 线段树
- ios 中appdelegate的作用
- 集成java与python
- 3.海盗比酒量
- 四种对象的作用域
- Cannot load php5apache2.dll into server Apache is running a threaded MPM,