You are currently browsing the category archive for the ‘useful stuff’ category.

I was setting up today my new Windows7 laptop. And, as every single Windows laptop I’ve had before, I set up a Linux VM on it. Although on my other laptop I run a paid VMWare Workstation Pro license, in this particular license I am running the free VMWare Workstation 14 Player.

I currently have two VMs set-up, a custom Ubuntu one that I use mostly for development and tests and a Kali-Linux one. If you are interested in radio security, you must install the kali-linux-sdr and kali-linux-wireless packages. Such a convenient way to get all your favorite tools nicely installed on your machine.

By the way, when setting up the Kali image, for some reason, the apt sources were not properly configured and I could not apt-get install kali-linux-sdr and kali-linux-wireless. A quick update of /etc/apt/sources.list fixed the issue. You can get the url to the various package repositories here (note: several of the ones listed do not actually work).

Anyhow, once all my sdr and radio tools are ready to run, I got to the main issue at hand. It is quite well known that running USB devices from within a VM is prone to errors and rather imperfect. Things seem to work fine when, upon plugging my USRP B210, it would be recognized by the driver and connected to the VM.

Running uhd_usrp_probe appeared to work well, as it loaded the firmware onto the USRP, but then it just couldn’t locate the device anymore. For some reason the VM gets lost in translation as, once the firmware is loaded, the USB device essentially changes and the VM loses it. And it took me quite some time to get it to work. I was close to leaving it for another day until I found a solution that worked well on both the Kali and Ubuntu images. Instead of running uhd_usrp_probe or any other application that probes and uses the USRP, the trick is to run first the b2xx_fx3_utils tool. Its path might be different depending on how you installed UHD, but in the Kali image it is in /usr/lib/uhd/utils. After running this tool the firmware is updated on the USRP and, from that moment on, everything works just fine. You will need to do this trick each time that you unplug the USRP and plug it again, as the firmware will need to be updated again.

When I thought I was done, I am actually facing a new challenge. Installing OpenLTE on Kali doesn’t work as cmake cannot find the UHD libraries. Most likely a permissions or weird installation path on Kali for UHD. But this is one that I’ll procrastinate in fixing as I switched to doing all my development and experimentation for my LTE exploits security research with srsLTE.

Ever since becoming a father I’ve had very little time for research, but I have some new LTE protocol exploits in the kitchen being cooked. Once I have enough time to put together results and a talk, you’ll see me on the road to talk about it. I’m aiming for Spring time.

Happy new year everyone!

EDIT: A lot of people has been asking me about this. What this fixes is the USRP itself being used from within a VM. This does not fix the ancient issue of VMWare with USB3 drivers. If you need to run something with the USRP that requires USB3 (e.g. an LTE base station at full 10MHz and ~30Msps), that will be VERY hard to do from within a VM. You are much better off by creating a partition to run native Linux on your laptop for that.

If anyone ever manages to get the USRP over USB3 working from within a VM, please please please let me know!

Lately I am trying to post here every time I find out something useful that I did not really know how to do. This is something I had to Google yesterday and is very useful. In my case, the problem arises when using OPNET. If you are an OPNET user, you know that results can either be visualized with the OPNET tool (very useful for rapid visualization and check of results, but not good to make nice plots) or export the results to an Excel spreadsheet.

Sometimes you have a plot with literally tens of thousands of data points and you would like to down-sample it. OPNET has an option in the results panel that allegedly down-samples the plot, but it takes forever and ever to run and the outcome is never what I need. So what I do is the following. Say that you have your data in two columns:


We are going to add a third column with the following operation: “MOD(ROW(A1),N)”. Change N by the down-sampling you want. For example, if N=20, we will be eventually using 1 data point from every 20.


Now we copy [D,1] on the entire column D. This will result in column D being populated as follows: 1, 2, …, N-1, 1, 2, …, N-1, 1, 2, …


Now we select column D clicking on top of it and we go to “Data – Filter”. A little arrow appears on top of the column. Clicking on it we can filter the values of the spreadsheet based on column D. Select only the value “1” and click OK. I usually do it selecting “1” so I always keep my very first sample. The result is a “new” spreadsheet (note that the actual spreadsheet did not change and all the data is still saved in the file, only what is visualized changes) with only one data point out of every N. You can go ahead and plot it normally as you always do with Excel.


I am sure there are ways to do this easier and more efficiently. If you know any, please write a comment and let me know.

Street Dogs Savin Hill album was playing while I wrote this. Great music to start the day.

