The Product Engineering team of Savoir-faire Linux, along with the colleagues working on the Ring project, expanded into a new office. But they had a problem: at lunchtime, the sandwich delivery guy needed to pound on the door to get someone to let him in. Being hackers, the team realized that they actually could use in-house technology to help them manage the access to the office. Put simply, a welcome intercom system or a doorbell dubbed “Quick-Phone” (inspired by QTQuick), was needed. Here’s how the story unfolds…
Like most companies, each of us has a phone on his/her desk that connects to a company gateway using the SIP protocol. We use an open source Asterisk server, so we could have simply installed a regular SIP phone on the corridor wall in order to establish a connection between guests standing at the door and the people inside. Yet, we believed, as product engineers we could do better than that. In fact, we should design a sexier SIP phone with a touchscreen. This is part of the solutions we develop everyday for our clients, and we should build ourselves one too.
In order to get us started, our friends at Technologic Systems generously sent us their new TS-TPC-7990 touchscreen system to be deployed in our fun and functional project. This board embeds a 1 GHz Quad Core NXP i.MX6 ARM CPU along with a powerful GPU and a set of hardware encoders/decoders to support graphical and multimedia applications.
A Technologic Systems’ TS-7990 embedded system complete with capacitive touchscreen
We defined the minimum value-objective for the product to be a simple interface listing all users so as to allow a guest to directly call someone from the department. To realize this objective, we designed our user interface (UI) with Qt QML, taking advantage of the hardware acceleration to keep it responsive. QML is an awesome tool for creating complex cross platforms UI with OpenGL. With the help of GPU, QML offers a smooth operation on embedded platforms. Moreover, we used ‘Qt-cinematic experience 3D’ which runs smoothly on TS-7990 consuming only about 20% of CPU capacity.
In addition, by using a hardware decoder in the GStreamer pipeline, we have been able to decode 720p h24 stream with almost no CPU usage. Even though we decided not to add video calls for the first version, these experiments showed that this board was already capable of supporting multimedia applications. As for out-of-the-box Technologic Systems, it already provided support for Qt QML in their Yocto layer. We took this opportunity and began to code in QML language and contribute to the Yocto open source community.
To feed the system with data, first, we retrieved all user names, extensions and pictures from our ERP (i.e., Odoo open source project) and stored them in a file with a simple REST client. This was a simple but necessary step to take to make sure the embedded computer has access to its own independent data file.
Next, we integrated a famous SIP stack, pjsip, and its python wrapper to develop a simple SIP audio caller. We chose pjsip for three main reasons. First, it is a reliable multimedia communication library written in C language. For example, we have already used its low level libraries for our DHT/SIP phone: Ring, and it worked very well. Second, it is highly functional. Its high-level libraries already supports a set of audio codecs such as Speex, iLBC, GSM, G711, G722, and L16 codecs. Third, we know the ins and outs of it very well. In fact, in a matter of few hours, we developed a fine and dandy SIP–based on python pjsip sample code– so as to enable guests to call anybody in the office.
Putting it together
With the inauguration party of the new office commencing in a few hours, we had to value our time dearly and use it wisely. We knew it was an opportune time to install the prototype and show off our contribution – a little gift for the ceremony so to speak. This could also show our software development capability in harmony with an industrial grade hardware component. However, mounting the board on the entrance wall was not an easy task. We needed a custom-made wooden box, power, and connectivity, while all we had readily available was an ‘Ethernet’ outlet.
The process of crafting the wooden box by product engineers
This was specially troublesome since the board did not support ‘Power-Over-Ethernet’. We needed approximately up to 19W (at <28V) which was different from a typical PoE setup. Undaunted, we rigged up a passive PoE injector in order to use our own power supply and hacked an Ethernet cable to split out power for the board. As for the wooden box, we had already designed a custom frame, so we just gave it a few brush strokes and made it whole. At this time, we were all set to give it a go!
Test driving the ‘PoE’ setup
Having mounted the device, we did a little more of debugging so as to downgrade the link speed. This was necessary because our hacked Ethernet cable was no longer properly shielded. But in the end, just two hours before arrival of the inauguration guests, we experienced a proud moment: we could establish the very ‘first call’ between the corridor and our office. The following day, the sandwich man came in with a happy smile on his face: he did not have to pound on the door anymore!
A little command line for debugging magic to save the day
All open source
The whole project was built using open source tools and libraries. In fact, anyone interested can follow simple steps in order to create their own version. Visit this GitHub repository for instructions on how to build your own image for a TS-TPC-7990. Source code for the QML application is also available here.
A team effort
As fun as building things can be, the most satisfying aspect is working effectively as one cohesive unit. We seek happiness in satisfying our clients. This is what we focus on everyday. For this internal project, we have used the same ‘Agile Development Methodology’ that we use for our customers.
A happy ending for the team ready to welcome the quests
We designated the project actors: two stakeholders, a product owner and the development team. We organized short meetings to understand needs, set the priorities, estimate the effort for performing each task, and to split them into shorts iterations. We also set regular iteration deadlines with the major one being the inauguration day. Now, our stakeholders are pretty happy, but of course, they have requested a few more enhancements. We are working on them and we will share that story too. Stay tuned …