Dear Devel,
The following script gets my B2 and MPs online in joyride-1814, 703, and
656. It won't run from Pippy due to DBUS restrictions.
I don't know the ESSID for NYC, and I don't know their WEP key either. I am
able to share a chat over the
network created and it has lasted ~30 minutes without dropping off. The
changes don't seem to survive a reboot.
Suggested use: copy script from usb key to /etc/rc5.d/S99nyc_fix.py or write
a wrapper activity that keeps enough privilege to talk on the dbus.
note: The magic numbers come from /usr/include/wireless.h. They are
(definitely hexadecimal):
/* IW_AUTH_PAIRWISE_CIPHER and IW_AUTH_GROUP_CIPHER values (bit field) */
#define IW_AUTH_CIPHER_NONE 0x00000001
#define IW_AUTH_CIPHER_WEP40 0x00000002
#define IW_AUTH_CIPHER_TKIP 0x00000004
#define IW_AUTH_CIPHER_CCMP 0x00000008
#define IW_AUTH_CIPHER_WEP104 0x00000010
/* IW_AUTH_80211_AUTH_ALG values (bit field) */
#define IW_AUTH_ALG_OPEN_SYSTEM 0x00000001
#define IW_AUTH_ALG_SHARED_KEY 0x00000002
#define IW_AUTH_ALG_LEAP 0x00000004
Still to be done: Test with school server and collaboration.
#!/usr/bin/python
import dbus
bus = dbus.SystemBus()
eth0 = bus.get_object('org.freedesktop.NetworkManager',
'/org/freedesktop/NetworkManager/Devices/eth0')
nmself = bus.get_object('org.freedesktop.NetworkManager',
'/org/freedesktop/NetworkManager')
nmsi = dbus.Interface(nmself, dbus_interface='org.freedesktop.NetworkManager')
#One of these three depending on WEP keylength.
nmsi.setActiveDevice(eth0, 'ESSID', 0x01)
#nmsi.setActiveDevice(eth0, 'ESSID', 0x02, 'fadded1337', 1)
#nmsi.setActiveDevice(eth0, 'ESSID', 0x10, '01234567890123456789abcdef', 1)
_______________________________________________
Devel mailing list
[email protected]
http://lists.laptop.org/listinfo/devel