but why?

i write stuff down

t-mobile 3g stickage Monday: June 15th - 2009

Filed under: foss, linux — whyohwhyohwhyoh @ 12:26 am
Tags: , , , , , ,
old skool phone modem

old skool phone modem

i’m not t-mobile’s biggest fan by any means but i do like the idea of having a selection of 3G providers to choose from.

so i’ve ended up with this 3g usb stick from t-mobile which “works on windows and osx” – *sigh*

still, i’ve seen a few of these on vodafone and you just plug them in and NetworkManager does the rest, right?

well, almost.  if you’re still back on fedora 10 (what’ve you been doing all week?!) then you’ll need to do something (called ‘usbmodeswitch’) to switch the stick from ‘zerocd’ mode into 3g modem mode – in fedora 11 that’s done for you (by hal i think).  but then when you try to connect it fails.

googling around i found lots of people saying it doesn’t work if the settings have a blank username and password – doesn’t matter what they are as long as they’re not blank.  well i tried that but it made no difference.

tried calling t-mobile support who were moderately helpful and did say that i should try “user” and “pass” but that didn’t  help either.

they also said that there’s some other software you can download that sorts it all out for you.  more googling found ‘hsoconnect’ hosted on pharscape.org which was, at that time, blacklisted by google for apparently hosting viruses!  eek.

went to the t-mobile shop today and got the same story from them.  also they can’t swap the stick for a different model and they can’t accept it back from me either – i have to call support again.

so, thought i’d have another try at hsoconnect. pharscape.org is no longer blacklisted!  bit of a problem with the latest release because it’s python2.5-based but fedora 11 has 2.6.  then i found a beta version which runs on 2.6.  hoorah!

once i’d found that you have to create folders for it before you run the installer it finally ran … and failed.  reading some more comments it turns out that hsoconnect only ever works if you configure it yourself with username, password and APN.  APN?  ah ha!

tracked down the APN here … success!  then i thought, maybe that’s what the problem was all along …. and now i’m typing this using the 3g stick connected by NetworkManager! (well, i was, right up until t-mobile blocked me from finding a picture on flickr – even though the chap who sold it to me assured me he’d removed the block.  grrr.)

so, if you’ve got fedora 11 and a new uk t-mobile 3g stick you need to know:

go to the ‘connection settings’ in NetworkManager.

go to the mobile broadband connection and edit it.

set the username and password to anything non-blank.

set the APN to general.t-mobile.uk

success!  :-D

 

Fedora 10 beta on eee pc 901 – take 2 Monday: October 27th - 2008

Filed under: linux — whyohwhyohwhyoh @ 2:41 pm
Tags: , , ,

* before i forget – there’s an odd bug where if you press ctrl– to shrink the text in gnome-terminal it crashes.  i should track that down at some point but it’s certainly there in the f10beta livecd. … seems to be fixed after an update. – ah! actually i think it’s just that with compiz enabled the window resizes itself off the screen.

this time i set up /boot on RAID1, the rest of the 4G disk and a matching chunk of the 16G as a RAID0 physical volume  with /home on it and the rest as another physical volume with / followed by a 1G swap partition.

the 480 updates took 11.5 hours to complete.  no errors so far as i can see.  no new updates to apply.

so, let’s try rebooting from kernel-2.6.27-0.352.rc7.git1.fc10.i686 to kernel-2.6.27.4-47.rc3.fc10.i686

i’ll edit the grub boot line so it’s not quiet or graphical and i’ll press escape if the blue bars appear at the bottom of the boot screen so i can see what happens.  also, i’ll do a shutdown and power on rather than just a restart.

——-

it’s absolutely fine.  no problems at all.  *sigh*

