Posted by: peter
When doing embedded network development, its typical that you have the embedded device you work on connected to one network interface (eth1) while you are simultaneously connected to your corporate or home LAN and the internet via another interface (eth0 or wlan0).

The thing about embedded development is that you spend a lot of time rebooting the embedded device with new firmware which sends your PC’s network interface down and up which triggers a new DHCP request on that interface, which then proceeds to time out (often there is no DHCP server on the embedded device) before you have to manually assign the same static IP that you were using on the interface a few seconds before.

As it turns out there is a way to tell NetworkManager to keep its mitts off of a particular interface. Firstly, find the udi of the interface with the ‘lshal’ command. eg:

udi = ‘/org/freedesktop/Hal/devices/net_00_05_1b_ac_6c_03’
info.capabilities = {‘net’, ‘net.80203’, ‘wake_on_lan’} (string list)
info.category = ‘net.80203’ (string)
info.interfaces = {‘org.freedesktop.Hal.Device.WakeOnLan’} (string list)
info.parent = ‘/org/freedesktop/Hal/devices/usb_device_7a6_8515_0001_if0’ (string)
info.product = ‘Networking Interface’ (string)
info.subsystem = ‘net’ (string)
info.udi = ‘/org/freedesktop/Hal/devices/net_00_05_1b_ac_6c_03’ (string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = ‘net’ (string)
linux.sysfs_path = ‘/sys/devices/pci0000:00/0000:00:1d.7/usb7/7-1/7-1.6/7-1.6:1.0/net/eth1’ (string)
net.80203.mac_address = 21939121155 (0x51bac6c03) (uint64)
net.address = ‘00:05:1b:ac:6c:03’ (string)
net.arp_proto_hw_id = 1 (0x1) (int)
net.interface = ‘eth1’ (string)
net.linux.ifindex = 5 (0x5) (int)
net.originating_device = ‘/org/freedesktop/Hal/devices/usb_device_7a6_8515_0001_if0’ (string)
org.freedesktop.Hal.Device.WakeOnLan.method_argnames = {”, ”, ‘enable’} (string list)
org.freedesktop.Hal.Device.WakeOnLan.method_execpaths = {‘hal-system-wol-supported’, ‘hal-system-wol-enabled’, ‘hal-system-wol-enable’} (string list)
org.freedesktop.Hal.Device.WakeOnLan.method_names = {‘GetSupported’, ‘GetEnabled’, ‘SetEnabled’} (string list)
org.freedesktop.Hal.Device.WakeOnLan.method_signatures = {”, ”, ‘b’} (string list)


Then add this udi as an un-managed device to the [keyfile] section of ‘/etc/NetworkManager/nm-system-settings.conf’. eg:

[keyfile]
unmanaged-devices=/org/freedesktop/Hal/devices/net_00_05_1b_ac_6c_03


It should take effect immediately, and you shouldn’t even need to restart NetworkManager.

Note: Thanks to tambeti on #opensuse-gnome for the tip.
Tags:
Posted by: peter

This week brought us two very interesting Open Source announcements:

Tags:
Posted by: peter

The Australian government wants to introduce draconian censorship and cripple internet speeds with a mandatory filtering system which any child can bypass in five minutes as documented in
Australian Internet filters have backdoors

Perhaps greater concern is the fact that supporters of filtering are already talking about expanding it to include other stuff they don’t like, such as online gambling and “illegal” sites. Censorship is a slippery slope and the fact the government has tried to censor people speaking out against the filtering plans should be ringing alarm bells!

Speak up before it’s too late. Visit NoCleanFeed.com, run by Electronic Frontiers Australia, for information on how to voice your concerns. Do it quickly, before some holier-than-thou git decides you’re not allowed to see that site either!

TAKE ACTION and forward this message to every Australian internet user you know!

Tags:
Posted by: peter

Microsoft has announced that today is Global Anti-Piracy Day. Launching several global initiatives, the aim is to raise awareness of the damage to software innovation that Microsoft says is caused by piracy. … As well as educating people about piracy, Microsoft has also initiated a huge list of legal proceedings that it’s taking out against pirates. Microsoft isn’t messing about when it says ‘global’ either. The list of 49 countries that Microsoft is targeting spans six continents, and ranges from the UK and the US all the way through to Chile, Egypt, Kuwait, Indonesia and China.”

Help combat piracy of Microsoft software by installing OpenSUSE today!

Tags:
Posted by: peter

Here is an interesting letter from a hedge fund manager. I bet a lot of people are wishing they were in the same position:

“Today I write not to gloat. Given the pain that nearly everyone is experiencing, that would be entirely inappropriate. Nor am I writing to make further predictions, as most of my forecasts in previous letters have unfolded or are in the process of unfolding. Instead, I am writing to say goodbye. Recently, on the front page of Section C of the Wall Street Journal, a hedge fund manager who was also closing up shop (a $300 million fund), was quoted as saying, “What I have learned about the hedge fund business is that I hate it.” I could not agree more with that statement. I was in this game for the money. The low hanging fruit, i.e. idiots whose parents paid for prep school, Yale, and then the Harvard MBA, was there for the taking. These people who were (often) truly not worthy of the education they received (or supposedly received) rose to the top of companies such as AIG, Bear Stearns and Lehman Brothers and all levels of our government. All of this behavior supporting the Aristocracy, only ended up making it easier for me to find people stupid enough to take the other side of my trades. God bless America. There are far too many people for me to sincerely thank for my success. However, I do not want to sound like a Hollywood actor accepting an award. The money was reward enough. Furthermore, the endless list those deserving thanks know who they are. I will no longer manage money for other people or institutions. I have enough of my own wealth to manage. Some people, who think they have arrived at a reasonable estimate of my net worth, might be surprised that I would call it quits with such a small war chest. That is fine; I am content with my rewards. Moreover, I will let others try to amass nine, ten or eleven figure net worths. Meanwhile, their lives suck. Appointments back to back, booked solid for the next three months, they look forward to their two week vacation in January during which they will likely be glued to their Blackberries or other such devices. What is the point? They will all be forgotten in fifty years anyway. Steve Balmer, Steven Cohen, and Larry Ellison will all be forgotten. I do not understand the legacy thing. Nearly everyone will be forgotten. Give up on leaving your mark. Throw the Blackberry away and enjoy life. So this is it. With all due respect, I am dropping out. Please do not expect any type of reply to emails or voicemails within normal time frames or at all. Andy Springer and his company will be handling the dissolution of the fund. And don’t worry about my employees, they were always employed by Mr. Springer’s company and only one (who has been well-rewarded) will lose his job. I have no interest in any deals in which anyone would like me to participate. I truly do not have a strong opinion about any market right now, other than to say that things will continue to get worse for some time, probably years. I am content sitting on the sidelines and waiting. After all, sitting and waiting is how we made money from the subprime debacle. I now have time to repair my health, which was destroyed by the stress I layered onto myself over the past two years, as well as my entire life — where I had to compete for spaces in universities and graduate schools, jobs and assets under management — with those who had all the advantages (rich parents) that I did not. May meritocracy be part of a new form of government, which needs to be established. On the issue of the U.S. Government, I would like to make a modest proposal. First, I point out the obvious flaws, whereby legislation was repeatedly brought forth to Congress over the past eight years, which would have reigned in the predatory lending practices of now mostly defunct institutions. These institutions regularly filled the coffers of both parties in return for voting down all of this legislation designed to protect the common citizen. This is an outrage, yet no one seems to know or care about it. Since Thomas Jefferson and Adam Smith passed, I would argue that there has been a dearth of worthy philosophers in this country, at least ones focused on improving government. Capitalism worked for two hundred years, but times change, and systems become corrupt. George Soros, a man of staggering wealth, has stated that he would like to be remembered as a philosopher. My suggestion is that this great man start and sponsor a forum for great minds to come together to create a new system of government that truly represents the common man’s interest, while at the same time creating rewards great enough to attract the best and brightest minds to serve in government roles without having to rely on corruption to further their interests or lifestyles. This forum could be similar to the one used to create the operating system, Linux, which competes with Microsoft’s near monopoly. I believe there is an answer, but for now the system is clearly broken. Lastly, while I still have an audience, I would like to bring attention to an alternative food and energy source. You won’t see it included in BP’s, “Feel good. We are working on sustainable solutions,” television commercials, nor is it mentioned in ADM’s similar commercials. But hemp has been used for at least 5,000 years for cloth and food, as well as just about everything that is produced from petroleum products. Hemp is not marijuana and vice versa. Hemp is the male plant and it grows like a weed, hence the slang term. The original American flag was made of hemp fiber and our Constitution was printed on paper made of hemp. It was used as recently as World War II by the U.S. Government, and then promptly made illegal after the war was won. At a time when rhetoric is flying about becoming more self-sufficient in terms of energy, why is it illegal to grow this plant in this country? Ah, the female. The evil female plant — marijuana. It gets you high, it makes you laugh, it does not produce a hangover. Unlike alcohol, it does not result in bar fights or wife beating. So, why is this innocuous plant illegal? Is it a gateway drug? No, that would be alcohol, which is so heavily advertised in this country. My only conclusion as to why it is illegal, is that Corporate America, which owns Congress, would rather sell you Paxil, Zoloft, Xanax and other additive drugs, than allow you to grow a plant in your home without some of the profits going into their coffers. This policy is ludicrous. It has surely contributed to our dependency on foreign energy sources. Our policies have other countries literally laughing at our stupidity, most notably Canada, as well as several European nations (both Eastern and Western). You would not know this by paying attention to U.S. media sources though, as they tend not to elaborate on who is laughing at the United States this week. Please people, let’s stop the rhetoric and start thinking about how we can truly become self-sufficient. With that I say good-bye and good luck. All the best, Andrew Lahde”
Tags:
Posted by: peter

Read this excerpt and then I’ll tell you who wrote it:

But we are suggesting neither that the human race would voluntarily turn power over to the machines nor that the machines would willfully seize power. What we do suggest is that the human race might easily permit itself to drift into a position of such dependence on the machines that it would have no practical choice but to accept all of the machines’ decisions. … Eventually a stage may be reached at which the decisions necessary to keep the system running will be so complex that human beings will be incapable of making them intelligently. At that stage the machines will be in effective control. People won’t be able to just turn the machines off, because they will be so dependent on them that turning them off would amount to suicide.

Brace yourself. It comes from the Unabomber’s manifesto…

Tags:
Posted by: peter

Last time I tried to get GPRS working over bluetooth on Linux was a couple of years ago with my old Sony Ericsson and SUSE Linux 10. I remember spending quite some time arguing with BlueZ and my phone and while I could happily copy files to and from the phone with OBEX, I never could get them to do GPRS properly, so in the end I gave up and used a serial cable (Which had the added advantage of being able to charge the phone from my notebook’s USB while using GPRS which was usefull given the speed at which GPRS ran down the battery)

Just over a year ago my SE died a pitiful death, and the warranty had just run out, so I bought a Nokia E61i. The combination of the excitement of owning a shiny new wide screen smart phone and the fact that I changed jobs at around the same time meant that I very rarely had the need for internet access on the road, and when I did the email and web client on the E61i was usually sufficient to get the job done. (Additionally the memory of the last unsuccessfull attempt with the SE meant that I wasn’t in a hurry to try again)

However, as I am about to fly to Australia for a 2 week roadtrip up the east coast (Great Barrier reef here I come!) at a critical time at work just as a new product goes into production I figured I had better have another go at it. As it turns out, this time around, with openSUSE 11.0 and the E61i the proceedure was trivial, however all the results on google are much more complex than need be (faffing around with ppp, wvdial et al), so, without further ado, here is:

Peter’s Trivial guide to configuring 3G/GPRS over Bluetooth on openSUSE 11.0

Step one is to make sure you have a bluetooth adaptor (Pretty easy this bit huh?) and that it is enabled. Most notebooks have one built in, but a USB dongle should work just as well. openSUSE was kind enough to automatically configure mine when I installed it. If yours is configured you should see a “K” icon that resembles the Bluetooth logo in your KDE system tray. As long as you have bluetooth enabled on your phone, when you click on the “K” you should see your phone’s name show up in the list of available bluetooth devices. If you haven’t already done so, click on your phone’s name and pair it with your notebook (This will involve picking a PIN code and entering it on both PC and Phone). If your phone supports it I also recommend setting your notebook to “authorised” so that it doesn’t bother asking you if the bluetooth connection is allowed everytime your notebook tries to connect.. (On E61i “Bluetooth -> Paired Devices -> Options -> Set as authorised”)

Check that your Bluetooth adaptor is functional.

# hciconfig hci0: Type: USB BD Address: 00:1D:D9:F0:30:12 ACL MTU: 1017:8 SCO MTU: 64:1 UP RUNNING PSCAN ISCAN RX bytes:0 acl:106 sco:0 events:152 errors:0 TX bytes:2767 acl:107 sco:0 commands:64 errors:0

Find the Bluetooth MAC address of your phone with ‘hcitool scan’.

# hcitool scan Scanning … 00:17:E3:F2:DE:1A NokiaE61i

Check that the phone responds to pings.

# l2ping -c 2 00:17:E3:F2:DE:1A Ping: 00:17:E3:F2:DE:1A from 00:1D:D9:F0:30:12 (data size 44) … 0 bytes from 00:17:E3:F2:DE:1A id 0 time 69.75ms 0 bytes from 00:17:E3:F2:DE:1A id 1 time 27.88ms 2 sent, 2 received, 0% loss

Use ‘sdptool’ (Service Discovery Protocol tool) to find a GPRS modem offering Bluetooth Dial-Up Networking profile (Hopefully one will be found on your phone.. If not you are in trouble!) . In particular we need to find the Bluetooth channel number so we can connect it to the rfcomm Bluetooth “serial port” device.

# sdptool search DUN Inquiring … Searching for DUN on 00:17:E3:F2:DE:1A … Service Name: Dial-Up Networking Service RecHandle: 0x10009 Service Class ID List: “Dialup Networking” (0x1103) Protocol Descriptor List: “L2CAP” (0x0100) “RFCOMM” (0x0003) Channel: 2 Language Base Attr List: code_ISO639: 0x454e encoding: 0x6a base_offset: 0x100 Profile Descriptor List: “Dialup Networking” (0x1103) Version: 0x0100

Bind /dev/rfcomm0 to channel 2 (found in the previous step) on the phone.

# rfcomm bind 0 00:17:E3:F2:DE:1A 2

Check that the bind was successfull.

# rfcomm show 0 rfcomm0: 00:17:E3:F2:DE:1A channel 2 clean

And check that the device we bound to actually exists.

# ls -l /dev/rfcomm0 crw-rw–- 1 root root 216, 0 Sep 19 00:41 /dev/rfcomm0

At this point you now have a “bluetooth serial device” at /dev/rfcomm0 which works with any dial-up program. Personally I use yast to add a new custom provider and then use Kinternet to dial it when I need. The only tricky thing you need to know is to “dial” 99# to use the default GPRS profile saved on your phone (Or use a specific, non-default profile with *99**1# etc where the digit before the # is the profile number).

In order to make this configuration permanant you will need to enter this data into your /etc/bluetooth/rfcomm.conf file so that the “bluetooth serial device” is automatically created at boot. It should look something like:

# # RFCOMM configuration file. # rfcomm0 { # Automatically bind the device at startup bind yes; # Bluetooth address of the device device 00:17:E3:F2:DE:1A; # RFCOMM channel for the connection channel 2; # Description of the connection comment “My Nokia E61i”; }

More info on GPRS modems can be found here..

When configuring your internet connection with yast or wvdial, you will probably want to set Baud = 921600 in order to get access to the higher speeds that modern 3G data connections allow.