Routerbot v1 FAQ
This FAQ is based on the question I got in my personal blog. To simplify your development process all comments are parsed, turned into questions and answered here.
- Hey if i had a wireless router XXXXX could i use that to send the video and if so how?
- Check this list of compatible hardware. If your router is in the list and is completely supported by OpenWRT Linux Kamikaze 7.06 it can be turned into a routerbot using the approach described on this website. Let me know if this is the case and I will compile the image for your router. Unfortunately for most routers I won’t be able to provide support as I don’t have necessary equipment and time. You will have to figure out many things yourself. In fact even if your router is not in the lsit there is still chance Linux can be ported to it, but this is completely up to you.
- What about installing a webcam (directly connected to router) instead of the wireless pinhole cam?
- Webcam support is provided in Routerbot v2
- How long does the battery last?
- v1 runs at least 30 minutes, v2 4WD only lasts 5-10 minutes on the battery shown. v2 2WD lasts 20 minutes or so. If you need it to work longer consider switching to LiPo batteries of higher capacity.
- I’m curious about the teleportation function seen at 1:13 in the clip, I do not see any documentation in the command:s list.
- Teleportation is made with command “teleport xoffset yoffset”. Unfortunately this function is very unstable so I excluded it from the final release. And I’m still looking for those 15 routerbot prototypes I’ve lost while debugging this function until I found an error in my code – the distance by default was assumed in miles, not inches.
- If I used DD-WRT Firmware, It will be able to get your scripfile?
- Yes you will. v2 is provided both as the complete OS image and a patch file. Apply the patch to your DD-WRT installation and you’re good to go.
- I was wondering if I was able to set my routerbot up so that it does not have to work on the wireless network.
- v2 can work in both STA and AP modes. If you want it to connect to your local wireless network use STA mode. If you want to run it outdoors (or wherever wireless network is not available) configure it to run as an Access Point (AP) and connect to it from any wireless enabled device. Wireless mode in v2 can be changed using the web interface.
- Can you help me with my routerbot-like project
- Absolutely! With a few conditions: a) I cannot guarantee quick responses, sometimes I’m really busy b) you need to have at least basic linux and robotics skills, so I don’t have to explain meaning of such scary words as “servo”, “ttl” and “vi” and c) I cannot spend much time helping you, so most part of your project you still need to do yourself.
- Is there a way to donate a few dollars?
- Sorry, no. I currently do not accept donations.
- I tested the ssc-32 with linxterm, sometime it worked,sometimes not…
- SSC-32 debugging process is described here.
- When I turn the routerbot on the LED on SSC-32 is lit and when I issue a command it goes out …
- This is how it should be. Please refer to SSC-32 documentation.
- I figured out that I have to do a powerrecycle after I edited config.sh, is this correct ?
- you can do that, or, faster, run this command “. ./util.sh” in the routerbot binary folder. This will reload new settings and new functions so you don’t have to reload the router.
- Finished ! It’s Alive…
- May I have a link to the product description and a few photos of your robot? If you need a web space to publish details about your project I can provide it.
- Can you send me the electric plan of the servo’s control board please?
- Sorry, I cannot. I’m using SSC-32 designed and manufactured by LynxMotion, please refer to them.
- I do not understand the data flow in your V2 from web page click to exact data transmit to port…
- Is there any procedure to reflash the “routebot” with the original linksys soft and then reflash with “routebot” software again ?
- Yes, you can absolutely reflash the router back to the Linksys firmware. Here are the details about how to do this (somewhere in the middle of the page). However you do not need to reflash back to original OS in order to reflash the routerbot with the Routerbot OS again, you can do it anytime. For hardware the original OS and the Routerbot OS and any other operating systems like DD-WRT are all the same. The original Linksys operating system is available from the Linksys website, just go to “Downloads” accessible from the topmost menu on Linksys website -> Wireless Routers -> Select your router model WRT54GL -> Select version 1.0 and get zipped .bin
- The serial cord wiring in the photo does not match the text on this page. I found out the hard way by going with the text desription. The text labels for Rx and Tx are reversed.
- The router’s Tx is supposed to go to the SSC-32 Rx and vise verse. One device sends, the other one receives. Don’t forget to put resistors in the line as described in the instructions! Also in v1 you can just skip SSC-32 Tx – it is used in v2 only.
- If I used the GUI to upgrade Firmware from DD-WRT to Your “RouterBot OS” instead of TFTP, Is that work?
- Yes, you can use GUI. But you better get trained to use atftp because after you reflash the router once that fancy GUI will disappear – Routerbot has completely different web interface.
- Should my router be wired to my computer or should this sbe done wirelessly
- You can do either way. If you want to use the robot wired way just connect it to you network using LAN 1 port on the routerbot. This is the only port statically configured to 192.168.1.234
- How do i check my router to find my routerbots IP i know how to get to my router but i am not able to see which ips it leases and to what it leases it to
- Still the best way is to check your DHCP server (which is typically your router) leases. If you somehow managed to get to the routerbot “ip addr” will show you all the network interfaces and their configuration.
- The operating system is compressed in a .sit file and i do not have stuffit expander and would not like to pay for it are you able to email it unzipped?
- The operating system is actually coming as a .bin file, but for some strange reason many Vista users reported that they are getting .sit file instead. If this is your case just rename the .sit file to .bin. Alternatively I’m providing compressed versions of the image, so you can use them. Again, you do not need StuffIt to decompress the file! This is a .bin file, not .sit.
- I’m getting “code pattern is incorrect”, “timeout”, and “invalid password” errors while reflashing the router …
- Code pattern is incorrect appeares when you’re using wrong version of the image. Since I’m providing image for WRT54GL router it won’t work for any other router. Please verify your router model name. Let me know if you’re having a different model and I’ll try to provide you with the right image. “Timeout” occurs when your router isn’t getting the reflash mode. Please follow the instructions carefully and you won’t get this error. “Invalid password” sometimes happens on brand new routers when you’re using particular tftp clients (I saw this message once with Windows tftp reflashing newer routers, but never saw it with Linux atftp while reflashing older routers). In order to get rid of this error please login to the web interface of the router (still running the original Linksys OS) and make admin’s password empty.
- I changed the password on the routerbot and now cannot telnet to it anymore …
- This is how it is supposed to work. Please use way more secure ssh protocol. As an ssh client I can recommend putty available for all major operating systems for free.
- I did something wrong and now want to reflash the router again. But all attempts to reflash router using its new IP 192.168.1.234 fail. I cannot ping 192.168.1.1 either.
- 192.168.1.234 is the IP address router will respond on if you connect to LAN 1 port AND then router is runnting routerbot OS in its original/initial configuration. Use only 192.168.1.1 to reflash the router. And also it is not supposed to answer pings on that IP.
- When I try to edit any file on the routerbot I can’t save the changes and get “readonly filesystem” error.
- The most probable scenario when you get this error is when the router is running in “safe mode”. give it full power cycle (reboot it and let it boot completely, then reboot again) – this could help. If it didn’t then check your router model and version. I had similar problem with a router that had less memory then the flash image was, so after reflash not entire image fitted the memory and the router wasn’t about to boot properly.
- I am using a windows computer and it does not have a built in ssh
- Use putty – it’s free. Also forget about telnet – it is highly insecure. Using telnet is like publishing your passwords in Sunday Washington Post.
- What is the login and password for the routerbot command line?
- Login:root, password:routerbot. You can change it anytime using Linux command “password”
- How do I modify my /etc/config/wireless file so it does what I want?
- Here is a nice piece of documentation for this file and other network configuration related files. Let me also suggest using v2 that has the web interface that generates all those files automagically.
- I don’t know Linux. Can I do this project using Windows?
- Unfortunately the router used for the robot “brains” is not capable of running Windows XP, so you will have to learn a little bit of Linux. The rest (reflashing, programming, controlling) can be done using Windows or MacOS or FreeBSD or any other modern popular operating system.
- I think I have bricked my router …
- Try adding serial interface to the router. This is a great debugging tool that will save you tons of time while developing your routerbot. Most probably you will see some positive output from it and realize that the router is not as bricked as you thought. Even if you bricked it by damaging the bootloader there is a good chance you can recover your router using JTAG adapter.
- How do you power the router with the battery because the transformer on the plug says it outputs 12 vdc and if it can take 9 volts how do you connect it to the router?
- Teh router accepts almost everything between 5V and 12V. In fact they were shipping WRT54GL with 12V adapter some time ago and now it is shipped with 5V 2A adapter.
- Can u tell me how you made the webinterface?
- I used haserl package. The overall control flow (the way commands are getting from the web interface to the servos) is somewhat weird, but I tried to keep the OS image small. The faster approach would be running lighthttpd and php on the router. If you have time and a router with lot’s of RAM – you can try that way. The beauty of the routerbot is that you can program it using almost any programming language you like. C/C++, Java, Shell, Perl and PHP – use whatever you prefer.
- How can I change the web interface design?
- Take a look at /routerbot/v2/www/index.html. You can change it any way you want.
- v1 is using RF wireless camera. How can I use a web camera?
- Use v2 – it has support for IP web cameras.
- “ok I have tried everything and The two engine servos turn at different speeds” or “the robot is not going straight”
- Try adjusting *_STOP parameters for the servos in /routerbot/v2/bin/config.sh file. The value should be around 1500, but it is individual for each servo (even if they have the same model number). If you’re using digital servos try programming them directly.
- What kind of web camera is used in this (v2) version of routerbot?
- The web camera I used is iCamView camera+server. Got one from ebay for $70. I actually do not recommend the camera I used because of it’s really bad performance. iCamView presented new line of cameras on CES 2009. I especially liked the one with two lens – for day and night use. I’d better recommend that one. The refresh rate is also better in the new products from iCamView, but they require 5V @1A, while the old one required only 500mA. So you might need a better battery for v2.
- How the three networking modes are working in v2?
In Access Point mode the routerbot works as a wireless access point. You can connect to it from any computer that has a wireless interface using the SSID and WEP key specified in the parameters (Routerbot/01234567890123456789012345 by default). You computer should be configured to obtain network configuration via DHCP. The router runs a DHCP server in this mode and will assign an IP address in 192.168.1.0 network to your computer. Since your computer is exclusively connected to the routerbot (unless you use two interfaces on the computer) and the routerbot is not connected to your home network you won’t be able to use the internet and the routerbot simultaneously. The advantage of this mode is that you can run routerbot virtually anywhere you want regardless if there is a wifi network available there or not.
In the standalone mode the routerbot connects to your home network. Currently it supports only WEP security, not WPA so far, sorry. You need to specify your home network SSID and wep key. Once you hit reconfigure button the routerbot will reboot and try to connect to your home network. It will also try to obtain an IP address from this network (192.168.2.0 network in your case). Your control computer shoould remain configured as you use it in everyday practice, i.e. it should also obtain network configuration via DHCP from your home router. In this mode both routerbot and your control PC are connected to your home network and you can both access the routerbot and access the internet. The only issue here is what is the routerbot IP in this case. You need to find it out in your home router logs. This is router-specific.
- I think I need to modify those tags for the camera IP. Correction to what I said above, my camera’s IP is 192.168.2.115. How do I connect the camera window of the web interface to that IP ?
- Here is a quick overview of how you can use your camera with the routerbot.
In v2 instead of using Java or ActiveX objects to display the data I decided to capture the entire web camera page. The reason for that is security restrictions in many browsers. So in order to capture image from your web camera you need to
1. Find the URL of the page that is displaying the output from camera. Open your web camera web interface and navigate to the page that displays the actual output from the camera. Then in Firefox right-click on an empty space of that page and select “View Page Info”. In the new dialog window copy the value of “Address:” field.
2. Open /routerbot/v2/www/index.html and find the following piece of code: <div style=”border: 1px solid black; width: 320px; height: 252px; overflow:hidden”><iframe src=”http://routerbotcam/cam1.htm” width=”326″ height=”263″ scrolling=”no” style=”position: relative; border:0px none; top: -11px; left: -5px” id=”view_iframe”></iframe></div>
3. In that piece of code replace “http://routerbotcam/cam1.htm” with the URL of your web camera page you got in step #1.
4. Now when open the routerbot web interface you will see a part of the web page that contains the video you want to embed. Now you need to modify “style” attribute of the “div” tag and “width/height” attributes of the “iframe” tag to make the display area fit your actual video area. Also you need to modify “top/left” parts of “style” attribute of the “iframe” to position iframe exactly on top of the video of your source page. It’s difficult to explain, easier to start playing with the figures. I recommend starting with “left/top” attributes.
That’s it. After you get the correct figures after many experiments you will see the web camera video embedded into the routerbot web interface.
- How the routerbot v2 programs look like?
- You can run the programs using the web interface. You also can save up to 5 different programs to flash. Here is an example of a program that makes the routerbot roam around avoiding obstacles.:
# This program turns the routerbot into an explorer robot. # It roams with speed SPEED until it "sees" an obstacle in # front of him in the distance closer the DISTANCE. Then it # looks for better direction to go (the one w/o obstacles) # and proceeds that direction. # If you plan to increase SPEED please increase DISTANCE too # as distance calculation typically takes 1-2 seconds DISTANCE=6 SPEED=70 look ahead look forward while [ true ]; do sleep 1 stop if [ `get_distance` -gt $DISTANCE ]; then go forward $SPEED else stop look right if [ `get_distance` -gt $DISTANCE ]; then turn right90 look forward go forward $SPEED else look left if [ `get_distance` -gt $DISTANCE ]; then turn left90 look forward go forward $SPEED else turn left180 look forward go forward $SPEED fi fi fi done
As you can see this code is readable by anyone, no advanced programming knowledge is required. You don’t care about PWM, dealing with sensors and stuff like that. If you want robot to flash lights on each turn, just add
camera_lights_on;sleep 1;camera_lights_off anywhere you want. If you want to turn not at right angles, just replace “turn left90″ to “turn lefter” and “look left90″ to “lookat 4 4″ etc. The programming language is powerful enough to program really complex actions (see the help menu for the list of commands supported). Moreover, you can easily extend it using the same Shell script language in util.sh file. You can add support for new hardware and new commands with no need in PIC programming. This is one of the most powerful features of routerbot. This is something that makes it truly unique.
18 Responses to “Routerbot v1 FAQ”
Leave a Reply
You must be logged in to post a comment.