Monday, December 15, 2014

Busy with new house!

Sorry for not posting any updates lately, I've been to busy with moving and setting up my new geek lair (oh, and furniture and stuff too).

Yep, after searching for about 5 years for something suitable we finally bought our own house, in "Villi Pohjola of Turku" or Red-neck Turku (as described in Foursquare) aka Paattinen. After living in the center of Turku since about 1996, this is a big change, but in a way, going back to how I used to live most of my childhood, in the middle of nowhere, 25km in to Pori center, closest store 6km away. Seeing riders on horses gives me the fuzzy feeling of I'm-home-now.

But not that middle of nowhere now, everything needed is close, perhaps 300m to the nearest store/bank/lunch place and only 20km in to the Turku center, the bus-stop is 200m away and it takes about 25-30m to get into town.

It is funny with distances, the reaction most have in Turku is: "That far away ?!?" but even Helsinki people tend react with "oh, that is not far away at all".

Still pondering how to get a proper network between our two houses (Sauna+geek lair is in a separate building). 100m of CAT6 is waiting to be used.

Wednesday, November 19, 2014

Jolla Tablet!

Everyone probably know this by now, but still, Jolla announced a Indiegogo campaign to create a Jolla Tablet, running Sailfish OS 2.0. The specs are impressive, quad-core Intel, 330PPI screen.

The campaign is going great, at time of writing 25% of the goal has already been raised! Join now to get yours at Indiegogo!

Thursday, November 13, 2014

Artwork loading added to libqiscp

Worked a bit on libqiscp today and added support for receiving and decoding artwork data the receiver might send. The decoding into a QImage works very well, but the next thing is to somehow get that transferred to the QtQuick side.

Artwork loaded trough ISCP

I imagine a QDeclarativeImageProvider would be the proper way, but the thing is I don't know really how to connect that into the dynamically created QtQuick ISCP object(s).
Any ideas ?

Sunday, November 02, 2014

Late night soldering leads to pain

I'll just quickly solder the connectors... right. Not the best of ideas after a day of moving and sauna.

Can you spot the tiny little mistake in this picture ?

There is something not quite right in this

Idiotic connector types

Whoever it is that thought "lets use a RJ-45 connector for serial port!" should be beaten with a good old thin Ethernet cable with a T-connector on the end.

Anyway... seems my cheap RJ-45 to RS-232 cable from dx works, /me happy

LOM event: power on
Netra t1 (UltraSPARC-IIi 440MHz), No Keyboard
OpenBoot 3.10.25 ME, 1024 MB memory installed, Serial #14304548.
Ethernet address 8:0:20:da:45:24, Host ID: 80da4524.

Thursday, October 30, 2014

Get CAN up and running on BeagleBone Black

Started to work with a BeagleBone Black and the CAN bus it contains. Just make it easy to get up and running I made a very simple script to do just that.

Get the BBB-CAN script from github.Original instruction are from this Embedded Things blog post.

Wednesday, October 22, 2014

Onki 0.0.3 released

Where did the days go, already 22 days since 0.0.2 docked in the Harbour. Well, anyway, I just uploaded 0.0.3 to Harbour and OpenRepos.

Whats new you ask ? Well, plenty:
  • Loosing sync with the device should be fixed now
  • Audio settings on a separate page, the basic Bass and Treble, Center and Subwoofer volume adjustments. Also Music Optimizer toggler.
  • Preliminary zones support. Input selection only for now, need to do some more internal re-working for this to work ok. Oh and only Zone 2 has been tested, so if you happen to have one of those more expensive that support 3 or 4 zones, please let me know if it works or not.
  • And that means preliminary, you can select a source for other zones, but not much else.
  • Tuner presets, yay :)
  • Device is asked for supported inputs and zones and if it knows how tell use that then we will use them
  • Remorse timer for Power-off button
  • Optional autoconnect on start (if only one device is found by device discovery)

Tuner presets!
Known bugs/features missing:
  • No way to power-off zones 2,3,4
  • Sometimes query for inputs,zones and presets fails. Re-connect and it should work.


Friday, October 17, 2014

