ARM9 eCos
硬件文档,固件源码和bin文件网站:http://sourceforge.net/projects/rovio/files/
http://deviceguru.com/mobile-robot-packs-wireless-web-cam/
eCos整个固件 git clone 地址:https://github.com/LucidOne/Rovio.git 要求ads1.2下面编译。
ads1.2目前看来,只能在win下面进行编译了。有一个编译配置文件hta格式的。linux下面不认识这个。
win7下面 安装ads1.2
打开hta文件,进行编译配置。
导入Rovio整个目录源码。结论:使用hta自动build之后,在ads界面中会自动出现这些目录源码的结构。
重点寻找http接口对应的机器人实体操作。http初始化时,注册了很多了urls。响应客户端过来的http请求。
寻找web服务器的前端代码。js目录:./Host/LibCamera/Res/Flash_Koitech/lib/rovio.js 。要求安装quicktime和VLC。这些java代码最终也是要跑到浏览器上运行的。
寻找web服务器的后端代码。后台要注册url服务。
研究自主导航的代码。
以okNetwork函数为例:
定义位置在: ./Host/LibCamera/Res/Flash_Koitech/lib/rovio.js:function okNetwork(){ ... }
前台代码中有调用该函数:./Host/LibCamera/Res/Flash_Koitech/index.htm <input type="button" value="OK" onclick="okNetwork()" style="margin-left: 125px; width: 60px;" />
networks_password 变量是在页面html中定义的变量。在响应函数中使用的时候,直接使用$('networks_password')来获取值。
响应函数引用变量:./Host/LibCamera/Res/Flash_Koitech/lib/rovio.js: $('networks_password').style.display = 'block';
变量定义,从页面中获取值:./Host/LibCamera/Res/Flash_Koitech/index.htm: <div id="networks_password" style="padding-bottom: 10px;">
再举例SaveHome和Home两个按钮的功能。一个是保存home路径,checkSaveHome; 一个是go back home.checkDock;
定义位于:./Host/LibCamera/Res/Flash_Koitech/lib/rovio.js:function checkDock(){ ...}----->goDock
下面再看goDock的定义:
function goDock(){
going_home = 1;
sendCommand("rev.cgi","Cmd=nav&action=13");
$('status').innerHTML = 'Going Home';
}
原来,这里是通过sendCommand进行gci接口的传递的。然后通过manualRequest调用xhr.open xhr.send完成接口调用。
全局变量定义:
var xhr = new Array();
var xhrRtn = new Array();
var status_xhr = new Array();
var status_xhrRtn = new Array();
var cur_xhr = 0;
var cur_status_xhr = 0;
变量初始化:
function createXMLRequestObjs(){
var t = 0;
for(t = 0; t < MAX_REQUESTS; t++){
xhr[t] = createXMLRequestObj();
xhrRtn[t] = null;
}
for(t = 0; t < MAX_REQUESTS; t++){
status_xhr[t] = createXMLRequestObj();
status_xhrRtn[t] = null;
}
}
function createXMLRequestObj(){
var xmlReqObj = null;
if (xmlReqObj == null){
try {xmlReqObj = new XMLHttpRequest();}
catch (e) {xmlReqObj = null;}
}
if (xmlReqObj == null){
try {xmlReqObj = new ActiveXObject("Msxml2.XMLHTTP");}
catch (e) {xmlReqObj = null;}
}
if (xmlReqObj == null){
try {xmlReqObj = new ActiveXObject("Microsoft.XMLHTTP");}
catch (e) {xmlReqObj = null;}
}
return xmlReqObj;
}
可见,命令传递的关键,还通过了xhr数组的方法。而数组元素的类型各不相同:new XMLHttpRequest();} 或 new ActiveXObject("Msxml2.XMLHTTP");}
最后才是使用发送到服务器的地方。关键就看初始化是由谁调用的了。
初始化过程是这样的:function init()--->createXMLRequestObjs
index页面body的第一个函数即是onload="init()";
置于http服务器的内容,还有继续分析后台工作情况了。
讨论http server的帖子:http://www.robocommunity.com/forum/thread/14445/Rovio-background-hardware-and-software/?page=3#reply
I don't think you've missed something.
For what I've seen so far, all the .cgi URl that can be found are registered in LibIPCamera.c (using httpRegisterEmbedFunEx). If you take the API specification v1.3, you can deduce that all the commands registered at the URL Rev.cgi (moving the robot, going back home) are missing from this file.
Those functionalities are registered in libhttp.a (in httpdStartEx3).
The source code of libhttp.a isn't provided because it contains information about libNS.a which is not opensource. (At the same time, it uses a modified version of the boa web server http://www.boa.org/ which is under GPL, so I think its sources should be provided, Host\libhttp\Inc\boa.h)
So i think you have to reverse engineering those libraries to have access to the most interesting part of the Rovio.
You can already have a clue on what are the names of the functions inside the libraries using the static call graph Host\LibCamera\Samples\CameraTest\Bin\CameraTest.htm (libNS.a contains er_ns_nav.o and libhttp.a a lot of objects, look at the headers)
If you find an easier solution, tell me ;)
其他地址:http://www.robocommunity.com/download/17502/Rovio-eCos-Code/
内置web server DynDNS
ads1.2下载地址:http://blog.youkuaiyun.com/nie_feilong/article/details/5407530
http://www.iheartrobotics.com/
http://www.willowgarage.com/blog/2010/11/08/happy-3rd-anniversary-ros
http://code.google.com/p/brown-ros-pkg/
http://hri.willowgarage.com/sounds/
http://www.ros.org/news/2010/08/i-heart-robotics-vision-for-robotics-tutorials.html
http://www.adafruit.com/blog/2012/04/12/i-heart-robotics-new-packaging/
PC二次开发接口:http://www.cnblogs.com/freedomshe/archive/2013/06/10/Rovio_API_for_ROS_Groovy.html
稳定固件版本:http://www.robocommunity.com/download/17181/Rovio-Firmware-v.5.03-stable/
拆解分析:http://www.csksoft.net/blog/post/289.html http://www.csksoft.net/blog/post/289.html这里也有很多资料链接
固件源码:http://www.robocommunity.com/download/17502/Rovio-eCos-Code/
PCB的正面可以看到使用的ARM芯片以及后面的WIFI模块,反面有一块声卡的DAC芯片以及ROM。这部分的电路对于希望修改rovio的人来说意义不大。因为Rovio的代码并没有公开。可以考虑将其用其他控制器替换。
图中的ARM芯片型号有误,应为:(由gzhuli指正)
CPU是Winbond的W99702,不是PXA270,下面的W99100DG不是ROM而是51核单片机,控制W99702 ISP时序的,进入ISP模式时(先插USB再上电就进入ISP模式)通过一个模拟开关切换接管USB口。
rovio driver for ros源码:https://github.com/LucidOne/iheart-ros-pkg
电路图: http://see.sl088.com/wiki/Rovio_主板/电路图
上层软件开发:http://newbot.cn/ rovio driver app应用开发。
ROS:
rovio: rovio_av | rovio_ctrl | rovio_shared
Control and Query the Audio/Video Devices on a WowWee Rovio git https://github.com/WPI-RAIL/rovio.git
Control and Query the Movement Devices on a WowWee Rovio
Standard Messages and Services for the WowWee Rovio
Inside the Rovio is a NorthStar (TrueTrack (tm)) detector to locate the robot in a room relative to a beacon. It is a separate module with its own Digital Signal Processor brain. It connects to the main CPU using a serial port.
Read more about NorthStar here: http://www.evolution.com/products/northstar/
The webcam camera is an OV7670 (although the firmware can handle other models). http://www.ovt.com/products/part_detail.asp?id=53
The audio codec and speaker driver is a WM8976 http://pdf1.alldatasheet.com/dat ... WOLFSON/WM8976.html
A 8051uC (WinBond W99100DG) appears to provide some periheral control. Details are sketchy.
本文详细介绍了Rovio机器人的开发资源,包括硬件文档、固件源码和bin文件的获取途径,强调了eCos固件在Windows环境下使用ADS1.2编译的过程。探讨了Rovio的HTTP接口、前端JS代码和后端服务,特别是如何通过XMLHttpRequest对象进行命令传递。同时,文章提到了Rovio的ROS驱动和二次开发接口,并分享了相关链接资源,如DynDNS和内置Web服务器的分析。
5666

被折叠的 条评论
为什么被折叠?



