Online users
21 online users
Blog: Danny Staple
Description: Thoughts, news, events, creations and insights about Lego, Robotics and technology from the creator of OrionRobots.
Created by orion on Sun 05 of Dec, 2004[11:42 UTC]
Last modified Sun 30 of Mar, 2008[18:48 UTC]
RSS feed (168 posts | 131492 visits | Activity=2.00)
Find:

Using Telnet on the DLink DSM-G600

posted by orion on Sun 30 of Mar, 2008[18:48 UTC]
In my last post, I explained how to get a telnet service installed on the box, but I did not really say what it really was or how to use it. In this post I will explain a little more about how it works and what it is for.

Telnet is a little like a telephone service:



Like the telephone, it allows a caller (client) to place a call (connection) with a receiver (service). It allows a text based dialog with something at the other end.



This however simply provides, like a phone line, a pipe to facilitate communication. To make it useful, it needs to have something to transmit to and from. In the case of a phone line, you have a caller and receiver:



By the way, the reason the phone line analogy works pretty well is that in computer networks, some links are likely to actually be phone lines. These worlds are actually fairly close. Replacing a caller with a computer user, and the receiver with an application the user wants to interact with at the other end gives a full picture:



Both the application and Telnet service are likely to be running on the same remote machine, in this case the DSM-G600. It is now clear that once the protocol is understood, any authentication has taken place and the connection is established, the telnet service layer should become transparent:



Still with me?

On the DSM-G600, I placed the Busybox application which provides a collection of services. Among them is a shell - Ash. This shell is similar to an MS DOS command line and allows you to query the system and run other programs.

How to connect?

So in the last post, I set up the services. I still need a telnet client. The best (in my humble opinion) telnet client for windows is Putty. It is free and easy to set up. The link is at the end of this post.

Like a phone number, you will need the address of the G600 - mine is at 192.168.1.7. Putty also allows a choice of protocols, so at this point I ensure I pick telnet.



After clicking ok, if all goes well, the Telnet services will respond with a login prompt:



Use "root" for the user, and the admin password you set up on the DSM-G600.

You should now be interacting with the Ash shell and it will prompt you:



Ash, as mentioned, allows you to run programs and examine the system. To prove this works, I run the "ls" program which will list the contents of the current directory on the box. It is a little like "dir" in DOS.



Summary

So now you know what telnet is, how to get the service running on the DSM-G600, how to connect to it and how to start interacting with it via the Ash shell.

Links





Permalink (referenced by: 0 posts / references: 0 posts) print email this post

DLink DSM-G600 next steps

posted by orion on Fri 21 of Mar, 2008[20:50 UTC]

Simple fun_plug test

So continuing my work with this box, since it was hackable, I decided the first thing to do was to try a simple test of the fun_plug system mentioned before.

I created a very, very simple script:
#!/bin/sh
echo Testing >/mnt/HD_a2/fun_plug_active.log


The script is simple enough. The first line tells the system that this file is to be run as a shell with the interpreter at /bin/sh.
The next line simply puts the text "Testing" into the file /mnt/HD_a2/fun_plug_active.log.

I uploaded it to the box as /HD_a2/fun_plug using FTP, and then set permissions on that to 777, making the file executable. Rebooting the box should leave a new file on the drive at /mnt/HD_a2/fun_plug_active.log containing the word "Testing".

Getting a move on

Now I was truly cooking. The modding community around this box had figured out cross compiling to this box, and so created a number of binaries (compiled programs) for it already. The first to get was a telnet client, so I could actually interact with the system without waiting for fun_plug to run on a reboot.

I already have a Linux box as well as Cygwin (a way to run some linux based operations in windows) on a windows box. You still require windows to interact with the web front end on the box, which only works properly in Internet Explorer.

Understanding Busybox

