wirelezz blog

waves're in the air everywhere I look around…

Just started a new Game Dev blog

leave a comment »

Hey! I just started a new blog. No, I won’t leave or quit this one! it’s just about a hobby that I’ve recently (and finally) started. After some years of programming experience and a childhood dream of writing a game, I finally started doing this as a hobby.

I hope you like it: http://nullbox.wordpress.com

Cheers

Advertisements

Written by Wirelezz

July 18, 2011 at 12:19 am

Posted in etc

Tagged with , ,

How to make Soundboard Prank Calls using Skype

with 15 comments

I know this is pretty off-topic in my blog, but I wanted to share it with you ๐Ÿ™‚

I was wondering: how to play sounds in skype when calling someone? Yeah like on those youtube videos featuring soundboard prank calls of Arnold Schwarzenegger. I just found how to. Is not that I want to do it… really… I mean, I haven’t done it in my life… ever.

But ok. Let’s start with what you need.

  • You need Skype, obviously.
  • A fair set of wav/mp3/whatever-extension-you-want clips, you can find lots here
  • Windows 7 for this howto

First, go to start > control panel > hardware and sound > sound > recording. Right-click anywhere to show a menu and click on “show disabled devices”… “Stereo Mix” will appear. Right click on Stereo Mix and click on enable.

then right-click on Stereo Mix and click on enable

then right-click on Stereo Mix and click on enable

Now open Skype. If Skype asks you to add “Stereo Mix” click on yes.

Click on “Settings” and then click on the microphone button. Select “Stereo Mix” from the popup menu. What you’re doing right here is telling skype to use the sounds that are being played on the computer over a call.

select stereo mix as the mic input

select stereo mix as the mic input

You’re done! If you want to test it, make a call to the Sound Test Service. It will ask you to say something after the beep and that it will be played back afterwards.

Just open the sound clip file you want (play it), it will be played on the call (give it a try).

This howto was obviously made to have some fun with your friends. I hope that you don’t know that skype lets you call to Toll-Free numbers in the US for free and that you can actually make free prank calls with skype. oops

Until next time ๐Ÿ™‚

Written by Wirelezz

April 22, 2011 at 2:26 pm

How to: Ath9k in monitor mode

with 2 comments

I recently went through a (hard) struggle to put an ath9k (Atheros AR7161 NIC, dual-band) driver into monitor mode. I wanted to put one interface into both monitor and infrastructure mode at the same time. To summarize, it is not possible, at least with the 2.6.32.27+2011-02-07-1 version of the ath9k driver.

You can’t put it in “Master” and “Monitor” mode at the same time. As stated here, your device can’t work as a 802.11 infrastructure Access Point if you’re running monitor mode. I mean, it won’t even broadcast beacons at all, although iwconfig stated otherwise.

However (I learned that) it’s possible to put it in both “Ad-Hoc mode” and “Monitor mode”. I know, it’s not the same, but since I’m working with wireless mesh networks right now, it’s an “alrighty then”, can live with it. Oh, BTW! The ath9k driver may also operate in 802.11s mode (mesh point), however, it looks like it’s currently having a serious “beacon broadcasting” bug. So again, I’ll stick to the adhoc mode until the bug’s fixed.

So here’s how to put it in monitor+adhoc mode, assuming that you’ve got another interface running (wlan0, for instance):

iw phy phy0 interface add moni0 type monitor
ifconfig moni0 up
ifconfig moni0 10.0.0.1 netmask 255.255.255.0

Run tcpdump -i moni0 and look how the device will stil broadcast beacons and respond to pings… and all that.

Written by Wirelezz

February 15, 2011 at 3:08 pm

Posted in Uncategorized

Tagged with , ,

Swarm Intelligence Routing for MANETs: Bees (2/2)

with 2 comments

Dumb parts, properly connected into a swarm, yield smart results.
Kevin Kelly

In the last post, I wrote about Ant-inspired routing protocols for MANETs. This time, I’ll continue with the Swarm Intelligence Routing Protocols topic, focusing on bees. Yeah, bees.

Bees, just like ants, use effective mechanisms for collecting food. Their behavior has inspired algorithms used to find optimal routes within MANETs/WMNs. Some of their best examples are BeeAdHoc and BeeIP.

The Idea behind bee-inspired routing for MANETs
Bees fly – ok we all know that. While flying lets you get to a food source faster, it also demands larger ammounts of energy. This means that bees can’t just go flying around looking for food: they need to save as much energy as possible.

