Glamońćanin.net

About

Stuff i did

Welcome to glamocanin.net

Here you will find the "blog" of Slavko Glamocanin. The main purpose of this page is to promote my music, me as a technical person and me as a thinker.

You can find me on facebook for a more personal contact, or on twitter.

Most of the content is in english, but i did not bother to translate from my native slovene language, or setup a dual language page.

Chromium's (chrome) helvetica font issues

01.03.2014

I am a linux user and so i'm used to things breaking. This time it was the web browser Chromium's turn.

Helvetica fonts were displayed horiffically, like they were being render at 4pt and upscaled to 24pt (that 8-bit look:).

After getting familiar with fontconfig I used "fc-match Helvetica" to discover which font file was actually used. Turns out I had some bitmap fonts (.pcf) installed - adobe-fonts (??) and they were scaled beyond all sanity:) 

I removed those fonts (not caring if any proprietary program needed them;) which enabled some pretty good looking alternatives.

Well another day in linux world passes and here's something for you googlers that i couldn't find elsewhere.. a fix.

Signing BlackBerry BAR files for publishing to the AppWorld

20.01.2013

Using the command line tools:
blackberry-signer -verbose -storepass [your store pass] [your bar file name] RDK
blackberry-signer -verbose -storepass [your store pass] [your bar file name] author

After signing you can verify your BAR file with:
blackberry-signer -verbose -verify [your bar file name]

Everything except:
META-INF/MANIFEST.MF
META-INF/AUTHOR.SF
META-INF/AUTHOR.EC
META-INF/RDK.SF
META-INF/RDK.EC

should be prefixed with "sm", which means that the entry is listed in the manifest and signed properly. The AUTHOR.* files are author signatures and the RDK.* are RIM's signatures. You need both:)

The problem i encountered was that the BAR packager (marmalade sdk in my case) left the actual directories inside the zip file.
They are seperate from files and can be removed without removing the files in them and you should do it with:
zip -d SolidDefence.bar META-INF/ native/

Don't forget to add all the directories you have in your zip file to this list, otherwise you will encounter cryptic error messages minutes before the deadline:)

This will solve the "Error: Some files are missing signatures" problem reported by verify and AppWorld:)

For more common signing errors check here: http://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.native_sdk.devguide/com.qnx.doc.native_sdk.devguide/topic/app_signing_errors.html

Now go develop! 
https://developer.blackberry.com/

Bring MidiSport keyboards to life with udev and fxload on linux

25.12.2012

I'm on of those linux users who likes to tinker, and boy do i get the opportunities:)

Things change all the time, specifications, parameters, the way things work, and one of those things is how udev activates USB devices that need custom firmware loading.

For my M-audio Oxygen8 keyboard i need to run "fxload" with the firmware and usb device parameter before it starts working normally. Years ago i snatched an ubuntu targeted udev script for that, just create the file /etc/udev/rules.d/99-midisport-firmware.rules with this content:

# midisport-firmware.rules - udev rules for loading firmware into MidiSport devices

# DEVPATH=="/*.0" selects interface 0 only
# (some udev versions don't work with SYSFS{bInterfaceNumber})

