Network configuration applet for squeezeplay

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
Post Reply
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Network configuration applet for squeezeplay

Post by Wilberforce »

I wrote a frontend to wicd (the network configuration daemon) for squeezeplay and thought it may be of some use. You can grab it here.

FAQ

why did you make this?

I use my joggler purely as as a squeezeplay client.

what can you configure?

Wired and wireless networks. It has support for hidden essids and will remember wireless passwords for different networks - WPA passphrases are automatically hashed to a PSK by wicd.

I have tested the wireless configuration with my WPA secured wireless network.

why didn't you use network manager?

wicd didnt want to pull in as many dependencies and as I run ubuntu on the internal flash, space is limited.

why is the dbus mashalling such a hack?

At the time I didnt see someone had made lua bindings for dbus, so i hand coded the calls in C using glib-dbus. The code for this is in the wicdbridge folder - there is also a compiled version in the lib directoy of the applet.

Will you release your ubuntu image for the internal mmc?
Of course - if there is any interest. It is essentially ubuntu 11.04 minimal with buzz's kernel, scripts and drivers and rhubarb's squeezeplay.

image now available here : http://www.jogglerwiki.com/forum/viewto ... ?f=2&t=605

Any bugs, just let me know!

Useful features of wicd
  • Auto reconnect to wired/wireless networks if connection lost
  • Auto switch to wired if cable plugged in
Experimental (untested)
  • Support for usb networking dongles
Supported encryption types
wpa 1/2
wpa-psk (preshared)
wep
wep (preshared)
wep hex
wep-leap
wpa-leap
wpa2-leap
wpa2-peap

Demo youtube videos
wireless/dhcp
wired/ manual address settings

How to install post

Updates

05/06/2012 - Just pushed wireless auto-reconnect fix to git (thanks kroonen for discovering and testing)

TODO

Will probably only do these if there is enough interest.
  • clean up logging
  • use internationalization features - so people can translations to strings.txt
Last edited by Wilberforce on Wed Jul 04, 2012 7:06 pm, edited 12 times in total.
fattybacon
Posts: 11
Joined: Mon Apr 16, 2012 12:42 pm

Re: Network configuration applet for squeezeplay

Post by fattybacon »

That's exactly what I want to use my joggler for. Was trying to limp along with native OS and various hacks but realised if I want to access remote files I was going to need a proper 'mount' and/or cifs. So, I'd be very interested in a minimal OS that only runs squeezeplay.
User avatar
roobarb!
Posts: 1746
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Network configuration applet for squeezeplay

Post by roobarb! »

Funnily enough, I may have something similar that I've been working on... ;)

There's a new version of SqueezePlay available now with some reasonably sizeable improvements (such as an update applet and no need to install from the command line on the Native OS). Keep an eye on the SqueezePlay for Joggler thread, because something else may appear there in the next week or so.

Not tried your applet, Wilberforce, but it appears rather more sophisticated than mine!
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: Network configuration applet for squeezeplay

Post by Wilberforce »

Just fixed some bugs regarding authentication with an encrypted wireless network - thought wicd detected encryption but this has to be manually set (previous test only worked because I didnt clear my wireless-settings.conf!). Encryptions that should now work:
wpa 1/2
wpa-psk (preshared)
wep
wep (preshared)
wep hex
wep-leap
wpa-leap
wpa2-leap
wpa2-peap
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: Network configuration applet for squeezeplay

Post by Wilberforce »

I made a couple of quick videos showcasing the applet in action (recorded on the joggler so excuse the slight slowdown):
wireless/dhcp
wired/ manual address settings
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: Network configuration applet for squeezeplay

Post by Wilberforce »

I have added support for this to be called from SetupWelcome (thanks to roobarbs applet). I haved attached a patch to convert roobarbs release to use this applet. To use:

Download the attached patch and place in /opt/squeezeplay, then issue:

Code: Select all