Raspberry Pi doing i2c LCD display in C++

I'm working on a Raspberry Pi project that needs to be running headless but still be able to communicate with the outside world in some way. We are currently using a simple Red (error), Yellow (waiting for something), Green (Ok) (+blinking) to inform the user of various conditions (you can see them in the picture).

For most features that seem to be ok, but we are thinking about having somekind of display for a bit more details. A cheap 16x1/16x2 display would work quite nicely I think.

Today inspiration hit me to look into that a bit more. I had a 16x1 LCD laying around and a PCF8574T i2c I/O-expander backpack. Wired it up to the Raspberry Pi and started to look for some (proper aka C++) code. No luck there. Just some silly python this and python that. meh.
Well, it works fine on the Arduino.. and that is C++.. hmm, let's port it to plain Linux i2c interface (well, ok, wiringPi i2c wrappers). And so I did.

Here you go:

Raspberry Pi controlling LCD display with i2c in C++

I will do a bit cleanup and then code will be up on github.

You can get LCDs and i2c backpacks from Amazon:

Wednesday, October 15, 2014

Some Kotibussi progress and backend thoughts

The first Kotibussi demo used the very basic ENC28J60 Ethernet controller based ethernet shield. That means the TCP/IP stack had to be run on the Arduino itself, taking up a lot of precious memory. I'm moving it now over to a WizNet W5200 based shield that takes care of the TCP/IP stack in hardware for me, makes a ton of difference in the amount of memory I now have to play with.

Some ideas are to have an integrated RTC and some way to configure the device without re-flashing, aka some control buttons and menu system, the added memory helps a ton in this.

And the backend. Luckily there is a standard for M2M transport data, Siri, unfortunately it is not well suited for low-bandwidth/low-speed/low-memory devices as it is XML based and extremely verbose. And it is also pull based so I would need to poll the data and that is just stupid.

So a Siri2MQTT gateway needs to be created, some minor progress in there, just a skeleton for now but  getting there.

Then there is the minor issue that Turku does not provide any data yet (no timetable, they hope to get it open in 2015), luckily some cities in Finland aren't that behind in progress so I will use Tampere Public Transport SIRI service for now.

Monday, October 06, 2014

Zone handling in Onkyo ISCP

Is kinda annoying.

My device has 2 zones, Master and Zone 2. Onkyo devices can have up to four zones. You can ask the device if the zones are powered, and it can say 01 for powered, 00 if off and N/A if the zone does not exist. So probing what zones are available should be just a matter of asking the power information, and ignore zones that say N/A, right ?

Nope, my 2 zone device answers for Zone 3 with a 00 and for Zone 4 N/A. Sigh...

Oh and no, I can't turn on Zone 3, it just answers with 00. And just for fun I plugged in a USB Sound card as I noticed the firmware contains snd-usb-audio.ko module, but no, no such luck, no Zone 3. Oh, yes, your Onyko runs Linux in case you didn't know that yet.

Tuesday, September 30, 2014

KotiBussi, 3 place and shared challenge price

Related to the previous post in Finnish. It is a description of my entry to the regional app4finland competition, a simple home Buss information display concept.