new things:

  • the add/remove software window doesn’t have a maximise button and appears maximised by default.  if you unmaximise it (by dragging) you can’t re-maximise or resize it.  with desktop effects enabled it appears small by default – so you can’t use it.
  • the first attempt to add more software produced an odd error.  just clicking apply again has worked with a message that “An untrusted package was installed”.
  • i installed google gadgets.  clicking Run when it finished either didn’t work or it crashed.  running it again from the menus worked.
    • another software install – another ‘run not working’ – so i don’t think it crashed.
  • i’ve discovered the neon theme for cairo-dock – it’s pretty!

    eee desktop screenshot

    eee desktop screenshot

  • installed the wireless drivers from the development part of the fusion repo.  success!  (you don’t need to reboot – just modprobe rt2860sta and wait a few seconds for NetworkManager to pick up some networks.)  of course, the moment it starts working a new kernel becomes available in rawhide.
  • also discovered that the black variant of the most excellent comix cursors have a super-nice little featurette – the ‘bar’ cursor that appears over text has a red bar.  super-nice.
  • i had intended to do lots of carefully controlled restarts to pin down the problem if it reoccurred .. but i wasn’t concentrating and accidentally did a default reboot.  i’ve done a couple more since then – no problems.

happy now.  :-)

 

eee 901 wireless on fedora 10 Saturday: October 25th - 2008

Filed under: linux — whyohwhyohwhyoh @ 12:56 am
Tags: , , , , , , , ,

along with the 1.8.0 driver there’s an intriguing WebUI file.  not sure what it is but the install script builds some stuff (possibly including the driver) and then starts firefox pointing at a local server running on another port.

don’t forget to install make, gcc and kernel-devel before running the script!

Error unpacking rpm package glibc-common-2.8.90-14.i386
エラー: アーカイブの伸長に失敗: ファイル /usr/share/i18n/charmaps/ISO_6937-2-25.gz;490266ab: cpio: open

for the WebUI you also need openssl-devel

of course, the kernel-devel package it’s picked up isn’t the right one for the original kernel – that’s not available through yum.  so we’ll have to update the kernel and reboot…..

oooh, while i’m waiting for the kernel to install – watching videos with compiz enabled works fine now!  :-D

although that reminds me – with a 5.1ch ogg movie playing in totem all i’m hearing is the rear channels no matter what sound options i select – at least that’s what happened  on F9.

had filesystem problems when i rebooted and it wouldn’t accept my root password.  booted with the old kernel and it still had the fs probs but accepted my password and fsck’d the problems.  now i’m back with the latest kernel.

looks like the driver compiled okay – and it’s done its mad “and copy the file to /tftpboot” thing as before.  let’s try that WebUI thing again…

the script uses zenity to pop up prompts – extremely slow if you’ve got input methods enabled.  lots and lots of compiling but it still doesn’t work.  whatever, back to the actual driver…

hmm.  it looks like it’s loaded okay.  there’s a ra0 device but networkmanager hasn’t spotted it and i can’t ifup it or rmmod the module.  time for another reboot i think….

didn’t help much.  i can rmmod and modprobe now but nothing happens.

tried adding “alias ra0 rt2860sta” to /etc/modprobe.conf …. no change.

running the webui thingy adds the ra0 interface and locks up the module.  doesn’t appear to have any other effect though. … oh, apart from allocating it an IP6 address.  hmm.

guess i’d better install these 460 updates!  good old rawhide.

on the plus side, fiddling around with this has revealed that there is a monitor mode.  iwconfig ra0 mode monitor works!

 

welcome to fedora 10 Beta Friday: October 24th - 2008

Filed under: linux — whyohwhyohwhyoh @ 11:13 pm
Tags: , , , , , , , ,

