Tuesday, October 25, 2016
Wednesday, October 19, 2016
Tuesday, October 18, 2016
Thursday, October 13, 2016
Tuesday, October 11, 2016
So while reflecting on all this and trying to apply my previous experience to my current work which is in embedded systems, I thought I need to think about API's and how to apply them to my work. Actually it shouldn't be a debate, API's are needed. To avoid mixing of various different functionalities, you need API'fied layers and clear separation between the various functions.
But from what I've seen in embedded applications, it's peoples style to liberally use globals, externs, and with a big application like a complex HVAC system, or a motor ECU, it turns into an unholy mess. You end up with a bunch of static, globals, extern functions and other bits that makes understanding and maintaining such a code a pain in the a**.
That's where API's come in. You are actually formalizing the functionality, and coding the prototypes for that module accordingly. This way you separate functionality into that module and hide all that away from other modules/functions etc.
Consider following example:
Recently I was working on a UDS client. This client communicates with UDS server on a vehicle, it creates UDS queries using UDS over CAN, and writes/reads the queries and response. Now, a quick and dirty hack would have been to hardcode the few, about 4 UDS queries and read off their responses. It would have been easy. But I thought about the utility and possible use cases for this little app. I came to the conclusion that there is a chance of this utility needing future functionality additions. So I tried to mudularize it. That means it got architectured into following three layers.
1. Application layer: Here we create a UDS query and send it to the next layer.
2. Service layer: Here we implement the transport layer for the UDS over CAN functionality.
3. Device layer: Here we implement a virtual CAN device and abstract its read/ write functions.
I had to think hard on the data passing between layers. Also how to maintain the logical separation. Took me about 30% more time but it was worth it. Because next week I was told to make this utility compatible with another CAN device. And with this code I just had to create another derived CANDevice class and implement the read/write functions according to this new device's API's.
Such is the use of API's for code maintainability. And such code is totally applicable to embedded applications. This would address the logical separation and readability aspects of embedded code.
The other pain aspect of embedded code is extern functins and global variables. Having application level global buffers and passing them by reference to lower layers would solve the problem of readability. It would make function prototypes a bit long but then you wouldn't have to hunt the globals around. It would also clarify data passing since all data used.in the function would be visible in its prototype.
Well, this approach does looks promising. Lets see how it works out in real life.
Thursday, October 6, 2016
Wednesday, October 5, 2016
Two issues I noticed:
One due to WiFi not connecting to WPA Enterprise network, I had the cellphone reset. After reset I entered my Jolla account credentials.
After that I got notification for update. Except this is one update I had already applied. So Sailfish update may not be working well. Don't know.
Second issue is seen when using the Android app store. I tried to update the apps but the download keeps getting interrupted. Don't know again whether its network issue or store issue or something else.
Tuesday, October 4, 2016
5-Oct: Just found out Sailfish doesn't support WPA Enterprise. So no office WiFi for me!
Although it connects to plain WPA router. I checked this with my Tata DoCoMo WiFi dongle.
The box looks good. Opening it you find a book like design which is delight to open. The box contains handset, 2500mAh battery, in ear type headphones, a power brick and a USB to micro-USB cable. It comes with an orange colored back plate which can be removed by lifting one corner. Intex
has helpfully provided a sticker at the corner. The phone has quite a bit of footprint but is light in hand. Removing the backplate shows the dual Sim slots and the dedicated SD Card slot and battery slot. The battery is removable. But you need to remove the battery to insert SIM/SD cards.
Display, connectivity, battery life
The display is specified as an IPS HD display. It doesn't have any kind of glass protection though. The covering plastic is bit shiny which causes glare when brightness is set to low. The display can get quite bright and so we shouldn't have any problem with sunlight visibility. Adaptive brightness is supported however I found that it's not as responsive as I like. The brightness adjustments happen slowly. The display is good enough for the price though and touch response is fine.
Intex aqua fish comes with Sailfish OS. The version is 18.104.22.168 after a small update. Updates are directly available from Jolla. The interface is touch driven. It supports the usual elements like a
Home screen, Notification tray with Quick launch buttons, an app drawer, theming support via ambiances etc. It supports all major accounts like Google, Yahoo, Facebook, Twitter along with VK, Dropbox, OneDrive etc.
For apps you have Jolla store which provides native Sailfish apps. Plus baked in is Android apps support. This means many of your android apps also work on this device. For Android apps a Store application is provided which lists a number of popular applications. You wont find a lot of applications in the Jolla store and with android apps also you may not find all your day-to-day apps. So hardcore app users may be disappointed.
The interface uses what termed as Pulley menus and gestures for navigation. The keyboard doesn't support swipes but otherwise is precise and is fast to type. The menus are easy to use and intuitive. The interface is fast and doesn't show any lag. Perhaps the 2GB RAM is the reason for such
smooth interface. But then Sailfish OS is fairly light. On the home screen you see all your current running apps. The android apps are also seen here. They are displayed as tiles. The tiles may have quick buttons. These may perform some activity in respective app. E.g. Weather app has a refresh button which refreshes the tile.
The settings provide almost all option you will find in android. There's brightness, display, accounts, apps, network settings, personalization security etc settings. It covers the configuration needs for a modern smart phone well. The notification tray is available at left home screen. Its functionality is very similar to android notification tray. But some options like clearing the tray, and swipe to dismiss are not yet available.
I have not gone into the thorough analysis of performance of Sailfish, mainly because the hardware is very entry level. When you consider the Snapdragon 212 SoC, there's not much to benchmark. So lets consider the real world usage only. As I said earlier, Sailfish OS is lightweight. So your average usage reflects that. Navigation between menus is fast. Apps can be switched fast. Apps are slow to load though. Maybe if they provided a pinning option like androids pinned apps in recents menu, then we may avoid opening and closing high usage apps like dialler.
Telephony, messaging, loudspeaker
The dialler and contact apps work well. The UI is intuitive and easy to use. The search is fast. The apps have accessibility features like automatically including the name of contact in message which is neat. The copy-pasting is equally neat. When you select the text by long-pressing a word, it smoothly zooms in which is pleasant to see. I checked both Sims and the calling options etc are similar to
Android. The call volume is decent and loudspeaker is loud enough, but of average clarity.
Gallery, media players, audio quality
Again, the Gallery and media player are similar to android. I checked a number of files and formats and they played well enough. The video player is a bit too basic for my liking. The media gallery is similar. A bit spartan and without advanced options. But it manages to cover all the basic operations. Audio quality is good. The sounds feel natural and not artificial as some low end Mediatech chipsets sound. Overall I would say its a good media device.
Both the cameras are average as expected. The camera app provides a lot of options and it works out giving you a good amount of control over the photos. In daylight you can fiddle around the settings and capture some decent photos. At night though the single LED flash just wont help much. Still the 8MP auto focus camera is decent for the price. Front 2MP camera is similar and it serves the function. but for an entry level smart phone its more than enough.
Overall I would say that Intex Aqua Fish is a fresh breath in a sea of droids. It provides good value for money. The hardware is more than decent. The OS is intuitive and provides good amount of smart phone functionality. Android app compatibility is a good feature. Although average android users may not like the limited availability of native apps and they may not like the lack of their latest and greatest apps. But there's a market for such a device. And choice is always good. So if you are tired of your android and iOS, you can spend ~INR 4500 i.e. ~$80 and get your Sailfish fix.