For such reason, looking for food includes different procedures (and actors as well). First, a small number of bees fly to find food. When a bee finds a source, it returns to the hive with some of it. At this point, the bee ‘dances’ to get the attention of the other bees as they gather. Then, the bee shows them a sample of the food (it actually pukes it… Alright sorry, you didn’t need to know that). Finally, they can decide wether they’re going for more food or not. By following this procedure, bees reduce the (global) ammount of energy spent searching for food.

Here’s a video that explains it better:



Applying bee-behavior into MANET routing
Bee ad hoc routing works with Agents. Each node is treated as a hive. There are three types of agents: scouts, foragers and swarms. Scouts are basically (broadcast) packets that are sent to discover new paths, an ack-scout is sent back as a unicast to acknowledge a successful path. They also recruit foragers when the scout is back to the hive. Foragers receive the data packet from the transport layer and deliver to the destination. They use the metaphor of dance once they return to the source node. Swarms or Beewarms are used for explicity transporting foragers back to their source when there is no ACK in the transport protocol (eg. UDP). Consider the routing table as a dance floor where the bee agents provide the information about the quality of path they have traversed (watch the video!).

Bee Ad-Hoc Routing Architecture

As of its architecture, it is basically divided in 3: *The packing floor : Interface to higher level layer transport layer; *Entrance: Interface to lower level MAC; *The dance floor: The hearth of the hive, maintains routing information (foragers).

I find very interesting how nature can give us ideas to create and innovate in topics such as MANET routing. By observing and emulating bee behavior in food search and production, a complex -yet effective- routing algorithm can be built for limited-battery devices that communicate inside a mobile ad-hoc network.

Here’s a more detailed explanation.

Written by Wirelezz

November 8, 2010 at 9:19 am

Posted in MANETs

Tagged with , , , , , ,

Swarm Intelligence Routing for MANETs: Ants (1/2)

with one comment

I’ve been considering to write about this topic for some time. After discussing about it with @jcordovag one day, my curiosity towards these swarm-based ad-hoc routing protocols grew up as I digged deeper for more information.

Although Swarm Intelligence isn’t really a new concept, it has been used more frequently in MANETs (research) in the past few years. The idea of using animal behavior to deal with network routing sounds great, but results could be even more impressive in terms of saving node power, reducing jitter and updating the topology, in some cases, even more proficiently than other state-of-art routing protocols, such as SDR, AODV, etc.

Ant Colony Optimization (ACO)
ACO (1992) is basically an algorithm that initially aimed to search for an optimal path in a graph, based on a behavior of ants seeking a path between their colony and a source of food. In the last few years, it has been taken into consideration for developing MANET routing protocols. Some of their best examples are: ARA, AntHocNet and ARMA.

The main idea behid ACO
The routing protocols might differ on some small details, but they all follow on one single idea: emulating the behavior of ants.

In order to collect food, ants set trails of pheromones that other ants will follow. Initially, they spread in all directions. When an ant finds a food source, it collects the food and sets a trail on its way back. The pheromones slowly disappear over time, so the shortest path will be the one with the highest pheromone scent, ie. the path with the highest concentration of ants. When a previously short route gets blocked/lengthened due to an obstacle en route, the alternate short route get strengthened with higher pheromone content due to shorter end-to-end travel time and more ants move to this route. Hence the path can also dynamically adapt to fast changes in the environment.

Ant Colony Optimization for MANETsAnt Colony Optimization for MANETs, Figure taken from this paper.

Routing Algorithm
The Ant-based Ad-Hoc routing algorithm is an on-demand reactive algorithm similar to DSR/AODV, but it has been built to address the challenges experimented in MANETs. Details of how the algorithm works varies between each solution. I strongly recommend reading this paper about a generic perspective of how Ant Colony Optimization could be used to solving MANETs routing issues. Again, although they differ on details, they pretty much define similiar ways of route discovery and route maintenance.

I guess this would be it for this post! I’m willing to try them on a simulation enviroment. I’ll post more about it later!. In the meanwhile, keep reading about the topic!

– Cheers

Written by Wirelezz

October 29, 2010 at 11:11 am

Posted in MANETs

Tagged with , , , ,

Installing OpenWRT on the WRT54G (and not die trying)

with 3 comments

WRT54G

In the last post, I wrote about OpenWRT and how it can help you doing some things you can only do with expensive gear… In this case, I’ll write about how to install OpenWRT on your WRT54G. It’s actually not very difficult and there’re a lot of guides that show how to do it, but I wanted to share my experience.