so, almost first impressions:

  • had to install from livecd again – no problems except that, as with f9, the window doesn’t fit until you reduce the font size from 10 to 6pt.  (the font properties window is too big too!)
  • i’ve accepted the default layout this time – no RAID weirdness.
  • like the funny little coloured  bars (white, light blue and blue) during the initial boot.
  • near the end of startup something crashes just before X starts.  i think it happened with the liveCD too.
  • starting X for firstboot takes forever but i think it did that for fedora 9 too.
  • enabling desktop effects for the first time leave a lot of the screen black – needs a redraw.  changing workspaces fixes that.
  • the adobe repo works as does flash (from that repo)
  • the wireless drivers still haven’t arrived in the kernel
  • SELinux is preventing alsactl (alsa_t) “getattr” to /usr/share/alsa/alsa.conf (usr_t).

now to try out the suspend stuff…

on AC:

selecting suspend from the battery status icon suspends (even though it looked like it was about to hibernate because it took ages and went into text mode and displayed some messages)

screen brightness Fn keys still work – there’s no OSD but ‘dim on idle’ seems to work.

suspend on idle works too just the same.

suspend on lid works fine too.  a lot faster but i think that’s just because some system stuff was busy thrashing the disk earlier.  opening the lid doesn’t wake it up – you have to press a key (same as in F9 – presumably it’s a eee thing).

on battery… (screen dims and OSD shows)

suspend from the icon works.

suspend on idle… hibernates!  (that’s probaby what was happening on F9 too) hmm.  seems to be a bit smarter than before – removes cache and “shrinks memory” before writing memory to disk – but it took a looooong time to start up again.

suspend on lid works.

so that’s still annoying – if you’re running on batteries you have to remember to shut the lid otherwise it’ll hibernate.  boo.

but they’ve fixed the screen brightness on resume – hooray!

 

fedora 9 on the eee pc 901 Friday: October 24th - 2008

Filed under: foss, linux — whyohwhyohwhyoh @ 6:40 pm
Tags: , , , , , , ,

i need to make a note of all the behaviours of fedora 9 on my eee pc 901 before installing fedora 10 beta on it.

main points are:

  • have to build wireless drivers from source from here – currently version 1.8.0 – which is, hopefully, the same as the 1.7.0 i used plus the patches i had to apply!
  • the wireless driver doesn’t appear to have a monitor mode
  • without a usb dvd drive you have to boot from the SD slot or an external usb hard drive. this works with livecd (if you’ve got the livecd creator tools) but not with the DVD image.
  • after a suspend/resume the brightness control doesn’t work
  • suspend by closing the lid works fine but suspend on idle does a hibernate instead
  • there’s noise from the speakers if they’re not muted – which is a shame on an utterly silent system
  • occasionally the back-light switches off (possibly only after screensaver and screen blank when on AC) and it doesn’t come back on until you use a Fn brightness key. it’s still possible it’s actually any key and it’s just gone to sleep
  • 3D works pretty well for compiz but it goes a bit wrong when you try running a 3D or Xv (video) app at the same time – particularly troublesome when that app defaults to fullscreen mode – e.g. blender or miro. watching DVDs or using stellarium or blender is fine with compiz disabled
  • no middle mouse button (big problem in blender) and we’ve moved to xinput driver so it’s a bit of a pain enabling support again – i created /etc/hal/fdi/policy/3button.fdi with
    <match key="info.product" string="ImPS/2 Logitech Wheel Mouse">
     <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
    </match>

    in it.  can’t remember where i read that – i think it’s the sum of several hints and previous hal experience.

  • sometimes if you type too fast keystrokes (especially shift keys) are missed
  • when compiz is enabled you get a brief flash of the desktop before the password prompt is displayed when the system has been locked or suspended
  • sometimes networkmanager disables networking entirely – not sure why.  i think it only happens after a suspend/resume – but only occasionally.
  • 3D does have its limits – flightgear manages only a couple of frames per second (might not have anything to do with the 3D and might be fixable in the settings) – celestia doesn’t work at all and google-earth runs a several seconds per frame.  also i’ve switched off the compiz cube as there’s a little bit of tearing when it spins.  the left/right slide is much more understated anyway.
  • many bad apps assume you’ll have 600 vertical pixels to play with.  i think there might be a compiz plugin to run the entire screen like a virtual display scaled down – i’ll see if i can find that.
  • everything looks sooo pretty on it that  a) i’ve forgotten how hideous the ‘pearl white’ plastic is and b) i really don’t want to do a clean re-install.