The recommended (by the community) way to get telnet on this box is to use a busybox binary with additional telnet and sed components. Busybox, which I briefly mentioned in my previous post, is a modular system offering many common Linux commands and utilities in a small binary. It is designed to stay resident, have no (or few) external library dependencies, and be very small. All of the commands then run from this binary. It is perfect for use on embedded devices like this.

Busybox has an interesting way to identify which module is being called. You can run busybox directly, with the required command as a first parameter. However, the recommended way is to use a symbolic link (a file that links to the content of another file) which has the required modules name - this then conveniently means pointing the path at a directory of these symlinks allows them to be run as if they were all individual binary commands. Busybox commands are largely compatible with normal Linux equivalents, but are understandably lighter, so some less used or inappropriate (very intensive) options will be stripped away.

The box already has a busybox binary of its own, but that is somewhat limited. I grabbed the binary from http://download.dsmg600.info/busybox-telnetd-1.2.1.tar.bz2external link. Following the community guide, I used 7zip to extract it to a folder.

You should now end up with a couple of files - busybox, sed and a readme.txt.

The readme.txt is very handy, it actually contains information on getting telnet running with this set. I copied over the binaries to the root of the disk on the box, and placed the commands mentioned in the readme into the fun_plug script.

About Telnet


Telnet allows remote access to a box via a command line, it is a simple and lightweight protocol and has been around for many, many years. However, on this box, it requires a few changes to groups, users and security in the configuration.

The box uses a standard Linux configuration, in that it stores users and groups in files in the /etc directory as plain text files. However, these files are stored in a compressed image in the flash, and then expanded to a ramdisk on boot. Therefore, we must use fun_plug to make the changes on boot, before the telnet service is started.

Sed is a tool designed to modify text files. It means "stream editor" where the input text is considered a simple stream of text coming at the processor. It has a fairly esoteric and complex syntax based on regular expressions - and I generally have to regularly refer to a regular expression cheat sheet. Regular expressions are a shorthand way to denote changes to text, operations like search and replace.

Luckily, I did not have to think too much about the sed scripts, as the G600 community had already come up with them. However, I will explain them.

#!/bin/sh
if [ ! -e /mnt/HD_a2/ash ]
then
ln -s /mnt/HD_a2/busybox /mnt/HD_a2/ash
fi
if [ ! `grep root /etc/shadow` ]
then
echo kontroll.`grep admin /etc/shadow` >> /etc/shadow
/mnt/HD_a2/sed -i -e 's/kontroll.admin/root/' /etc/shadow
fi
/mnt/HD_a2/sed -i -e 's/root:.*/root:x:0:0:Linux User,,,:\/:\/mnt\/HD_a2\/ash/' /etc/passwd
cd /dev && /mnt/HD_a2/busybox makedevs ptyp c 2 0 0 9
cd /dev && /mnt/HD_a2/busybox makedevs ttyp c 3 0 0 9
/mnt/HD_a2/busybox telnetd &


The first line, as above, expresses that this script should be run by /bin/bash.
The next line checks for the existence of the file /mnt/HD_a2/ash. Ash is another shell interpreter, somewhat more friendly than raw sh. It is what a user will get when the telnet in. If it does not exist (the "!" is a negative test), then "ln -s" is used to create one of the symlinks I discussed above. This symlink to busybox will run the module ash in busybox.

"fi" simply ends an if statement.

The existence of a "root" user in the file /etc/shadow is tested for - grep is a tool to find regular expressions in files, and /etc/shadow is one of the user configuration files under /etc which contains users adn encrypted passwords. This negative test leads to the use of echo to append the admin users details to the end of the file again. The word "kontroll." is used as a placeholder, so the next operation which uses Sed to switch kontroll.admin for root gives us a standard root user.

Sed is then used to set up a default shell (the ash shell) so the user can log on. If at this point you want to add another user (beyond root) and allow them to logon, you should create a user from the front interface, and then add an entry to set a shell for them. I added myself, as I do not always want to be root.

Next, a telnet session needs a terminal device to attach itself to. A command makedev (in busybox) is used to create those devices.
Finally, the telnet service is started.