I have not had time to write anything here lately because I have been (and still am) very busy with work. The good news is that it is because of a very cool project about which I am very excited. And any free time I have I spend it running in Central Park, hanging out with friends, hanging out with my girlfriend, watching movies (Iron Man 3 – Good, After Earth – Bad, Safe House – Very good, Parker – Good) …

As I have done sometimes before, this post will contain a bunch of things I have found out lately that, as a post, might be useless, but hopefully they will help someone at some point who is searching for answers on Google.

(N.A.: My knowledge of Unix is very basic – I am a Windows user – but I am getting better at a quite decent pace)

  • To do remote desktop from Ubuntu to a Windows machine use rdesktop.
  • To do remote desktop from anywhere to Ubuntu, install xrdp on Ubuntu.
  • When using rdesktop, use the option “-f” to make it full screen. When you wonder how the heck do I minimize a full screen in Ubuntu, do not waste your time like I did. Here is the answer: ctrl+alt+enter. Use the same keyboard shortcut to get back into full screen.
  • If an Ubuntu machine boots up without a screen connected to it, the display will not work if you connect it later). Turn off the machine, connect the display and turn it on again. The same symptom seems to occur when you disconnect the display from an Ubuntu machine for a while.
  • rdesktop on Ubuntu experiences noticeable delay if you machine does not have a decent graphics card. Chances are, you do not have a decent graphics card. It might improve a bit better if you install actual drivers for your graphics card instead of using the “default” ones.
  • A USRP N210 will not work if it does not see a gigabit connection. This is something you should know already (and I should have known), but it made me waste quite some time trying to figure out what was going on.

That’s it for today. I gotta get back to work.

Recently, after a hiatus of about a year and a half, I started developing with OPNET Modeler again (I have been using OPNET for simulations and tests on LTE networks often for the last 2 years and a half, but not really developing at a large scale).

OPNET is a company, recently acquired by Riverbed, that offers a rather long list of products. I have to say that my experience is only with Modeler, the wireless module and many of their models (=code) for LTE, UMTS, IP, WLAN, etc. I will be using a couple more of their products soon, learning new stuff and expanding the potential of what we develop.


I started using OPNET back in 2005 when, in order to fulfill my final degree research project, I joined the Mobile Communications Research Group (Grup de Recerca en Comunicacions Mobils) of the Politechnic University of Catalunya (Telecom-BCN). I worked for a bit over a year on Common Radio Resource Management for heterogeneous GSM(EDGE)+UMTS networks. Back then, I learned how to program and develop in OPNET and I was hooked. Going back to my roots now is bringing me back so many memories. OPNET development is hard at the beginning but, once you get it, you see through the code and the GUI like Neo sees through Matrix.

OPNET is, in my humble opinion, not a very popular/widespread tool among academia. It might be because of its cost (though I know for a fact that they have free licenses for academia so the cost is literally zero… I can’t remember if there was such free licenses back in 2005). I have also heard people sometimes telling me that they do not “trust” results generated by OPNET. The reason I have been given is that OPNET models networks based on what (for example) standards say and the results could differ a lot from a real production network. I totally agree. However, the people who make this claims (and many other people too) often use other “simulation platforms” for their research, i.e. Matlab, C++, Java, Python, etc. I do not see why a simulation on another “platform” (i.e. Matlab, C++, Java, Python, etc) would be more accurate or better than with OPNET. Actually, I think that with OPNET it will probably be better because it is much easier (I can’t even imagine trying to simulate an LTE network – eUTRAN + RAN – using Python). By the way, I want to comment here that I have never used NS-2 or NS-3 so I am not trying to imply at all that OPNET is better or worst than those two.

OPNET offers a great platform to develop very realistic and efficient network simulations. I agree that the results might differ from a real production network but, using another simulation platform, in the best case scenario you’ll get results as accurate as with OPNET. The only way to improve them is to actually get your hands on a real network. In that specific case, I happen to be very lucky to work where I work and have access to such a cool lab network. However, in order to achieve realistic results at a big network scale (hundreds of thousands of mobile devices talking over a very (very) large network) one needs an unrealistically (very very unrealistically) huge lab network. In this case, I don’t know anything better than OPNET.

(Again, I have not tried NS-2 or NS-3. Maybe if I did I would change my mind. Any thoughts?)

If you are a grad student working on research related to networking, wireless, cellular or something like that, you might want to check this out (free license for academia research) and speak with your advisor.

Obviously, and as usual, the opinions I post here are my own and have nothing to do with my employer or anybody else.

I just posted the source code of a school project I worked on back in 2003. This was the final project for a programming class back as an undergrad. Essentially, it is an online chat client and server where a user can choose an “old school” sprite and then move around a 2D scenario. Once you step in front of another user, the button “chat” becomes active and you can do IM with that other user. Contains all types of GUI Java constructions, socket programming, servers, etc.

