Tag Archives: linux

Do you need the new Raspberry Pi B+?

An updated Raspberry Pi board was released earlier this month, and the kind folk at Element 14 sent me one to review.

image

The Raspberry Pi is a complete low-power computer which needs only a case, an SD card, and a standard USB power source to start doing real work. It is ideal for learning projects, home automation, practical applications like running a media server or client, or anything you can think of.

It is a little over two years since the first Pi was shipped in April 2012. The progress is a little confusing: the first model was the B, followed by the A in early 2013, a cut-down model with a single USB port and no Ethernet.

image

The new model has the same Broadcom BCM2835 SoC as all the other Pi models. The CPU is a 700 MHz ARM 1176JZ-F.

So what is new? The highlights:

  • 4 USB 2.0 ports
  • The dedicated composite video port has been removed and is now shared with the audio jack, requiring an adaptor
  • The power draw is now 600 mA up to 1.8A at 5v, making it both lower power and higher power (when necessary) than the model B (750 mA up to 1.2A at 5v). The USB ports can supply a little more power, making most self-powered external hard drives usable, for example.
  • The SD card slot has been replaced by a micro SD card slot, a good move (all my SD cards are in fact micro SD cards with adaptors, which is common).
  • The GPIO (General Purpose Input Output) connector now has 40 pins rather than 26. The first 26 pins are the same as before, for compatibility.
  • The price is the same as for the B

There are a few other changes which I noticed. One is that the LEDs have been moved. On the B, there are 5 LEDs which are together on the bottom right corner of the board: ACT (SD card access), PWR, FDX (Duplex LAN), LNK (Activity LAN) and 100 (100Mbit LAN connected). The B+ has two LEDs in the opposite corner, ACT and PWR, and two more LEDs on the LAN port itself. Personally I prefer the old arrangement.

The audio output is improved, according to Pi inventor Eben Upton, thanks to a “dedicated low-noise power supply.” Raspberry Pi Engineer jdb adds that  “The output impedance and buffering for the audio port has been improved and the maximum output amplitude has been increased (~1.25V pk-pk).” However one blogger measured the output and considered no better (or slightly worse).

Since the layout of the board has changed, a B+ Pi will not fit in your old model B case. I bought a new case but I don’t recommend this one:

image

This is a push-fit case and even thought the board is held down by tabs, it moves and rattles slightly. I also worry about the case tabs breaking if you open it repeatedly. The tab that you need to press to open the case is sited by the micro SD slot, and that is another mistake, since it presses against the board making it hard to reopen after the Pi is fitted. There is also too much space below card slot so you can easily post your card into the case rather than into the slot if you are careless. Finally, I don’t like the way the top of the case slopes down, reducing the space above the GPIO at its shallow point.

I wish I had seen this Cyntech case which looks miles better, for a similar low price, though I haven’t actually tried it. I do like the idea of an optional spacer which lets you increase the case height to fit add-on boards.

Finally, a few notes on operation. If you have existing micro SD cards running on the B, they might or might not work on the B+. I use piCorePlayer as a streaming audio client, for which it is excellent, but my existing image would not boot on the B+.  Following a tip elsewhere, I installed the latest piCorePlayer download on the B, updated it to version 1.16A using the web UI, and it then worked on the B+.

image

I had no such problems with the standard Raspbian distro which worked fine on the B+.

image

So do you need the B+? If you have not yet tried a Pi, give it a try, it is fabulous. If you already have a B, then you will find some nice improvements but nothing dramatic – though the extra USB ports in particular are most welcome.

More information is on the Element14 site or of course the official site.

What does Xamarin’s success say about open source versus proprietary? Miguel de Icaza says he has never been happier

image

Yesterday Xamarin, which offers tools for targeting iOS, Android and Mac with C#, announced a partnership with Microsoft, an announcement which I wrote up on The Register. It drew a few comments, several complaining about the cost:

So it cost more then Visual Studio Pro.

And that is for 1 target platform?

or

Not so useful for little indie developers at those prices.

or

From open source to $999 per developer per year. Monetising Mono seems to have worked, so perhaps PCL being open sourced won’t be such a bargain either.

If you check Xamarin’s pricing you will see that the tools are not cheap for casual users; of course, if you are selling thousands of apps or developing corporate apps at normal rates the tools soon pay for themselves.