After the box is rebooted, I was able to log in with telnet. This now means I can start to do a lot more to manipulate the box.

My plans included getting an SVN server running on the box, with trac - although apache is too heavy, their may be another way to do that. The community website mentions getting Debian and Gentoo environments running on this box.

Links





Permalink (referenced by: 0 posts / references: 0 posts) print email this post

New Toy - DLink DSM-G600 NAS Box

posted by orion on Mon 17 of Mar, 2008[00:05 UTC]
I recently bought the DSM-G600 on Amazon, a small and inexpensive Wireless Enabled NAS - Network Attached Storage. It is a tiny box - about the size of router, maybe a little taller. It has a wireless aerial at the back, a set of lights on the front, an Ethernet port, power socket and a cavity for an IDE hard drive inside it. The box also has one USB2 port which can play as a USB2 host. That already gave me ideas - I know it can support USB2 drives, but how about a DVD Burner for backups directly from the NAS, or connecting my printer to it? Well early days yet...

This is where it starts to get fun. I bought a 250Gb hard drive for the cavity and let the drive start up and initialise the drive. Immediately it grabs an IP address via DHCP my local network and starts whirring away. The manual gives details on finding an initialising it for my network so I can give it a permanent address.

Initially the box shares the drive as a windows share, and has a web interface to edit the settings, although this interface has a couple or quirks that mean it only works in Internet Explorer. The interface allows me to set up users and access restrictions, enable FTP access and other small operations as well as monitoring the health and temperature of the drive.

Hackable

However, I bought this device for more than just storing files. This box has a hacking community around it, and under the hood it is simply a Linux kernel running the busybox set of tools built with uclibc on flash storage. The drive is actually partitioned into one great big Ext2 Linux partition. Don't worry if that does not yet mean a lot to you - what it simply means is that this box is hackable, and could possibly be used for an SBC - Single Board Computer.

The hardware consists of a 170Mhz PowerPC based processor, 32MB of RAM and 4MB of Flash ROM. This may sound limited, but it is a tiny cheap box, and now probably has a huge hard drive attached to it! It may be perfect for a tiny home server sitting in the corner.

The drive as its shared can have a single file placed on it named "fun_plug". This harmless seeming name allows you to do something quite interesting - it is a shell script, running in a busybox equivalent of a Bourne Unix shell. You can run commands from this script. It runs every time the box is restarted. The next step is to get some of my own tools on the box so I can run those.

I have had it long enough to have done plenty with the box, and will be blogging my hacks so far with it here. I will give you the links to start you off though..

Links








Permalink (referenced by: 0 posts / references: 0 posts) print email this post
Botmag are currently hosting a contest to design and later build innovative robots using the Vexplorer kit. The builders need to get a description of a unique or creative use for the VEXplorer kit entered into the contest before the 24th march 2008.

25 of those builders will be selected to receive a free VEXplorer kit to build their designs. They then need to make a YouTube video of their robot in action showing the innovative behaviour. The contest winner will get a grand prize of a $5000 scholarship.

The contest will be judged by none other than Grant Imahara?, a special effects wizard probably best known for R2D2 and being one of the hosts of Mythbusters. The winners will be personally picked by him on the 5th June 2008. He will be looking for innovation, creativity, and there will also points awarded for the use of the SolidWorks Student Design Kit to design the robot.

The competition is put together by a group including Innovation First, Inc., Revell, Robot magazine and SolidWorks Corporation.

I personally would have entered jsut to get my hands on the free VEXplorer kit. The contest is sadly only open to US residents who are 14 or older. Those under 14 may be able to get a parent to represent them.

Links






Permalink (referenced by: 0 posts / references: 0 posts) print email this post

Superb Robotics Website

posted by orion on Thu 06 of Mar, 2008[20:29 UTC]
I have now found another good resource with plenty of information on robotics and building robots. The content on the site is largely original, and the site has a visitor contribution area as well as a number of forums. It is also relatively recent.