on the plus side:

  • the screen is very nice
  • it plays DVDs – we’ll see how it copes with HD content soon
  • desktop effects, google gadgets and cairo-dock look great
  • it’s completely silent
  • battery life is good – 4-6 hours
  • i’ve installed all the good office, internet and graphics apps without problems
  • it fits in a small bag
  • i can afford it
  • it certainly runs F10 to some extent
  • you can jam a custom touch screen and 3G slot inside it!

happy days.

well, that’s as much as i can remember for now.  on with the show – let’s trash it and stick F10 beta on instead.

oh yes, the 901 actually has two SSDs – 4G + 16G for linux, 4G + 8G for windows.  nice.  so i tried partitioning them with some RAID stuff.  here’s some hdparm numbers for F9:

cached reads (memory speed) are around 550MB/s

the 4G disk goes at around 26-28MB/s

the 16G at around 24-27MB/s

RAID1 at around 24-26MB/s

RAID0 at around 30MB/s

with O_DIRECT (unbuffered):

4G 31MB/s

16G 28.5MB/s

RAID1 31MB/s

RAID0 30MB/s

STYG

 

the network is alive! Sunday: July 20th - 2008

Filed under: linux — whyohwhyohwhyoh @ 6:02 am
Tags: ,

i’ve just rebooted my main PC and all the network interfaces came back to life.  that’s the first time since the upgrade to fedora 8 last November.

even more scary – the virbr0 interface has reappeared so it’s just about possible that my VMs will work again too.

guess it must be time to upgrade to fedora 9 then.

all this (the fixing, not the breaking) was brought about by finally tracking down the /etc/udev/rules.d/70-persistent-net.rules file, doing man udev and setting debug in /etc/udev/udev.conf (but actually using the udevcontrol command mentioned in the comments of that file).  to their great credit, redhat pointed me at that (persistent-net.rules) file when i raised the problem as a weirdly worded bug when it happened – but i was a bit confused about what i was trying to fix at the time.

the real problem was that those rules try to maintain network card to interface name relationships by using the hardware address on the card.  that’s fine except that the sky2 device on my motherboard seems to have a zero address – which doesn’t work so well.  i changed the rule to use the vendor and product ID instead on the assumption that i won’t install another of the same device.  i still don’t know if that rule is actually working or if it’s just failing all the rules now and defaulting back to the name assignment i want.

udevinfo -a -p /sys/bus/pci/drivers/sky2/0000\:02\:00.0/ was useful for finding out that stuff for the rules.

now all i need is a way to set the hardware address properly.  at the moment i’m doing it with ifconfig eth0 hw ether 12:34:56:78:90:ab from /etc/rc.local.  discovered modinfo but that didn’t help.  you can run a command from the udev rules – that’s probably the answer.

clearly though, i still don’t understand the udev rules.  as far as i can understand those files i now have a specific match for each network device on my system, each of which sets that device to a nice, unique name.  even so, the system says it can’t rename one of them during udev startup.  grrrr.

 

geek goodness Wednesday: November 21st - 2007

Filed under: achieve!, foss, homebrew, linux — whyohwhyohwhyoh @ 7:31 pm
Tags: , , , , ,

last night was proper geek time for me. last year i hacked together an old webcam and a 35mm lens cap so that i could attach a second-hand zoom lens to the webcam. it kind of worked but the pictures were weird (see my little profile icon here) and it was hard to use.

say cheese

well, now i’ve found a use for it – as a barcode scanner!

i’ve got another webcam but it can’t produce a big enough image of a normal barcode. my zoom lens cam works well. mind you, the webcam isn’t great quality and the lens is old and dirty and i’ve not looked after either whilst sticking them together or since, so the pictures are a bit iffy.