The idea is to have realtime display of buss(es) on a simple display so you know when to run to the buss-stop. The idea came when I started to think about what is the most annoying thing with using public transport here in my home city of Turku. I personally hate to stand at the buss-stop and wonder where the hell is it, or did it go already ? And at this time there are just a handfull of stops with information displays (that don't even display correct information, last time I needed to take a local buss).

Yes, you can get that from an app or web site. But not everyone has a smartphone. And how much time does it take to first dig the from somewhere, start the app, wait for it to load, then find the particular buss/buss-stop, etc (but the backend could be used for a mobile app, so that is not ruled out)

And this could be used not only at home, but for example at the work place, stores and hospitals. Well, you get the picture.

And instead of having the device polling the information, it uses MQTT to passively listen for changes and that means it does not need much of processing power, a basic arduino is just fine.

The backend part is still to be written, basically a SIRI to MQTT gateway.

Oh, the important part, I won! Third place in one category and shared winner of a specific challenge (transport).

Thursday, September 25, 2014

Kotibussi, Apps4Finland demo konsepti

Kotibussi, Apps4Finland innosta sarjaan demokonseptilaite, josta näkee nopeasti seuraavan bussin tiedot kotoa, ilman tarvetta puhelimelle tai tietokoneelle.

Demolaitte on toteutettu Arduino, Ethernet shieldillä ja LCD näyttöllä.

Arduinossa pyörii MQTT client joka kuuntelee MQTT palvelimella olevia pysäkkitietoja ja päivittää realiajassa tiedot tulevasta bussista, sekä sitä seuraavasta.

Oikeassa toteutuksessa MQTT palvelimelle tiedot haettaisiin reaaliaikaisesta SIRI syötteestä, joka Turun seudulla on tulossa 2015.

Näin bussin käyttäjän ei tarvitse juosta pysäkille seisomaan turhan takia vaan voi rauhassa katsoa näytötä ehtiikö vaikka vielä juomaan aamukahvin loppuun vai ei.

BS: Pysäkin numero
L: Linjanumero
N: Nyt tuleva bussin arvioitu min:sec saapumisaika
S: Seuraavan bussin arvioitu min:sec saapumisaika

Demo ohjelman koodi löytyy github:sta.

Friday, September 19, 2014

Onki now in Jolla Store

Just a quick one to tell you that Onki got trough QA and is now available in the Jolla Store, have fun and a nice weekend!

Wednesday, September 17, 2014

Onki - Onkyo remote controller for Jolla

Just submitted a preliminary alpha version to harbour of a Onkyo A/V receiver remote control app for Jolla. (Update: Oh, and on openrepos now too!)

Basic functionality is there, you can Power on/off, select input source, adjust the volume, mute on/off and tune the radio up/down and also tuner presets up/down.

For now the only cover actions are Tuner presets up/down. Cover action could be configurable to something else, perhaps volume or input ? What do you think ?

Cover actions (Tuner preset up/down)
Device selection works, only automatic discovery for now. In the future you will be able to add your device IP manually in case your Jolla is for example on another network. (Oh, and having your Onkyo on a public network, not perhaps the best of ideas as there is absolute no authentication...)

Onkyo device selection, for now only automatic discovery is supported.
The main screen will have the common control at the top, with current input as the screen title. The common control (for now) include Power button, Volume Up/Down and Mute.

On the bottom you have the input specific actions, on the screenshot below the tuner actions are visible.
Main view with common control and input specific ones
Input selection is available from the pull-down menu. For now all possible input that a device can have are visible, some might not exist on your device so obviously they won't work.

More functionality will come when I have the time to implement them.

Oh, wanna help ? The ISCP library is available on github, the app will also be soonish.

Wednesday, September 10, 2014

QtQuick friendly Onkyo ISCP remote protocol library

There are some ready made apps and code around, but none that was easy to plug into QtQuick or in library format so I scratched that itch myself for a change and wrote a simple library.

Still working on figuring out some of the more complicated commands like controlling network playback, but all the basic stuff is there. Will be in a git repo soonish.

Screenshot of test app below, UI is pure QML. (Yes it simple and ugly, it is a test app)

The ultimate ISCP commander!
And yes, this means there will be an application for Jolla and BlackBerry 10 in the near future.

Friday, September 05, 2014

Minor Y-Radio update, version 1.0.5

Related to the previous post about the DockedPanel, I made some small UI adjustments to Y-Radio (and it is already trough Jolla QA, in only 2 hours, that was fast!)

Made the main view a bit more compact and made the play/pause control look more nice.
The connecting and buffering progress bar is now above the control (but for some reason the Audio element won't give proper buffering information for rtsp streams, sigh). Also the main page title is now used for the radio channel name (and will only display Y-Radio when no channel has been selected)

Y-Radio main view changes
Also I made the program view a bit more compact by showing the program details in the list instead of in a dialog, makes it much easier to browse.
Program view
There are some other small thing in there, a bit nicer cover and some text size and color adjustments. Enjoy!

Thursday, September 04, 2014

Keep DockedPanel open in Sailfish OS

I'm working on tidying up the Y-Radio UI and just discovered the bottomMargin property of ApplicationWindow, nice for keeping something on the bottom always visible even if you are navigating in the pageStack, so perfect for a media player control buttons right ?

Unfortunately the documentation sucks, as the only component that seem to work properly is the DockedPanel as it does some re-parenting. And the DockedPanel as an annoying issue, the user can hide it. For now I'm using the following uglyish workaround:

onOpenChanged: {
 if (open)
 if (root.currentChannel!==null)

Thursday, August 28, 2014

fkLeffa got updated

My first ever (a for now, only proper app) application, fkleffa, for the BlackBerry 10 platform got some love too the last couple of weeks.

There is now support for more cinemas chains (well, basically all cinemas I know of that run the Markus Cinema system and offer the XML API interface). Supported are now: Finnkino in Finland, Forum Cinema in Estonia, Kino Artis in Estonia, Forum Cinema in Lativa, Forum Cinema in Lithuania, Eden Cinemas in Malta and SAMbíó in Iceland.

Also the UI got updated with easy access to todays shows (with date selection) and upcoming movie premieres.

fkLeffa is available, for free, in BlackBerry world!

Y-Radio works again!

Finally got some spare time to look into it again. The thing is, YLE decided to stop offering icecast streams that worked perfectly and instead offers only RTSP and HLS streams now. At the time, the multimedia stack on Jolla had problems playing back RTSP streams (choppy sound) and HLS support didn't exist at all. So nothing I could do about it at that time.

I had already started to look into how on earth you could use my own private copy of gstreamer to overcome these issues (as direct usage of gstreamer is a no-no for harbour apps at this time), but luckily the summer update fixed RTSP playback (and almost the HLS support, but not quite, probably this bug) and Y-Radio is now fixed as much as I can fix it.

At this time only low quality RTSP streams are supported as the HLS support is buggy, it won't reload the m3u playlist. But if I can figure out how to use gstreamer without using the system gstreamer, then we can do proper shit! (and add such nice things as an Equalizer for example)

Available now in Openrepos and hopefully soon in the official Jolla store (waiting for QA right now)

Monday, June 09, 2014

More computer rescuing. A Macintosh SE

A bunch of various sparcs, more about them soon. But I got this old thing:

After some boot disk hunting I got to boot into System 7.1. Memory have been upgraded to a nice 2.5Mb.

Thursday, June 05, 2014

Computer rescue! SGI Indy, SS20, Ultra 1 and SunBlade 150

Hmm, don't know if I've ever blogged about my collecting hobby ? Well, I do. Computers. Surprise. Have about a 120 or so.

A couple if weeks ago I struck gold so to say. Åbo Akademi ICT deparment needs to move as the building they are located in needs to be renovated. They have stashed quite nicely a lot of old computers. I had a chance to loot trough the stuff before getting trashed.

There where quite a lot of stuff, mostly just old PC junk. But I did find something fun:

Oh, and I'm going tomorrow to take another look, there are a least 4 SunBlade 100 workstations waiting for me.

Tuesday, May 20, 2014

How to transfer things to a computer when the only connection you have is serial console ?

I was reading something and suddenly got a flashback to when I was playing with an old IBM RS6000/320 I got many years ago. Getting it up and running was a fun exercise in patience, installing AIX 3.2.5 (I think) from tapes. It took a couple of hours. And I had to do it twice if I remember correctly as the HD I had was too small.

Anyway, when AIX was up and running the next problem was getting a bit of basic software into it like gcc and ssh. That should be easy, right ? Just use scp.. oh wait, AIX 3.2.5, that is kinda old. Even at the time (2000), very, very old (AIX 3.2 was release in 1992). So no nice tools to use. And I didn't have suitable network cabling for it at home at the time either, so no use of any primitive networking tools. The only connection I had was the slow serial console.

The simple answer: uuencode and uudecode

And that reminds me, need to check if it still runs after all these years.

Monday, May 19, 2014

CAN bus, chips and usb adapter

I got my CAN bus chip, a couple of MCP2515 controllers and and MCP2551 transceivers and also the required boilerplate components or whatever you call them in the hardware world :)

MCP2515 and MCP2551
Also I'm waiting for a USB2CAN dongle by 8devices (ordered from EXP Tech), it should arrive today if DHL does its thing on time.

The MCP2515 and MCP2551 seem to be the most common chips used by DYI/Arduino/etc users, not that surprising as there aren't that many breadboard friendly CAN chips available. For example the is a new controller available by Microchip, the MCP25625 with integrated CAN bus tranceiver, but it is not trough hole friendly as it is only available in SSOP-28L and 6x6 QFN-28L. But I wouldn't be surprised if someone will offer breakoutboards soon.

But one new chip is quite nice for users of 3.3V systems, for example the Arduino Due that has 2 CAN busses included in the Atmel SAM3X8E ARM Cortex-M3 CPU but no transceiver. The MCP2562 transceiver, it has separate voltages for the IO and CAN bus part, so you can plug it directly into any low-voltage device without the need of any level converters. I need to get myself some of those for my Due as I would prefer as little extra components as possible.

Saturday, May 10, 2014

Y-Radio problems

Well, YLE did the stupidest thing ever around 1 of May. They removed their shoutcast streams and now offer only RTSP and HLS streams. Using AAC. And guess what Y-Radio uses? That is right, the shoutcast streams.

And the RTSP streams, that work perfectly fine on desktop, fail on Jolla as various gstreamer modules are missing won't play the streams properly.

And you are not allowed to add gstreamer modules for harbour releases.


I'm trying to figure out something, but for now Y-Radio is broken. Sorry about that.

Friday, April 25, 2014

Getting on the CAN bus

I co-worker from waaay back (199?) contacted me a while ago about helping out with some issues he had with a linux system that talks with a CAN bus. A very interesting system. But I won't go into specifics here on that point.

Anyway, CAN bus. Most will probably think OBD-II, cars and ELM327, understandable as that is what it was designed for. And that was just about all I did know about it myself too. Researching into it some more was very enlightening and I got some cool ideas on how to use CAN for one of my own little forever projects.

Now, CAN bus is quite simple, two wires, differential. All you need is a transceiver, a controller and something to tie that into your computer, USB, RS232, PCI, etc. Some Linux friendly and cheap boards even have CAN bus integrated in their SoC. And there are some easy to interface SPI controllers that you can use with your favourite microcontroller.

What makes it really interesting is that most of the low-level stuff is handled on-chip. Software does not need to care about timings, arbitration, bit-stuffing, CRC and all that. It is all on the chip. And you have a wide choice of bandwidth/length options. Need to connect that sensor a 100 meters away ? No problem. And thanks to being designed for hostile environments it should work over just about any two wires, or so I've heard.

There are some limits of course. Maximum data packet size is a whooping 8 bytes. And messages have only have a message ID, no sender or receiver ID. So the network is a 1:N broadcast network. But still, that is quite OK for a sensor network.

I ordered a couple of MCP2515 and MCP2551 chips and I hope I have some time do play with them soon.

Y-Radio updated, new icon and Facebook page!

I finally got Y-Radio update in harbour, already a couple of weeks ago (QA approved April 8th). New features include:
  • All available YLE Radio channels now available and nicely grouped
  • For channels that offer it, program information (Note: this uses the undocumented API still, so it might have issues from time to time)
  •  Channel information with quick links to various on-line service the radio channel offer (Twitter, YouTube, etc)
  • Preliminary translations to Finnish and Swedish
  • Major internal changes
  • And Y-Radio is now on Facebook
Channel list
Program details

Program information
Also a very helpfull Jolla community member offered to create a much nicer icon for the application. This version does not use it yet, but the next update will have it. But take a look at this, awesome isn't it ?!
New Y-Radio icon

Wednesday, March 26, 2014

Y-Radio development update, undocumented APIs and stuff

I started to add support for showing program information in Y-Radio and I would have wanted to get that ready before a new release. Of course, the information on how to get to that data had to be sniffed from the official-only-on-major-OSs YLE applications.

That was easy, but as the API is not an open one and undocumented... guess what, the data is not available in the old format anymore! Fun ain't it. Sigh...

Luckily #opendata is all the rage these days, YLE is opening up their data into a public and open API and there is already a beta available, unfortunately licenses and public usage is still work in progress.

Monday, March 03, 2014

How to send feedback of a PDF the wrong way

A Monday facepalm moment:
  1. Receive a PDF
  2. Print it
  3. Read it and mark changes/error with a pencil
  4. Scan in the pages into a new PDF
  5. Send the scanned pages PDF as an e-mail attachment
No, that is definitely not how you are supposed to do it.

Monday, February 24, 2014

Y-Radio update coming soon

Yes, I know, Y-Radio is missing some of the more obscure YLE channels. Development version (and version on openrepos) includes all channels.

Ski vacation and work before and after that (plus being sick) has take most my time, but an update will be pushed to the Harbour soonish. I'd like to get a couple of feature done first.

Tuesday, January 21, 2014

ParkkiTalo for Asha

Made a quick app for Nokia Asha (and also older S40 devices) users out there. Not very interesting unless you happen to live in Oulu, Finland and need to park your car.

Submitted to QA, so in a week or so it should be available for download. It uses the opendata provided City of Oulu.

ParkkiTalo - Oulu Asha version.

If more cities start to open this kinda of data they will be of course added to the application. I'll post download links when QA has done its thing.

Friday, January 17, 2014

Y-Radio updated

First version has an White Screen of Death issue because of a missed dependency on qt5-qtdeclarative-import-xmllistmodel that even QA didn't catch as it is needed by the terminal app that they use for doing installations. So sorry about that.

More channels! Yay

A fixed version has been uploaded to Harbour yesterday as is waiting for QA. And if you are in a hurry you can always get the latest version from openrepos.

This update contains some other updates too:
  • Visual changes, use different colors for artist/song
  • Fix issues with changing stream quality of currently selected channel (It didn't change)
  • More radio channels added. (Yes, I know some strange area Radio Suomi streams are missing. Will be added. Soon. Or scratch that itch yourself and post a patch.)
Different highlights
What about the next version ? These are work in progress, coming soon:
  • Daily program information
  • Channels details
  • News feeds

Friday, January 10, 2014

Y-Radio, my first application for Jolla

My first application for Jolla is starting to get into shape. All basic functionality is there ready for first release. Nothing fancy, just an YLE Radio player with support for current/next song information (for channels that supply that information).

Current features:
  • Front page display current channel information
  • Current song, with artist image, if available
  • Next songs
  • Channel page with most YLE Radio channels
  • Cover page has Play/Pause
Planned features:
  • Daily program information
  • News feeds from channels
  • Quick access to favourite channels
  • Played songs archive
  • Favourite songs marking
  • More song/artist details
  • Calendar event integration
  • And when usage of gstreamer is allowed in Harbour, Equalizer (+any other interesting audio filter that might be available)
  • Anything else ?
 Should be ready for Harbour submission in a day or two. If you would like to beta test, let me know.

Wednesday, January 08, 2014

Nokia Store closed, no more N9 or Symbian apps

So much for support to 2016. The Nokia store closed for new N9 and Symbian applications (also updates are denied, how cool is that huh?).

Anyway, I tried to get updates in for some of my apps, especially the Radio X3M app for N9 needed that bad as the streaming URLs had changed, it passed QA a couple of days ago, yay :)

And just for fun I added a YLEX N9 application too, still waiting to pass QA.

 These now use the exact same streams as YLEs official Windows Phone and Android apps so they should work for some time in the future, I hope.

Also a result from a RealWork(tm) project was submitted, just in time, still waiting for QA. When (and if) it passes I'll let you know more. A peek below:

BBM on Jolla update

My previous BBM on Jolla video mentioned that PIN sharing as QR Code didn't work as the camera was still unsupported in Alien Dalvik, the Android environment that Jolla is using. Well, the latest update aka Maadajävri adds support for the device camera in Android applications and now you can share and read QR Codes from BBM. A short video demonstrating this BBM feature below.