The new Raspberry Pi computer and Xojo able to write apps for it opens up a new opportunity for Xojo developers. However, because the SD card can be removed from the computer, there is no apparent way of protecting the app from being copied and distributed on to other SD cards outside of having copy protected cards made by a third party. Thus, it clears the way for people to easily pirate your apps.
I was wondering if there was a way that Xojo can read the Pi board’s serial number. I saw a python function called getserial() that reads the Pi’s unique serial number, but I don’t know how this could be rewritten in Xojo. The code is listed below:
Extract serial from cpuinfo file
cpuserial = “0000000000000000”
f = open(’/proc/cpuinfo’,‘r’)
for line in f:
cpuserial = line[10:26]
cpuserial = “ERROR000000000”
That way code could be written to an encrypted database file on the card that matched the serial number of the board. (You sell the app and and the Raspberry Pi Unit as a package) That way if someone tried to remove the SD card and put it in another RP computer, it would not work.
Another way to protect from piracy was if there was a way to write directly to the Pi board somewhere. So when the app was loaded, it would compare a value on the board with the value stored in an encrypted database on the card.
If piracy could be prevented, this could offer Xojo developers a new revenue stream.