muck

so, i found zebra – a bit of FOSS software that can scan in barcodes. had to install a few devel packages on fedora 8 to get it to compile. then i had to modify the code to get it to talk to the second webcam, not the first.

it still refused – turns out the webcam only supports GREY or YUV420p formats but the code only supports RGB24. a quick bit of googling and wikipediaing and coding and we had it accepting YUV420p and reading the black and white data correctly. … and barcodes appeared!!

can you tell what it is yet?

another fix was required to the zebra scanner so that it includes the check digit in its output – the searches didn’t work without it.

EAN-13: 0702727136221
EAN-13: 5060067000844
EAN-13: 5060034578109
EAN-13: 5022366552943
EAN-13: 5055201800763

the next nice find on the net was barcodepedia. loverly. great idea. didn’t have many of the DVDs i scanned. plus it looks like i might have broken it by pestering it with searches. sorry about that.

5022366552943 – Ghost in the Shell [Region 2] on Barcodepedia.com
5023965343321 – Katakuri-ke no kôfuku on Barcodepedia.com
5023965347428 – Mou gaan dou on Barcodepedia.com
5023965350220 on Barcodepedia.com
5023965351227 on Barcodepedia.com

however, it did know about manufacturer codes, so even if it doesn’t know what DVD it is you can still find out who made it.

whilst looking at these extra details and trying it out on a book i saw that the barcode is actually the ISBN number. so i googled for an online ISBN search and was reminded to look at amazon.

and that made me think of just passing the barcode values to amazon in the first place – which works!

a little bit of scripting later and i can now point books and DVDs at my hacked up webcam and the titles from amazon pop up on the screen. :-)

Tenchi Muyo! DVD Ultimate Collection (NTSC)
Wario Ware: Smooth Moves (Wii)
Azumanga Daioh – Vol. 1
Azumanga Daioh – Vol. 2
My Wrongs #8245-8249 & 117 [2002]
At The Height Of Summer [2001]
Ghost in the Shell: Stand Alone Complex – Solid State
Ghost In The Shell [1995]
The Happiness Of The Katakuris [2003]
Infernal Affairs [2004]
The Hitchhikers Guide to the Galaxy (2 Disc Edition) [2005]

next up – get more details from amazon and/or barcodepedia and save them to a CSV or XML file that gcstar can read.

 

qemu/kvm and linux suspend anger Tuesday: November 20th - 2007

Filed under: linux — whyohwhyohwhyoh @ 2:04 pm
Tags: ,

hello!

i’ve been trying to make sure that the VM running XP on this laptop survives the system going into suspend.

first problem – virt-manager (i think) has set things up so that XP got installed without ACPI and without APM. so XP can’t shutdown or reboot the VM. advice here sorted that, but the advice says it’s for Windows 2000 and i’ve not found the same information elsewhere.

second problem – so now XP is on APM and i don’t think it supports sleep modes. so i want to add suspend/resume scripts to linux to stop and start the VM. where are the scripts? lots of googling and everyone seems to agree that they’re in /etc/pm. are they? nope. there’s empty folders there but something’s up. and anyway, i’ve no idea what to put in those folders. tripped over the answer here – now how on earth was i supposed to know about that?! grrr.

still plenty of tricks to sort out there – can we actually get XP on qemu to suspend? if so then can we get it to realise the sleep event has occurred, either automatically or via another linux script? and resume when the system wakes? also, if we do have to just shutdown and restart the VM from the pm scripts then i need to solve the shutdown thing because at the moment virsh shutdown just powers off. could be a simple VM config option.

had to get this off my chest.

 

Achieve! – Week 45 Sunday: November 11th - 2007