The articles are very instructional with plenty of diagrams and the site is very easy to navigate. There are detailed circuit diagrams, sections of code (programs) and discussion on the topics.

So I present to you ikalogic - http://www.ikalogic.comexternal link where you can find information on Robot Navigation, Micro-controllers, Motor Control, General Electronics and Sensors and Measurement.





Permalink (referenced by: 0 posts / references: 0 posts) print email this post

Role models and influences

posted by orion on Thu 21 of Feb, 2008[22:35 UTC]
For any person, their idols, role models and influences can totally shape their dreams, the way the behave, their ambitions, and how the aspire to reach them. People have asked a number of times who I am influenced by and why.

I don't go for glitz and glamour, but for real achievers that one way or another have made real differences, often in technology and science, and often being unrecognised while doing so. They all have real human failings, and some have sides that I feel less inclined to like, but still admire them for their achievements.

So who are they?


Albert Einstein - Top of my list comes this amazing man. He has single handedly done so much for modern physics. He spent a reasonable amount of his life unrecognised, and sadly saw his equations used to create atomic weapons. However, for understanding fundamentals of light, energy and particle physics, he has done much.

Alan Turing - Like a number of these great people, society did not accept his choices and drove him to a sad demise. It must be acknowledged that without this man, modern computing and programming systems would not be what they are. Again, he had some very human failings and I am aware that his theories were developed in War Time for intercepting and decrypting messages.

Nikola Tesla - Nikola Tesla remained largely unrecognised throughout his life, but modern electromagnetic machines, including simple AC power transmission, the electrical transformer, generator and motor systems, induction based power systems, robotics and a great deal more are due to his work in this field. There are quite possibly plenty of discoveries he made that the rest of the world are yet to discover and understand. He died with no money and commonly regarded as a mad scientist.

Charles Babbage - The machines designed by Charles Babbage are fairly well known as concepts for large mechanical computing machines, the most well known being the difference engine. A working machine has been constructed and is now on display in the Science Museum in London.

These are but a few, but a very important few, of my influences. There are many other names I should mention in brief which include inventors, entrepreneurs and writers - Galileo, Copernicus, Pythagorus, Tim Berners-Lee?, Leonardo Da Vinci, Linux Torvalds, Mark Shuttleworth, Steven Hawkings, Richard Dawkins, Douglas Adams, Isaac Asimov and Terry Pratchett.

Of course, not all the people I consider role models are famous. Other people I consider great role models are my father who is also a software engineer, and some very good friends of mine who exceptional people as well as exceptional technologists.

I hope that some people may read this, follow up a little on the people mentioned here, and maybe be inspired themselves to do similar great things.

Links





Permalink (referenced by: 0 posts / references: 0 posts) print email this post

Magneticly Linking Robots

posted by orion on Wed 06 of Feb, 2008[15:10 UTC]
Among the things mentioned occasionally on OrionRobots are Swarm Bots?, Nano Bots and Cluster Bots.

One cool idea among these is that the robots can join together in some movable arrangement to perform tasks - to cluster together. Of course, while taking into account lessons from SciFi (like The Replicators who do just this), they could be very handy for all kinds of things, including rapid prototyping, bridge forming, creating robotic manipulators and other stuff.

Now having real ones on Nano Scale is still quite a distance away, however, a team at Carnegie Mellon University led by Seth Goldstein have come up with some demonstration robots which use a ring of electromagnets around their perimeter to bind and move around each other. The goal is to create the microscopic swarming robots eventually, and small electrical charges instead of magnets are likely to be more efficient at that scale.

These demonstrations of robots has been dubbed "claytronic". NewScientist? created a video of this demo in action.



Links






Permalink (referenced by: 0 posts / references: 0 posts) print email this post

Homebuild EV's

posted by orion on Sun 03 of Feb, 2008[23:40 UTC]
So electric vehicles as sold by manufacturers are either unsightly, branded as deathtraps, or pretty wasteful in terms of manufacturing standards. However, one bright young chap in Michigan, US has been busy building or converting his own EV's.