Xamarin is doing well as far as I am aware; CEO Nat Friedman told me of rapid growth in the number of customers and I have seen for myself the high interest in the tools at events like Microsoft BUILD earlier this year in San Francisco.

This gives me pause for reflection. What does the success of Xamarin, and the relative lack of success of Mono (the open source C# compiler and .NET Framework on which Xamarin is based) say about how well the open source business model works in the real world?

I was reminded of a conversation I had with Miguel de Icaza, creator of Mono and co-founder of Xamarin, Friedman back in February of this year, when Xamarin 2.0 was launched. I asked de Icaza if the new company publishes the source code for all its products?

“No. Our company does proprietary tools for iOS and Android apps. The entire iOS and Android support is proprietary as well as our commercial Mac support. All those three pieces are proprietary while the IDE and the Mono runtime are open source. Whether the code is open source or not depends on whether it is part of core Mono or core MonoDevelop. Otherwise it tends to end up as proprietary.”

Friedman added: “Mono has a thriving open source community around it, and Xamarin has a thriving community of developers who are building commercial mobile apps. We have 12,000 customers, many of them have never heard of Mono. They came to us because they had a problem to solve, they were C# developers and they wanted to get an iOS or Android app built. We solved that problem and that was worth money to them. The reason we have a business is that Microsoft developers do pay for tools, unlike Web developers for example. It’s been a great market for us. It allows us to invest.”

I asked de Icaza if he gets any grief from the open source community for having proprietary code in his company.

“Actually no. We started doing the proprietary bit at Novell. In fact we’ve been doing proprietary for a long time, even before we were acquired by Novell, at Ximian. We didn’t get a lot of grief from people. I can tell you though that when I was working in the Linux world, they were very stressful days for me, because people constantly complain about a “secret conspiracy” and that thing just went out of control. There are some advocates in the Linux world that don’t like anything that has the label Microsoft on.

“Ever since we did Xamarin which meant we focused on Mac and Windows, all that stress is gone, I don’t think I have ever been happier. In the past I was enduring this constant barrage of senseless attacks, and now I never hear about this.

“One thing that happened in the Linux world is that I was very proud of the four or five big apps that were built with Mono. F-spot that we built, Banshee, and a couple of others. Now with Xamarin I can’t keep track of them any more because they are measured in the thousands. There are thousands of very large apps, over a millions lines of code, that people send us. It’s a very different world, it’s just so much larger than all the work we did in Linux days back then.”

Fixing lack of output in AWstats after Debian Linux upgrade

I use AWStats to analyse logs on several web sites that I manage. After a recent upgrade to Debian 7.0 “Wheezy” I was puzzled to find that my web stats were no longer being updated.

I verified that the Cron job which runs the update script was running. I verified that if I ran the same command from the console, it ran correctly. I verified this even using sudo to run with the same permissions as Apache. I also noted that the update button on the stats pages worked correctly. An odd problem.

This is how it rested for a while, and I manually updated the stats. It was annoying though, so I took a closer look.

First, I amended one of the Cron jobs so that it output to a file. Reading the file after the next failed update, I could see the error message:

Error: LogFile parameter is not defined in config/domain file
Setup file, web server or permissions) may be wrong.

I knew the config file was fine, but checked anyway, and of course the LogFile was specified OK.

It was a clue though. Eventually I came across this bug report by Simone Capra:

Hi all, i’ve found a problem:
When run from another perl program, it finds a config file that doesn’t exist!

I applied the suggested fix in awstats.pl, changing:

if (open( CONFIG, "$SiteConfig" ) ) {

to

if ($SiteConfig=~ /^[\\/]/ && open( CONFIG, "$SiteConfig" ) ) {

Presto, everything is running OK.

Not just a four-horse race: three new mobile operating systems joining the fray

Some have declared the mobile OS battle over, won by Apple and Google Android between them. Microsoft and RIM Blackberry will fight it out for third and fourth place.

Maybe, but I doubt it will be so simple. There are not one, not two, but three further open source mobile operating systems which have significant backing.

Tizen is supported by companies including Intel, Samsung, Orange, Vodafone, Huawei, and NTT Docomo, and managed by the Linux Foundation.

image

It is based on what used to be MeeGo (which itself came out of Intel Moblin, Nokia Maemo and so on). Tizen is intended to work on smartphones, tablets, and in embedded devices such as TVs and in-vehicle entertainment.

Firefox OS is a new project from Mozilla, whose Firefox browser is under threat from Webkit-based browsers such as Google Chrome.

image

Mozilla promises that:

Using HTML5 and the new Mozilla-proposed standard APIs, developers everywhere will be able to create amazing experiences and apps. Developers will no longer need to learn and develop against platform-specific native APIs.

Ubuntu also offers a mobile OS, along with an interesting add-on that lets you run Ubuntu desktop from smartphone when docked (this can also be added to Android smartphones).

image

All will be interesting to watch. Tizen is particularly interesting. Samsung is the largest Android vendor and the largest smartphone vendor. While this is currently a win for Android, it is possible that Samsung may want to steer its customers towards a non-Google operating system in future.

Equally, logic says that the open source world would be better getting behind a single Android alternative, rather than three.

Valve announces Steam-powered apps beyond games as well as embracing Linux

Steam maker Valve has announced that it is expanding beyond games, to sell software titles that “range from creativity to productivity”.

image

The Steam software is more than just a store. The platform handles updates, digital rights management, and supports multiplayer gaming. It also forms a chat network. The Steam overlay lets users access Steam features while playing a full-screen game.

Users can install a Steam title on multiple computers but can only play while logged in, and can only log in on one device.

Steam launched first on Windows, but also has clients for Mac and, via Wine compatibility, on Linux. There are also mobile clients for Android and iOS, and some support for PlayStation 3, though these have limited features. The mobile clients do not let you buy and run games for the mobile device itself.

With Apple, Google and now Microsoft backing their own app stores for their respective platforms, Valve has some tricky manoeuvring ahead if it is to avoid being squeezed out. Valve founder Gabe Newell made headlines recently by calling Windows 8 a “catastrophe”, though he is hardly a disinterested party. Note that he should not worry too much about Windows 8 in the short term, since Microsoft’s store does not support desktop titles other than by links to third-party sites, including Steam. However the general trend towards locked-down platforms with software installed only through an official store must be a concern to Newell.

Valve is turning towards Linux as a possible solution. It is talking at the Siggraph conference this week in Los Angeles about its work on OpenGL and Linux, and it seems that a native Linux Steam client is in prospect.

Could Windows gamers, or others disillusioned with Windows 8, turn to Linux in significant numbers as an alternative? While this is possible, it seems more likely that the Mac would benefit. You would also imagine that skilled gamers will be smart enough to operate the Windows 8 Start menu and discover that most of their stuff still runs fine on the new desktop.

The Steam platform is a strong one though, and with Microsoft not supporting desktop apps through its own Store, Valve has a good opportunity to extend its reach.

According to its own stats, Steam has peaked at over 4 million concurrent users this month.

image

Which online storage service? SkyDrive is best value but lacks cool factor

This week both Microsoft and Google got their act together and released Dropbox-like applications for their online storage services, SkyDrive and Google Drive respectively.

Why has Dropbox been winning in this space? Fantastic convenience. Just save a file into the Dropbox folder on your PC or Mac, and it syncs everywhere, including iOS and Android mobiles. No official Windows Phone 7 client yet; but nothing is perfect.

Now both SkyDrive and the new Google Drive are equally convenient, though with variations in platform support. Apple iCloud is also worth a mention, since it syncs across iOS and Mac devices. So too is Box, though I doubt either Box or Dropbox enjoyed the recent launches from the big guys.

How do they compare? Here is a quick look at the pros and cons. First, pricing per month:

  Free 25GB 50GB
Apple iCloud 5GB $3.33 $8.33
Box 5GB $9.99 $19.99
Dropbox 2GB   $9.99
Google Drive 5GB $2.49 $4.99 (100GB)
Microsoft SkyDrive 7GB $0.83
(27GB)
$2.08
(52GB)

and then platform support:

  Web Android Black
berry
iOS Linux Mac Windows Windows
Phone
Apple iCloud X X X Limited X
Box X X
Dropbox X
Google Drive X X X
Microsoft SkyDrive X X X

Before you say it though, this is not really about price and it is hard to compare like with like – though it is obvious that SkyDrive wins on cost. Note also that existing SkyDrive users have a free upgrade to 25GB if they move quickly.

A few quick notes on the differences between these services:

Apple iCloud is not exposed as cloud storage as such. Rather, this is an API built into iOS and the latest OS X. Well behaved applications are expected to use storage in a way that supports the iCloud service. Apple’s service takes care of synchronisation across devices. Apple’s own apps such as iWork support iCloud. The advantage is that users barely need to think about it; synchronisation just happens – too much so for some tastes, since you may end up spraying your documents all over and trusting them to iCloud without realising it. As you might expect from Apple, cross-platform support is poor.

Box is the most expensive service, though it has a corporate focus that will appeal to businesses. For example, you can set expiration dates for shared content. Enterprise plans include Active Directory and LDAP support. There are numerous additional apps which use the Box service. With Box, as with Dropbox, there is an argument that since you are using a company dedicated to cross-platform online storage, you are less vulnerable to major changes in your service caused by a change of policy by one of the giants. Then again, will these specialists survive now that the big guns are all in?

Dropbox deserves credit for showing the others how to do it, Apple iCloud aside. Excellent integration on Mac and Windows, and excellent apps on the supported mobile platforms. It has attracted huge numbers of free users though, raising questions about its business model, and its security record is not the best. One of the problems for all these services is that even 2GB of data is actually a lot, unless you get into space-devouring things like multimedia files or system backups. This means that many will never pay to upgrade.

Google Drive presents as a folder in Windows and on the Mac, but it is as much an extension of Google Apps, the online office suite, as it is a storage service. This can introduce friction. Documents in Google Apps appear there, with extensions like .gdoc and .gsheet, and if you double-click them they open in your web browser. Offline editing is not supported. Still, you do not have to use Google Apps with Google Drive. Another issue is that Google may trawl your data to personalise your advertising and so on, which is uncomfortable – though when it comes to paid-for or educational services, Google says:

Note that there is no ad-related scanning or processing in Google Apps for Education or Business with ads disabled

Google Drive can be upgraded to 16TB, which is a factor if you want huge capacity online; but by this stage you should be looking at specialist services like Amazon S3 and others.

Microsoft SkyDrive is also to some extent an adjunct to its online applications. Save an Office 2010 document in SkyDrive, and you can edit it online using Office Web Apps. Office Web Apps have frustrations, but the advantage is that the document format is the same on the web as it is on the desktop, so you can also edit it freely offline. A snag with SkyDrive is lack of an Android client, other than the browser.

Conclusions

There are many more differences between these services than I have described. Simply though, if you use a particular platform or application such as Apple, Google Apps or Microsoft Office, it makes sense to choose the service that aligns with it. If you want generic storage and do not care who provides it, SkyDrive is best value and I am surprised this has not been more widely observed in reports on the new launches.

One of Microsoft’s problems is that is perceived as an old-model company wedded to the desktop, and lacks the cool factor associated with Apple, Google and more recent arrivals like Dropbox.

Trying out nide – a cloud IDE for Node.js

I was intrigued by reports of nide, a web-based IDE for Node.js. It was one of the entries in the Node.js Knockout challenge last summer.

So how do you install it? One line on Linux; but I did not want to put it on my web server and I re-purposed my spare Linux machine last year after one of my other servers broke.

I decided to run up a Debian install on a Hyper-V server that has a little spare capacity.

image

I then followed the setups here for setting up Node.js and npm (Node Package Manager). I also installed nginx which I have been meaning to try for a while. Linux on Hyper-V works fine, though you have to use a “Legacy” network adapter which compromises performance a bit, unless you are willing to tackle installing Microsoft’s Hyper-V integration components for Linux, which do not support Debian though it is said to work. I do not need a GUI and the legacy network adapter is OK for this.

Everything works OK, though I found that nide does not work in Internet Explorer 9. I used Google Chrome, which makes sense I guess since the same JavaScript engine is used by Node.js.

Nide is a simple affair which is essentially a file manager. Projects are displayed in a tree view, and you select a file to view or edit it. The icons at the bottom left of the screen let you create and delete files and folders.

image

The smartest feature is version management. Files are saved automatically and you can easily compare versions and revert if necessary. The “Go backward in time” button shows that auto-saves are quite frequent.

image

There is also a GUI for npm built-in. Pretty good for a competition entry, though I had a few problems.

If you are interested in web-based IDEs, another interesting one is Orion, an Eclipse project.  Executive Director Mike Milinkovich says Orion will ship a 1.0 release later this year.

image

Miguel de Icaza talks about Windows 8 and the failure of Linux on the desktop

At Microsoft BUILD earlier this month I arrived early to hear Anders Hejlsberg talk about the future of C#, and found myself next to Miguel de Icaza, co-creator of the GNOME desktop and of Mono, the open source implementation of Microsoft .NET. I took the opportunity to ask a few questions, which I have his permission to post.

I recall that when .NET was first announced in 2000, it was not long before de Icaza announced Mono. I was interested therefore to know his reaction to Windows 8 and the new Window Runtime which powers “Metro-style” apps. Will we get an open source implementation of Metro-style on Linux?

I don’t think so. To be honest, with Linux on the desktop, the benefits of open source have really played against Linux on the desktop in that we keep breaking things. It is not only incompatibilities between Red Hat, Unbuntu, Suse, but even between the same distribution.  Ubuntu from this week is incompatible with the one nine months ago. And then there are multiple editions, the KDE version, the Gnome edition, the one that is the new launching system.

When you count how many great desktop apps there are on Linux, you can probably name 10. You work really hard, you can probably name 20. We’ve managed to piss off developers every step of the way, breaking APIs all the time.

I’m heartbroken, that’s the bottom line.

What about compiling your Metro app for iOS or Android?

I think that Linux has a tough time on the desktop. And the desktop is starting to not matter any more. On the other hand, building WinRT is going to be a significant amount of work. A large chunk probably could be reused from Moonlight. But it is a lot of work, to be able to reuse existing Windows apps, and in the case of iOS they already have their own stack, and Mac has its own, Cocoa is really nice and we have .NET bindings for it.

So I think we’ll learn interesting lessons from Metro. There is stuff that will be useful on other platforms like the JSON reader. But I’m not going to spend any time on WinRT for other systems.

And we can speculate about how well Metro will work in the market …

They are Microsoft, it’s going to succeed. In three years they are going to have this thing on half a billion computers, so it will be out there.

It seems like they are going to use their muscle for two things. It’s going to be a tempting space [for developers], but if you want to go into the right distribution channel for that half a billion computers, you need to abide by the Metro guidelines. They are not going to give you full API access, they are going to give you the sandboxed version. Which is good, because it can finally fix the security problems on Windows. They are going to use their muscle to reset the rules for Windows.

Especially on ARM

Right, and it is needed, they definitely need to fix this mess, a lot of malware, spyware, and the fact that everybody is sysadmin, and has to reinstall their machine every so often.

I’ve heard the word “safe” a number of times.

Right, and think of an iPad, you don’t need to be a sysadmin.

Now, you could argue that by WPF not being available to everybody and being bound to .NET they limited the effect WPF would have had, whereas Metro gives this to C++ developers, but they’re saying, hey, you can’t call Win32, there is all the Win32 stuff you can’t call. You have to use Metro. So they might be repeating that [mistake], but maybe it’s eclipsed by the fact that there’s going to be a rush to the app store. It seems like there is a big enough carrot now.

How are you getting on with the Windows 8 tablet?

I have to say, I actually like Windows 8. I am not a Windows user. It’s probably the first time that I would use a Windows machine.

Miguel de Icaza is now at Xamarin, providing cross-platform tools for using C# and .NET to build apps for Apple iOS and Google Android.

Android only 23% open says report; Linux, Eclipse win praise

Vision Mobile has published a report on what it calls the Open Governance Index. The theory is that if you want to measure the extent to which an open source project is really open, you should look at its governance, rather than focusing on the license under which code is released:

The governance model used by an open source project encapsulates all the hard questions about a project. Who decides on the project roadmap? How transparent are the decision-making processes? Can anyone follow the discussions and meetings taking place in the community? Can anyone create derivatives based on the project? What compliance requirements are there for creating derivative handsets or applications, and how are these requirements enforced? Governance determines who has influence and control over the project or platform – beyond what is legally required in the open source license.

The 45-page report is free to download, and part-funded by the European Union Seventh Framework Program. It is a good read, covering 8 open source projects, including the now-abandoned Symbian Foundation. Here is the result:

Open Governance Index (%open)
Eclipse 84%
Linux 71%
WebKit 68%
Mozilla 65%
MeeGo 61%
Symbian 58%
Qt 58%
Android 23%

The percentages are derived by analysing four aspects of each project.

  • Access covers availability of source code and transparency of decisions.
  • Development refers to the transparency of contributions and acceptance processes.
  • Derivatives covers constraints on use of the project, such as trademarks and distribution channels.
  • Community structure looks at project membership and its hierarchy.

What is wrong with Android? I am not sure how the researchers get to 23%, but it scores badly in all four categories. The report observes that the code to the latest “Honeycomb” version of Android has not been published. It also has this to say about the Open Handset Alliance:

When launched, the Open Handset Alliance served the purpose of a public industry endorsement for
Android. Today, however, the OHA serves little purpose besides a stamp of approval for OHA
members; there is no formal legal entity, no communication processes for members nor frequent
member meetings.

By contrast, Eclipse and Linux are shining lights. MeeGo and Mozilla are also praised, thought the report does mention Mozilla’s “Benevolent dictators”:

In the case of conflicts and disputes, these are judged by one of two Mozilla “benevolent dictators” – Brendan Eich for technical disputes and Mitchell Baker for non-technical disputes.

Qt comes out OK but has a lower score because of Nokia’s control over decision making, though it sounds like this was written before Nokia’s Windows Mobile revolution.

WebKit scores well though the report notes that most developers work for Apple or Google and that there is:

Little transparency regarding how decisions are made, and no public information provided on this

Bearing that in mind, it seems odd to me that WebKit comes above Mozilla, but I doubt the percentages should be taken too seriously.

It is good to see a report that looks carefully at what it really means to be open, and the focus on governance makes sense.

Embarcadero promises Delphi everywhere: Mac, iOS this year, Android, Blackberry, Windows Phone to follow

I noticed the following remark from Embarcadero’s David Intersimone regarding Delphi, its application builder based on Pascal.

We are putting Delphi (and C++Builder) everywhere this year and over the next 5 years. Today you can use Delphi for Desktop, Client/Server, Multi-Tier, Cloud, Web, Web Services (REST and SOAP). This year you will also be able to build for Macintosh and iOS. Linux is also on the roadmap for the coming years along with Android, Blackberry and Windows Phone 7.

Welcome news; though Delphi enthusiasts are all too familiar with bold promises. Two years ago I interviewed Embarcadero’s CEO Wayne Williams and he promised cross-platform Delphi in 2010; but when Delphi XE appeared last year neither Mac nor 64-bit (another longstanding request) was included.

That said, I am still a big Delphi fan. Mobile is a particularly interesting prospect. I have tried numerous cross-platform mobile toolkits and they all have problems; on the other hand they are improving fast and in a couple of years things like Appcelerator’s Titanium and  Nitobi’s PhoneGap may be hard to catch.

Update: what will Delphi’s Android support look like? I would be interested to know whether Embarcadero is working on its own compiler, or whether it is partnering with RemObjects and that what Intersimone is referring to is Project Cooper:

“Cooper” is a new and exciting research project going on in the RemObjects Software Labs, to bring the Oxygene language to the Java and Android platforms. The original Oxygene for .NET set out to bring a modern and “next generation” Object Pascal to the .NET world; Project “Cooper” is taking this endeavor to the next level, expanding the reach of Oxygene to the second big managed platform.

In other words, Project Cooper will compile Delphi code to Java.

Note that Embarcadero officially adopted Oxygene and offers it as its own product called Prism. It seems plausible that the same will happen with Project Cooper. Since Windows Phone is a .NET platform, there is also potential for Oxygene/Prism to target Microsoft’s mobile platform:

Windows Phone 7 – Microsoft’s new Windows Phone 7 uses Silverlight for application development,  and did I mention Delphi Prism does Silverlight?

says Jim McKeeth at RemObjects.

What about Delphi on the Mac and on iOS? There is also a possible Oxygene/Prism route here, via MonoMac: Delphi to .NET/Mono to Mac. However, I suspect Delphi developers would be disappointed if this turned out to be Embarcadero’s approach to Mac and iOS support. Programmers choose Delphi because they like compilation to native code.