You can find it in the code section of my website.

I am so busy that I have no time to write on my blog lately (soon things will go back to normal with more frequent longer posts…). However, I still try to post stuff once in a while. And, lately, I have decided to post stuff that I find particularly useful for what I do. Today is the turn for two Excel tricks I just learned. As usual, I am not reinventing the wheel (many of my readers might already know both tricks), but these are things that could be very useful at some point.

  • How to divide Excel cells by a number

This is the test case. You generated tons of data of, say, throughput in bps. Many many cells full of big numbers. But, when it comes to the time to generate a nice plot for a paper or a report, you want things in, for example, Mbps. How would you divide all those values by a given scaling factor (10^6 to go from bps to Mbps)?

One option would be to make an empty cell “=cell_with_data_in_bps/1000000” and apply to as many empty cells as cells with data you have. This way, though, requires twice as much “space” in your spreadsheet.

The way to do it is as follows. You write 1000000 on any empty cell. Select that cell and copy it (Ctrl+C). Then mark all the cells you want to modify. Right-click and select paste special. On “Operation” select “divide” and accept. Voila! Problem solved. And note that you can do the same with adding, subtracting or multiplying.

  • How to add a second Y-axis to an Excel plot

What about when you want to plot two types of data on a figure but they are on different scales? Plot everything. Then right click on a data series you want to modify, right-click and choose “Format data series”. In “Series options” select secondary axis. From here the rest should be piece of cake.

As I have been doing lately, here you have some stuff I found online that is very useful to me and might be very useful to you too:

  • LTE resource grid allocation: Very useful for quick calculations on raw capacity, throughput, etc. Also, very very useful for a nice visualization of the LTE resource allocation grid with all the control channels, etc.
  • Modulation and Coding Schemes list: Do you ever remember what are the coding rates typically used in QPSK, 16-QAM, 64-QAM…? Me neither. When I need to do a quick real throughput calculation I check them here.

Somewhere lost in my home computer I have an excel file that calculates the capacity of LTE (in bits per second) for all kinds of configurations. I did it as part of the class project from my LTE networks class at Columbia University. You fill in some input parameters and, voila!, there you have it. Not the greatest resource of all time at all, but it is useful. I’ll try to find it and post it here.

I remember being a graduate student, working on a class project for my Wireless Communication course and trying to implement a simple OFDM modulator/demodulator to prove the resiliency to frequency selective fading of such modulation. Sometimes, when one is working on signal processing in Matlab, you need to filter a signal and a quick filter design is necessary.

I just randomly came across a very useful online FIR filter design tool. It allows you to get the filter coefficients in a rapid manner for some given specifications. Not reinventing the wheel, but I just added it to my favorites as it could be very useful some day. You can find it here.


I thought it would be a good idea to share some public and openly available resources that I often use at work. They are not spectacular, but they are things than come in handy while working on LTE related stuff or data processing.

  • (LTE) frequency band calculator: In this website you can find an accurate list of all the frequency bands, with their BW, central frequency for uplink and downlink, the separation for duplexing, etc. It also details the LTE bands both for FDD and TDD. Finally, my favorite, it has an automatic translator from frequency to EARFCN. Really useful.
  • LTE PDSCH allocation calculator: Not a big deal, but it is useful when you need to make some quick math in terms of LTE allocation, number of bits you can allocate per symbol with a given configuration, etc.
  • GSM Mobile Network Codes (MNC-MCC): A comprehensive list of all (?) MNC-MCC network codes. So if you sniff traffic from a base station you can tell what provider it is from, etc. Trust me, this can be very useful. For weeks I kept getting the wrong signal (not from my lab base station) at my test UEs and I did not know where it was coming from. Now I know and I managed to cancel that interference.
  • GPS visualizer: This is very useful when you want to plot location data on Google Maps. Do you know how to do it? Me neither. So, do like me, format the data nicely in an Excel file following these instructions and, voila, your data plotted on Google Maps!

I have some other cool resources I use often, but I shared most of them in this blog in the past. My favorite by faaaaaaaaaaar is the online Latex equation editor.

About me:

Born in Barcelona, moved to Los Angeles at age 24, ended in NYC, where I enjoy life, tweet about music and work as a geek in security for wireless networks.
All the opinions expressed in this blog are my own and are not related to my employer.
About me:

Blog Stats

  • 145,776 hits

Twitter feed

Enter your email address to follow this blog and receive notifications of new posts by email.