Search This Blog

Monday, August 29, 2011

Slackshow, iptraf and 3G

Yesterday I presented an Introduction to Qt Programming mini-course in Slackshow 2011. Slackshow is the annual Brazilian Slackware users meeting, which this year took place in Belo Horizonte city at FUMEC faculty. Months ago one of the organizers, Renato Gravino, invited me to present a lecture and so I did :-) People at the event was very entusiastic and I think people enjoyed the mini-course. I did not take any photos, sorry. I was entertained presenting the mini-course and talking to people.

After finishing my presentation I want to the third floor to watch the final presentation about kernel driver writing. When I am not fixing bugs in Plasmas NM sometimes I also fix bugs in the Linux kernel, one of them even required me to rewrite almost half of my webcam's driver some years ago. During the question section at the end of the presentation one of the attendees asked why iptraf (or iptraf-ng for the matter) does not work with his 3G modem. Well, I have the answer for that. For those who do not know iptraf is a ncurses program to monitor network interfaces:

iptraf is not maintained anymore. Sometime ago someone created iptraf-ng (iptraf next generation), a fork of iptraf, as an alternative to keep using iptraf. Well, the fact is that iptraf and iptraf-ng do not search for USB network interfaces, which are used by several 3G modems nowadays. You need to apply this patch I created and recompile iptraf to fix the problem. Yesterday I sent the patch to iptraf-ng's maintainer, let's seen how much time it will take for it to be applied.

iptraf also requires CONFIG_USB_MON=y in kernel's configuration to monitor USB interfaces. Probably this is the default setting in most kernel's out there, but it was not in mine when I first faced this problem.

If you still use iptraf / iptraf-ng and 3G modem enjoy iptraf working with your modem :-) And thanks for Slackshow's organizers for inviting me for the event.

Friday, August 19, 2011

Wireless sharing with Plasma NM 0.9 (part 2)

In my last post about shared connections I asked how I could make shared connections easier to setup. I have received some suggestions, but some of them were not that easy to implement (drag'n drop one connection onto an interface widget in Plasma NM's main window) or still not easy to understand how to use. Then I got an idea to just add a new entry in the "Add" button, similar to when creating VPN connections. I am here to ask what you all think about this change to the connection editor:

And after selecting the "Shared" option:

You still can use the normal dialog to create wireless shared connections, but the unneeded widgets will not be hidden and the dialog will look like this:

Now the user just need to click on the OK button to finish the setup. The default configuration is to use no encryption, you still need to go to the Wireless Security tab to setup the encrytion key. You can also create wired shared connections in the same way.

The patch has not been commited yet, I want to hear your oppinions before I commit it.

Friday, August 12, 2011

Wireless sharing with Plasma NM 0.9

During Desktop Summit in Berlin some people asked me how to make wireless sharing work. Connection sharing allows to use a computer as gateway for other computers, NM does that by routing all IP packages from one network interface to the default route of your computer (yes, that is a Masquerate configuration). For example, you can configure your notebook to access Internet through ethernet cable and create a wifi shared connection to allow other computers to access Internet using your notebook's default route. Your notebook will act like an access point.

Here are the steps I use with NM-0.9:
  1. Create an ad-hoc connection:
  2. Go to IPv4 tab and change the method to "shared":
  3. If you prefer you can also use WEP encrytion, just go to "Wireless Security" tab, fill in the hexadecimal key or passphrase and click Ok:

  4. Go to the main window, click on the connection, and wait a few seconds until it is activated:

Sometimes my connection does not activate and NetworkManager shows this warning in its log:

NetworkManager[25305]: Activation (wlan0/wireless): association took too long, failing activation.

rmmod'ing the wifi's kernel module and loading it again usually solves this problem for me.

To use WPA instead of WEP in shared connections NM must change wireless card mode to "master", which is only possible when using hostapd (AFAIK). Unfortunately NM does not support using hostapd yet, so it is also not possible to use WPA in shared connections.

People also asked me to simplify the steps to create shared connections. Well, I am open to suggestions. Adding a checkbox or combobox in connection edit dialog is not a good idea. We already have too many options there, I really do not want to add one more widget to do just the only two required configuration changes (in ethernet case it is just one change) to convert a normal connection to a shared connection.

Friday, August 5, 2011

Desktop Summit 2011

I am already in Berlin. Gorgeous city and impressive too. I did not make it to c-base before 21:00 so I will have to register tomorrow :-/ Well, now let's sleep, more than 24h of traveling is exausting, specially because I do not sleep during flights, so it is also more than 24h without sleeping. Zzzzzzz