cd /opt/squeezeplay
patch -p 1 < network_wicd_roobarb.patch.txt
Download the latest source tarball( or checkout with git) from:
https://github.com/cowboy-coders/squeez ... all/master

copy the SetupNetworking applet folder to /opt/squeezeplay/share/jive/applets

install wicd with :

Code: Select all

sudo apt-get update

Code: Select all

sudo apt-get install wicd-daemon
make sure you /etc/network/interfaces only contains the following:

Code: Select all

# The loopback network interface
auto lo
iface lo inet loopback
Then you should be good to go!

If your package manager installs a version of wicd less than 1.7.2.2 then you may need to grab the source tarball from https://launchpad.net/wicd/1.7 (just follow the instructions in INSTALL)
Attachments
network_wicd_roobarb.patch.txt
(17.66 KiB) Downloaded 421 times
Last edited by Wilberforce on Tue Jun 05, 2012 12:44 am, edited 1 time in total.
User avatar
roobarb!
Posts: 1746
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Network configuration applet for squeezeplay

Post by roobarb! »

Wilberforce wrote:I have added support for this to be called from SetupWelcome (thanks to roobarbs applet). I haved attached a patch to convert roobarbs release to use this applet.
Cool. :)

I really need to check this out. Just whizzed through your videos and it looks impressive.
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
gadget_hunter
Posts: 11
Joined: Sun Jun 03, 2012 5:34 pm

Re: Network configuration applet for squeezeplay

Post by gadget_hunter »

Cool applet :)
As a newbie, it obiously does not work right away. :(
I installed the roobarb patch, which worked.
I moved the SetupNetworking folder into the described location. But now I am not sure where to put the other files and folder ( wicdbridge etc). While running the command: sudo apt-get install wicd-daemon I receive as follows:

Code: Select all

Reading package list... Done
Building dependency tree
Reading state information.. Done
E: Couldn't find package wicd-daemon
Any Ideas?
Thanks
Joerg
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: Network configuration applet for squeezeplay

Post by Wilberforce »

You only need to worry about the wicdbridge folder if you want to compile the shared objects for the dbus calls yourself. Some precompiled versions should be in the lib folder of the SetupNetworking applet.

With regards to the error you got whilst trying to install wicd-daemon, did you run

Code: Select all

sudo apt-get update
first (to populate the package list)?

Which operating system are you running by the way?

Edit: let me know if you are wanting to compile the libraries yourself (and need a hand) and sorry for the dodgy instructions!
gadget_hunter
Posts: 11
Joined: Sun Jun 03, 2012 5:34 pm

Re: Network configuration applet for squeezeplay

Post by gadget_hunter »

Many thanks for your advise. Update was running smoothly and command to install the wicd-daemon worked as well. I have roobarb's squeezeplay OS running from a USB stick. I think it installed a lower version than 1.7.2.2 of wicd.
Also I don't know how to get root access to change the interface file which still has written as follows:

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet dhcp
Joerg
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: Network configuration applet for squeezeplay

Post by Wilberforce »

To become root you can do:

Code: Select all

sudo su
and to logout:

Code: Select all

exit
or prefix sudo to your favourite editor (eg. for nano) :

Code: Select all

sudo nano /etc/network/interfaces
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: Network configuration applet for squeezeplay

Post by Wilberforce »

The applet should load now that you've got wicd installed (will probably need to restart squeezeplay).

The only reason I specify 1.7.2.2 is because they fixed a root exploit in wicd around 1.7.1 and an early version of the fix over sanitized user input (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=669388 if interested). This was fixed in 1.7.2.2.

I used to use an older version (not sure which) whith no problems. The problem you'll see is that it won't properly assoicate with your wireless network and will fail to obtain an ip.
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: Network configuration applet for squeezeplay

Post by Wilberforce »

You may also want to copy org.wicd.daemon.service from the wicdbridge directory to /usr/share/dbus-1/system-services/ to start wicd (if not already running) when a dbus call is made (i.e starting the applet). However, as wicd by default is set up to start on boot you won't need this unless you try to start the applet before wicd loads in the boot process!
gadget_hunter
Posts: 11
Joined: Sun Jun 03, 2012 5:34 pm

Re: Network configuration applet for squeezeplay

Post by gadget_hunter »

I assume nano does not run with putty, as I cannot use the commands (i.e ^O to save or ^X to exit). Sorry I am a retard with linux.
EDIT: I found it out :D

Ok will work on it now, hope I have luck.
Will report back.
Many thanks for your help.
gadget_hunter
Posts: 11
Joined: Sun Jun 03, 2012 5:34 pm

Re: Network configuration applet for squeezeplay

Post by gadget_hunter »

Couldn't get it to work, but this is related to my incompetence in Linux. :oops: However it is working now, after I found your topic ' Squeezeplay image for internal mmc ' http://www.jogglerwiki.com/forum/viewto ... ?f=2&t=605. Wrote it on my USB stick and loaded from there. Your wireless applet works great and I could leave my WEP setup unchanged. Thank you very much for your work. Joerg
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: Network configuration applet for squeezeplay

Post by Wilberforce »

gadget_hunter wrote:Couldn't get it to work, but this is related to my incompetence in Linux. :oops: However it is working now, after I found your topic ' Squeezeplay image for internal mmc ' http://www.jogglerwiki.com/forum/viewto ... ?f=2&t=605. Wrote it on my USB stick and loaded from there. Your wireless applet works great and I could leave my WEP setup unchanged. Thank you very much for your work. Joerg
No worries. I thought you might have been the first to get it working (must have been close)!

Edit: One thing worth mentioning is that in that image I use this patch to add support for wep ad-hoc.
gadget_hunter
Posts: 11
Joined: Sun Jun 03, 2012 5:34 pm

Re: Network configuration applet for squeezeplay

Post by gadget_hunter »

I am fine with the applet as it is, only had to add the patch for 'auto enable' the wifi connection. Happy now:)
hansel
Posts: 20
Joined: Thu Oct 13, 2011 2:37 pm