Andrew's first project was to convert a 1988 Mazda pick-up truck into an EV. Albeit not the most effective one with a range of 40 miles per charge and a top speed of 55Mph. But the builder is 16 years old. If he is starting here, it is pretty clear Andrew is going to go far. He is now on a second project which is converting a 1992 Toyota Tercel.

He has been blogging every step of the way. Given the number of old cars which end up in the scrapheap, this is a really good way of reusing stuff that would otherwise have been thrown away. With hobbyists like Andrew Angelloti starting to build EV's, it is likely a healthy home build tinkering hobby will encourage much more investment in EV's than the slightly disinterested big motor companies have managed to muster so far.

Links





Permalink (referenced by: 0 posts / references: 0 posts) print email this post

Happy Birthday Lego!

posted by orion on Mon 28 of Jan, 2008[20:58 UTC]
Lego, the company who produce some of the greatest robot and toy kit in the world are celebrating the 50th year of the Lego Brick - the classic 2x4 brick that is the most easily associated with their brand.

As you may (or may not know), I am myself an AFOL or Adult Fan Of Lego. For those who like Lego but are unaware how much their hobby is shared, be sure to go and find out about Lugnet - the Lego Users Group Network. Lugnet is an internet community all about sharing and enjoying the Lego hobby, and has specialist groups for robotics, technic, building mecha, build houses, trains, spaceships and all sorts of other stuff. There are even conventions (although I am yet to make it to one) where people display their amazing Lego creations.

I own a rather large amount of Lego, what is in fact my second collection. I started building Lego kits as a kid, and had a big mixture of technic and space Lego, which I abandoned when I thought I was old enough to leave alone. My sisters scattered most of that collection to the four winds.

A few years later, after the introduction of mindstorms and specifically the RCX which my University faculty had tried to acquire, I bought this kit and was hooked again. I rebuilt my collection with a combination of new purchases, and handy buys from eBay and BrickShelf. I now own the RCX, Cybermaster, Manas?, a SpyBotics kit, plenty of space Lego, some bumper boxes of generic bricks, plenty of pneumatic kit as well as the amazing NXT, all of which demonstrate that Lego are still innovating in the construction toy market, and it is all mostly backwards compatible.

For the purists, remember that the studless beams still can act as sockets for normal studs and are compatible with all the technic pins.

These days, I would never again give up my Lego, and although it takes up a reasonable section of my storage, it is one of my prized possessions.




Permalink (referenced by: 0 posts / references: 0 posts) print email this post

Amazing robot hacked together with Gaffa tape

posted by orion on Sun 27 of Jan, 2008[20:36 UTC]

A group of guys at a tech convention (24th Annual Computer Chaos Congress) literally strapped together a robot from all kinds of odds and ends - a Chumby (a small Linux based cute and fluffy computing thing), a DVB-T (the same system as UK's Freeview) transceiver kit and encoder, an RC car, some phidgets? and a bunch of other stuff. All of the guys at the convention just happened to have the right kit to put it together - and the thing may not be a beauty, but it is definitely pretty cool.


Links






Permalink (referenced by: 0 posts / references: 0 posts) print email this post

Advertisement
Current Poll
Are you interested in a London robot building Group?
Yes I am interested in adult only group
Yes I am interested in an under 16s group
Yes I am interested in mixed group
Do not live in London
Not really my thing

View Results
(Votes: 3)
spampoison Creative Commons Licence Powered by TikiWiki Say No to European Software Patents Webfeed (RSS/ATOM) registered at http://www.feeds4all.nl
rss Wiki rss Blogs rss Articles rss Image galleries rss File galleries rss Forums
[ Execution time: 0.75 secs ]   [ Memory usage: 11.64MB ]   [ 108 database queries used ]   [ GZIP Disabled ]   [ Server load: 1.60 ]