Filed under: achieve!, milestone, programming — whyohwhyohwhyoh @ 12:50 am
Tags: , ,
  • reached 1000th word in Japanese vocabulary quiz. it was “recently”. (今度)
  • cycled again .. twice! – it’s been a while
  • put grapher on hold to focus on table merging
  • cooked food from actual ingredients
  • chopped up parts for another monitor stand and built it
  • tried switching off fans – got freaked and turned them back on
  • finished a book
  • manually removed remaining spam from a few years of emails
  • upgraded athlon PC to F8 – it’s not very happy about that!
  • wrote new OS GML loader
  • joined freecycle and passed on a telly
  • tidied up slightly

11112007120

 

the way i want my computer to work Sunday: November 4th - 2007

Filed under: foss, ideal world, linux — whyohwhyohwhyoh @ 10:45 pm
Tags:

prompted by the post about PackageKit requesting better names, i’m wondering if we need to stop worrying about whether it’s called “software” or “packages” or “applications” or “programs” and instead get on with the idea of task or function-based usage.

rather than picking software from a list of what “office” applications are available, or even a list of “popular spreadsheet applications” we should get back to the “what do you want to do” model and provide an interface that starts (or installs and then starts) all the software you’ll need to do that thing.

doesn’t cover the scenario, “i just want to see what kind of things i can do” – but i guess you could always have a “random” button and a “popular tasks” (“do what everyone else does”) button. maybe a “recent tasks” list and a “do what everyone else is doing” button which is really “popular recent tasks”.

it might be nice to add into those task lists some items that reflect the hardware available in this particular PC. especially anything added recently or which is unusual.

i don’t mean a pop-up message, “you seem to have installed a new graphics card. do you want to play a game?” but something more subtle. fancy 3D games, flight sims, planetaria and 3D design tasks might appear nearer the top of the list than usual, that’s all.

ha! the control panel for the task list could be a set of sliders (“on a scale of one to ten, where one is….”!):

  1. i just bought a PC, it came with a bunch of stuff |—————-| if it’s there i want to use it
  2. i like to do what everyone else does |—————-| i like to do my own thing
  3. i do the same stuff every day |—————-| i never know what i might do next

i’m hoping something like that will come out of the applications part of mugshot and the online desktop project but we also need a better way of describing the tasks each application is capable of.

i guess this needs to be a list of inputs, outputs and processes (internally – the user doesn’t see this) – file formats, sources and destinations, devices and functions.

for example, a simple web browser has:

  • inputs “html from web”
  • outputs “screen”
  • no processes

whereas a simple word processor has:

  • inputs “document from file” and “user on keyboard”
  • outputs “screen” and “document to file”
  • processes such as “capitalise”

hmm. the lists could get quite big but that’s okay as long as they can be searched. then help files can be built on top of that metadata as well. then the “what task” system can start by searching the ‘processes’ list, then check the ‘in/out’ list and finally scan the help text.

application usage stats can be extended to cover which ‘processes’ were used and which types of inputs and outputs. when software updates are available the system can report to the user any update highlights, emphasising things which affect processes the user uses as part of their tasks.

this is all getting close to COM+ isn’t it? urk. i hate it when they get things right.

another extension to the apps usage metadata could come from the user as well as the apps themselves – are they being used for fun or for ’serious’ stuff. then a ‘what mood am i in?‘ slider(s) could be part of the desktop control panel.

keep an eye on keyboard/mouse activity, watch the current music/video playlist, look at the time of day and time of year, connect the mic and webcam to some biometrics software and we might be able to make some frighteningly good suggestions in the tasks lists! eek.

here’s a hypothetical conversation between the system and the user when what they want isn’t in the lists:

system: what do you want to do (today ;-) )? (search/find, view/open/see/look, create/record, update/modify/edit/change/process/filter, is there anything else? copy/duplicate?)

user: i want to look at something.

system: what do you want to look at?

system opens the ’stuff finder’ – which searches files, emails, etc and the web.

user (to self): ah. right, i want to find something and then i want to look at it.

user finds object or page (link in results) and clicks on it to view.

system: okay! what do you want to do next?