Re: Network configuration applet for squeezeplay

Post by hansel »

My Joggler with SqueezeplayOS needs 73 new packages (12.9MB of archives, 76.9MB of additional disk space will be used) when I call

Code: Select all

sudo apt-get install wicd-daemon
See details below.

Code: Select all

joggler@joggler:/opt/squeezeplay$ sudo apt-get install wicd-daemon
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  aspell aspell-en consolekit dbus dbus-x11 defoma dictionaries-common fontconfig gconf2 gconf2-common
  hicolor-icon-theme hunspell-en-us libaspell15 libatk1.0-0 libatk1.0-data libavahi-client3 libavahi-common-data
  libavahi-common3 libcairo2 libck-connector0 libcups2 libdatrie1 libdbus-glib-1-2 libeggdbus-1-0 libenchant1c2a
  libffi5 libgconf2-4 libglade2-0 libgstreamer0.10-0 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libhunspell-1.2-0
  libidl0 libjasper1 libnotify1 liborbit2 libpam-ck-connector libpango1.0-0 libpango1.0-common libpolkit-gobject-1-0
  libsexy2 libstartup-notification0 libthai-data libthai0 libtiff4 libwnck-common libwnck22 libxcb-atom1 libxcb-event1
  libxcb-render-util0 libxcb-render0 libxcomposite1 libxcursor1 libxft2 libxml2 libxres1 notification-daemon
  python-cairo python-dbus python-glade2 python-gobject python-gtk2 python-iniparse python-notify python-support
  python-wicd sgml-base shared-mime-info wicd-gtk x-ttcidfont-conf xml-core