# MidiSport 2x2
ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0", ENV{PRODUCT}=="763/1001/*", RUN+="/sbin/fxload -s /usr/local/share/usb/maudio/MidiSportLoader.ihx -I /usr/local/share/usb/maudio/MidiSport2x2.ihx"
# MidiSport 1x1
ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0", ENV{PRODUCT}=="763/1010/*", RUN+="/sbin/fxload -s /usr/local/share/usb/maudio/MidiSportLoader.ihx -I /usr/local/share/usb/maudio/MidiSport1x1.ihx"
# KeyStation
#ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0", ENV{PRODUCT}=="763/1014/*", RUN+="/sbin/fxload -s /lib/firmware/MidiSportLoader.ihx -I /lib/firmware/MidiSportKS.ihx"
# MidiSport 4x4
ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0", ENV{PRODUCT}=="763/1020/*", RUN+="/sbin/fxload -s /usr/local/share/usb/maudio/MidiSportLoader.ihx -I /usr/local/share/usb/maudio/MidiSport4x4.ihx"
# MidiSport 8x8
ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0", ENV{PRODUCT}=="763/1031/110", RUN+="/sbin/fxload -s /usr/local/share/usb/maudio/MidiSportLoader.ihx -I /usr/local/share/usb/maudio/MidiSport8x8-2.10.ihx"
ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0", ENV{PRODUCT}=="763/1031/121", RUN+="/sbin/fxload -s /usr/local/share/usb/maudio/MidiSportLoader.ihx -I /usr/local/share/usb/maudio/MidiSport8x8-2.21.ihx"

Great, it worked! 

But I use gentoo and a couple of udev upgrades later... it stopped:|

After debugging i discovered that fxload was not getting it's parameter for the device path. The fix is kind of simple, change all run lines to add " -D /dev/%P", like this: 
ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0", ENV{PRODUCT}=="763/1014/*", RUN+="/sbin/fxload -s /lib/firmware/MidiSportLoader.ihx -I /lib/firmware/MidiSportKS.ihx -D /dev/%P"

Also, check the location of the firmware files, this is where we gentooers have them.

Have fun using your M-Audio gear:)

UDPXY + RaspberryPi - rp_filter = TV bridge

24.12.2012

My internet/tv provider uses multicast UDP to bring me my TV signal and usually has some shitty set top box connected with a variety of scart, video and whatever connectors. 

No TVs in my house just monitors, so I decided to use VLC. Downloaded a playlist with the IPs and everything worked nicely but i found that my switches are not smart enough to route multicast traffic and they just pollute the whole network with the IGMP data. (and a 700k+ bandwidth waste on wireless kinda kills it)

Finally i found a nice little utility called udpxy, which creates a TCP server from the multicast UDP data. And being connected via VDSL1, the TV network was separate from the internet network (and also its DHCP server broadcasted shit to my internal network before this solution), so i decided to make a bridge using the RaspberryPi.

I adjusted the playlist from udp://@111.222.33.44:5000 to tcp://[address of the rpi]:4022/udp/111.222.33.44:5000 and the player was set.

Bought a usb->ethernet dongle, which was a lovely case of plug and play (man i love linux, just the next day i plugged a mouse into a windows notebook and was confronted with a driver dialog... yay:D) and the thing was ready to go!!

But not really:) This project was on hold for a couple of months, because the data just wasn't coming through. After a lot of experimenting i found that the "rp_filter" functionality of the kernel is causing problems.

It is meant to keep the packets that obviously don't belong on your network, out. The problem is that the multicast traffic is such an example of a "martian", because the data received is from a different subnet than what the TVs dhcp server assigns you.

So after disabling the rp_filter (echo '0' > to the relevant interfaces in /proc/sys/net/ipv4/conf/*/rp_filter), the traffic started flowing and the system was ready!

I used gentoo as a base image (yes i know i'm a ricer:), so i just installed udpxy, configured the kernel and set everything up as an appliance... after power-on everything is automagically configured.

So here is the little thing between my router and the VDSL modem. In a hastily cut cardboard box:)

Prisel sem do protestnega trenutka, s popolnoma drugega kota.

03.12.2012

V mojem skromnem okrozju, mostah, trznica moste bolj natancno so nastimali parkomate, na katerih so obvestila da veljajo od 1.12.2012 in ce se prijavimo do 1.1.2013 lahko stanovalci dobimo celoletno dovolilnico za takso 100tih evrov.

To me je izrazito ujezilo, bolj kot sama cena sem sele po daljsem razmisleku ugotovil da me je zmotila... gentrifikacija.

Placaj 100evrov ali se odreci avtu. Ali se odseli. Nisi del nase klike. Odjebi.

Denar je samo orodje, kdor ima moc nad distribucijo denarja ima tudi veliko socialno moc.

Ne bom se pritozeval, z denarjem sem v redu, toda take taktike me popolnoma razkurijo.

V mestu velikem kot kokosja kletka nas posiljujejo s takimi dnevnimi ropi? Da bom lahko z avtom v tej kokosji kletki? Kjer lahko pricakujem le da bom jedel drek in umrl?

Cela drama se mi je nahitro odvila v glavi ko so mi ventili popustili, se posebno po neverjetno cudoviti izkusnji Berlina, kjer so cene nepremicnin primerljive ljubljanskim ali celo nizje, moznosti pa nesteto, sproscenost hipijevska.

Po drugi strani je pa zalostno da sem po tej poti prisel do "razkroja druzbe", navadna parkirnina... vsak ima svoje zgodbe, vsem je pa jasno da tako vec ne bo slo naprej.