I’m going to focus on Kamikaze 8.09, which is a stable version of OpenWRT. Nowadays there’s a more up-to-date version called Backfire, which is yet to be tested and bug-corrected in more depth, so that’s why we’re sticking to Kamikaze.

Attention! You’re about to change the firmware of your router, the responsibility of following this guide strictly lays on you. I’m showing the steps that worked for me. In other words: do not sue me if you brick your router, thanks :D.

First: Download the correct firmware for your router. Please check the version of your router. Some versions are NOT supported. Only the versions showed here are supported by OpenWRT. period.

WRT54G (v1, v1.1, v2, v2.2, v3, v3.1, v4)
WRT54GS (v1, v2, v3 and v4)
WRT54GL (v1, v1.1)

Now:

  1. Assign the network address: 192.168.1.2/255.255.255.0 to your PC and connect it to a WRT54G’s LAN port.
  2. Go to the router’s firmware upgrade web page: http://192.168.1.1/Upgrade.asp. Click browse and select your router’s specific .bin image you downloaded from above. Press upgrade and DO NOT POWER OFF your router.
  3. Let it breath for aprox. 5 minutes. The router should restart and the power LED should start blinking.
  4. After the Power LED has stopped blinking, you can now Telnet into the router (the IP is: 192.168.1.1) with PuTTY. Type “passwd” and set your password.
  5. Now you can SSH into the router with PuTTY. Access with your password. User is root.
  6. Congratulations! You’ve installed OpenWRT! I recommend you to follow this guide to use your router as an AP. It’s pretty straightforward. I recommend you to use WinSCP (if you’re using a Windows PC) or OpenSSH for MAC. These tools will help you navigate through the folders and write files.
  7. .

So! I hope you found this guide useful! Please feel free to ask anything about the installation process.

Until next time!

Written by Wirelezz

September 14, 2010 at 9:30 am

Posted in Tutorial

Tagged with , , ,

What is so great about OpenWRT?

with 3 comments

Lately I’ve been experimenting with OpenWRT, a linux distribution for embedded devices. The great thing about OpenWRT is that you can install it to most of the cheapest WLAN devices, ie. routers (check the table of supported hardware).

I know that most Open Source projects may never be as good as proprietary solutions for real implementations. However, in the particular case of OpenWRT, I have identified three major advantages:

It’s a great tool for research
It’s an awesome tool for researching on many fields such as: protocol design, fast handoff schemes research, WIDS, Wireless mesh networking, and so on. Learning and doing Unix socket programming in C for OpenWRT may give a large number of headaches, but it’s the best way to get the full control of the information sent over the air.

It’s a great study tool
There’s indeed a difference between reading about the 802.11 standard and getting hands-on training equipment -of course, reading is extremely important- but some of the most advanced concepts are not available anywhere but in enterprise solutions. If you don’t have the access to such equipment, you may want to install OpenWRT on your (cheap) Linksys WRT54GL and also install some packages that would do the magic.

For instance, how do you see what is actually going on through a WPA2-Enterprise (with a RADIUS server, EAP/MD5 auth) handshake on both the wired and wireless side? You could install FreeRadius to a linux box to use as authentication server. Sniffing the air is possible by using wireshark or tcpdump in the OpenWRT box.

If you want to learn a little more about WLAN Controllers, you may want to take a look at the ChilliSpot project. You need to install it on both a WRT54G and a Linux box to see it in action.

VLAN segmentation by editing configuration files, deploying a VPN server on the router, wireless mesh networking using different routing protocols, installing Asterisk on the box, etc. There’re A LOT of packages that can be installed.

Save money
It’s as simple as this: you get many of the features only found in (expensive) enterprise solutions by installing a free firmware on a $60 router.

As I said (somewhere) above, OpenWRT may not be suitable for large enterprise implementations (should not), but it’s a great tool for studying the 802.11 standard, researching or just having some fun. I do not recommend it for illegal purposes.

Some useful links:
Installing and configuring OpenWRT Kamikaze
OpenWRT forum
Use FreeRADIUS for Wi-Fi Authentication


The idea of writing this post came up after reading a question asked by @jameyk1stner via Twitter which basically stated: is there any way to practice for the CWNA exam with real scenarios by using real APs, Controllers, etc?.

Written by Wirelezz

August 23, 2010 at 10:15 am

Posted in Uncategorized

Tagged with , , ,