Suggested packages:
  aspell-doc spellutils defoma-doc psfontmgr dfontmgr libfont-freetype-perl ispell emacsen-common jed-extra
  gconf-defaults-service hunspell openoffice.org-hunspell openoffice.org-core cups-common libenchant-voikko
  gstreamer0.10-tools gstreamer0.10-plugins librsvg2-common gvfs libjasper-runtime ttf-japanese-gothic
  ttf-japanese-mincho ttf-thryomanes ttf-baekmuk ttf-arphic-gbsn00lp ttf-arphic-bsmi00lp ttf-arphic-gkai00mp
  ttf-arphic-bkai00mp python-dbus-doc python-dbus-dbg python-gtk2-doc python-gobject-dbg python-numpy sgml-base-doc
  pm-utils debhelper
The following NEW packages will be installed:
  aspell aspell-en consolekit dbus dbus-x11 defoma dictionaries-common fontconfig gconf2 gconf2-common
  hicolor-icon-theme hunspell-en-us libaspell15 libatk1.0-0 libatk1.0-data libavahi-client3 libavahi-common-data
  libavahi-common3 libcairo2 libck-connector0 libcups2 libdatrie1 libdbus-glib-1-2 libeggdbus-1-0 libenchant1c2a
  libffi5 libgconf2-4 libglade2-0 libgstreamer0.10-0 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libhunspell-1.2-0
  libidl0 libjasper1 libnotify1 liborbit2 libpam-ck-connector libpango1.0-0 libpango1.0-common libpolkit-gobject-1-0
  libsexy2 libstartup-notification0 libthai-data libthai0 libtiff4 libwnck-common libwnck22 libxcb-atom1 libxcb-event1
  libxcb-render-util0 libxcb-render0 libxcomposite1 libxcursor1 libxft2 libxml2 libxres1 notification-daemon
  python-cairo python-dbus python-glade2 python-gobject python-gtk2 python-iniparse python-notify python-support
  python-wicd sgml-base shared-mime-info wicd-daemon wicd-gtk x-ttcidfont-conf xml-core
0 upgraded, 73 newly installed, 0 to remove and 23 not upgraded.
Need to get 12.9MB of archives.
After this operation, 76.9MB of additional disk space will be used.
Do you want to continue [Y/n]?
Wilberforce
Posts: 134
Joined: Sun Apr 15, 2012 4:52 pm

Re: Network configuration applet for squeezeplay

Post by Wilberforce »

Yeah, sorry - that package is bringing in all the gui depenencies. I meant to put these notes up a while a go (which may help):

Code: Select all

apt-get update
sudo apt-get install liblua5.1-0 wicd-cli patch

(add user joggler to netdev group - press space on check box, then return) 

cd /opt/squeezeplay
wget http://www.jogglerwiki.com/forum/download/file.php?id=334 -O net.patch
patch -p1 < net.patch

chmod a-x /opt/squeezeplay/share/jive/applets/JogglerNetwork

cd ~
wget https://github.com/cowboy-coders/squeezeplay-wicd-frontend/tarball/master -O network.tar.gz
tar -xvf network.tar.gz
mv cowboy-coders-squeezeplay-wicd-frontend-ffee972/SetupNetworking /opt/squeezeplay/share/jive/applets/
sudo mv cowboy-coders-squeezeplay-wicd-frontend-ffee972/wicdbridge/org.wicd.daemon.service /usr/share/dbus-1/system-services/
rm -rf cowboy-coders-squeezeplay-wicd-frontend-ffee972/


sudo nano /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback


Getting the wicd-cli package should reduce the number of packages apt is trying to bring in. Any problems just let me know (hopefully we can get the installation instructions to a usable state :D).
Attachments
net.patch.txt
(1.86 KiB) Downloaded 380 times
hansel
Posts: 20
Joined: Thu Oct 13, 2011 2:37 pm

Re: Network configuration applet for squeezeplay

Post by hansel »

Didn't realize untill today that my question has been answered.
I just entered all commands without issues (except for renaming the directory "cowboy-coders-squeezeplay-wicd-frontend-xxxxx" to match current) and will let you know the outcome as soon as I'm able to touch my Joggler. Thank you.
Post Reply