My Synology DS214play setup

Synology DS214 PlayA NAS is a wonderful beast: you can use it to create your private cloud to store, backup and share your files, as a DLNA media server for smart TVs, as a download station for a variety of different contents and much, much more. True, you can configure your RasPI to do the same job, but appliance solutions are just… Ready to use! In the hard task to pick-up one for my house, my choice, eventually, has gone to Synology DS214play.

Why? Because Synology is a very well known manufacturer of corporate NAS solutions and the software used in the high end products is the same of consumer segment of their offer. Because they have a huge number of clients available for practically all OSes, desktop and mobile, to sync files, watch videos, listen to music, download files, acts as a web, mail, file, git server, IP cams monitoring and much, much more. Because they are easily customizable and there is a vibrant community (even in Italian) of professional and domestic users behind these products. And because the DS214play has an Intel Atom CPU, can transcode 1080p video on-the-flight, has 2 bays for HDs and has an affordable price.

 

Cloud store, and file sharing

First of all, the NAS can be used as Cloud Station to create a private cloud storage, while the dedicated app  keep in sync your data across different machines (no matter of the OS). Once the router and a dynamic DNS service are configured, data is kept in sync also outside the LAN, so bye bye to Dropbox, Google Drive and any other public cloud services.
In alternative, it is possible to setup a classic rsync flow between a Linux/Mac and the NAS. I used the latter, and now I backup my entire desktop HD to the NAS, and the NAS can then backup its entire content (or part of it) on a cloud backup storage, like S3, Azure and others. Steps to setup rsync, ssh keys and all the whole process are explained here. If ssh connects to the NAS but rsync doesn’t work, Network Backup has to be enabled  via Menu -> Backup & Replication -> Network backup destination -> Enable Network Backup.

 

Extending the software

SynoCommunityAdditional software could be added using a well-know packages-repositories mechanism. The official repository has some app, but the real magic starts when the SynoCommunity repo is added to the system. Git Server, Horde, ownCloud, CouchPotato, Python, Memcached, Mercurial, Headphones, SABnzbd and many more are all at a click distance now. And they run directly on the NAS, with a lower power consumption compared to a dedicated pc.
It is also possible to create new packages with the help of spksrc, a cross compilation framework intended to compile and package softwares for Synology NAS

 

Manage movies, TV series and video in general

First solution is to use DS Video, the dedicated client to manage the personal collections of movies, TV series and videos. It’s available via web interface, for mobile OSes and included in some Samsung TVs. ChromeCast is supported, so is possible to browse the movie catalog from web / smartphone /tablet and watch it directly to the TV, without connecting a single cable. Obviously the video format have to be compatible with Chromecast, but it’s always possible to re-encode the video in a supported format (download on a pc, convert, copy back to the NAS).

Plex Media ServerIf DS Video is not enough, Plex Media Server can be installed too, with all the goodies Plex offers :). Once the Plex package has been downloaded, a manual install in the Synology Package center is required. Before doing so, Settings -> General -> Trust Level -> Allow any publisher, otherwise the installation will fail with a “This package does not contain a digital signature” error. Plex server new versions has to be checked from time to time, because it isn’t automatically updated by the Synology Package center. Finally, Plex does not support the hardware transcoding features of the DS214play or DS415play, so up to 720p videos are transcoded, with stuttering and pausing during playback and 100% of CPU usage. But Plex interface is way better than DS Video to me, catalog recognizes a bigger number of videos, so I still prefer to use Plex for browsing and organizing my movies and anime collection.

 

Music and Photos

I’m not a big user of music (I’ve a Sonos system at home, all the rest is history now), but music works pretty much like movies, with a dedicated app plus some more available from the community. Photos too.

 

Download station

One of the area where Synology excels is the entire pipeline of scouting, grabbing, downloading, organizing and making available contents. For example, it’s possible to simply add a movie to the IMDb Watchlist and have it automatically downloaded at home, ready to be streamed to the TV via Chromecast. Or as soon as a followed TV series has a new episode aired, it is automagically downloaded on the NAS, with subtitles, ready to be viewed on XMBC, without any intervention. Amazing! :) Let’s see a potential setup for this. Please note that the following steps bring to illegal actions in different countries, so I highly discourage everyone in doing that.

One way for automagically having latest TV series episode without a single interaction, uses a RSS feed technique. On the search results page of Kickass and other services, it’s easy to find an RSS icon that points to an RSS feed with the results of the search. Every time the feed url is loaded, new results can be found inside it, if any.  A specialized service, like showRSS, can create more fine-tuned feeds, with a particular file quality only etc.
The default Download Station app is used to download BT/HTTP/FTP/NZB/Rss feed/eMule files, so the RSS feed url can be added to the app, checking “Automatically download all items” option. Voila’, it works :) A drawback of this approach is that non-useful downloaded files must be manually deleted and subtitles are not downloaded.
If Kickass-like services are banned in a particular country, generally changing the NAS or router DNS and use OpenDNS (208.67.220.220) or Google Public DNS (8.8.4.4), can workaround the limitation.

 

A more advance setup for the download station

Sick BeardSick Beard watches for new episodes of favorite TV shows and when they are posted, it downloads, sorts, renames, generates metadata and download subtitles, plus more. It is available as package in the SynoCommunity repo and, once installed (along with Python package), can be configured to use Download Station for downloading snatched files. SABnzbd can work too for nzb files (available in the SynoCommunity repo).
If Sick Beard is unable to communicate with Download Station directly, a Watched folder can be configured in Download Stations under Settings -> BT/HTTP/FTP/NZB -> Location, and SickBeard need to save torrent and nbz files in that folder, under Settings ->Search Settings -> NBZ or Torrent search -> Method: Black hole and selecting the same folder used before. Now Download Station will look for files in that folder, grab them as soon as they’re added by Sick Beard and start the download.
In the Settings, subtitles download can be enabled, while post-processing options are useful to rename and organize files and download metadata (for XMBC, for example) once Download Station has downloaded them.

couchpotatoSimilar approach for movies, this time using CouchPotato. Once installed from the SynoCommunity repo (Python package required too), Settings -> Downloaders -> Black hole directory to communicate directly with the Download Station. Then CouchPotato can be configured to follow IMDb or Movies.IO watchlist, Goodfilms user queue, Rottentomatoes, IMDb, Kinepolis charts and much more.
The potential issues with the standard version of CouchPotato is that it searches only on some newsgroup services, with a limited support for torrents. To solve that, is possible to install the CouchPotato Custom package instead (and Git and Python packages) from the SynoCommunity repo and, during the first launch, specify a github repo with a customized version of CouchPotato. For example, https://github.com/RuudBurger/CouchPotatoServer.git is also able to search on ThePirateBay and KickAssTorrent services. Change DNS as specified above if required.

SickRageIf ThePirateBay and KickAssTorrent are a need also for TV series, the same, “Custom” technique could be used with a fork of Sick Beard, called SickRage. Installation is pretty straightforward: first the Sick Beard Custom package (with Git and Python packages) from the SynoCommunity repo need to be installed and, during its first launch, https://github.com/echel0n/SickRage.git must be used as Fork URL and master as branch. That’s all, with more detailed instructions in the official forum. Configuration of SickRage follows the same settings of Sick Bears, but now there are a bunch of additional Search Providers to use ;)

 

The NAS is really a great piece of hardware, and software flexibility allows to use in a variety of different way (what about hosting your WordPress blog there?). Future exploration will bring, for sure, to additional setups (I’ve in mind something for IP cams, for example), so stay tuned!

 

Fastboot mode for Android Wear devices (G Watch, Gear Live, SmartWatch 3)

Putting Android devices in Recovery mode / Fastboot, when you don’t have access to adb, is an art. And Android Wear, where you have only one button (the power button), adds even more entropy to the whole process.

So let’s gather the different procedures for the different watches.

LG G Watch

  • Find the reset button: it is on the back of the device, near the pins to charge it.
  • Press the button using a paperclip, a SIM ejector or your fantasy
  • Wait for LG logo to appears on screen
  • While the logo is showing, swipe from the top left-hand corner to the the bottom right-hand corner in one, diagonal swipe.
  • From the Fastboot menu, you can launch the Recovery Mode
  • Video

LG G Watch R

  • Turn off the watch and then turn it on normally
  • Wait for LG logo to appears on screen
  • While the logo is showing, swipe from the top left-hand corner to the the bottom right-hand corner in one, diagonal swipe, pressing and holding the power button
  • Alternatively, if the swipe doesn’t work, instead of swiping start tapping the screen with two fingers, one on the top left (10) and one on the bottom right (4), pressing and holding the power button
  • From the Fastboot menu, you can launch the Recovery Mode
  • Video

Samsumg Gear Live

  • Turn off the watch and then turn it on normally
  • Wait for Samsung logo to appears on screen
  • While the logo is showing, swipe from the top left-hand corner to the the bottom right-hand corner in one, diagonal swipe, pressing and holding the power button
  • The bootloader appears
  • Select the Fastboot or Recovery mode swiping downward, and swipe to the right to confirm the selection.

Sony SmartWatch 3

  • Detach any USB cable connected to the watch
  • Turn it off holding the power button and keep holding the button until the watch vibrates three times and then switches it off
  • Press the power button and keep holding. A blue screen that prompts to insert an USB cable will display
  • Double tap the power button
  • A black menu will display, with on-screen instructions
  • Move to Fastboot or Recovery Mode pressing the power button, once a time
  • Select Fastboot (or Recovery) by double pressing the power button

For extreme modding, there is also a third mode available, the Download mode.

Dalla prima email agli occhiali intelligenti, Uni Pavia

Difficile pensare che sia tutto partito da un semplice messaggio trasmesso nella primitiva ragnatela del web. Eppure oggi abbiamo i social netwok, gli OpenData, e persino macchine in grado di guidarsi da sole. Un viaggio tra le più importanti rivoluzioni che l’informatica ha introdotto nella nostra vita quotidiana, senza tralasciare temi come privacy, community, cybercrime, e computer così piccoli da stare in un paio di occhiali.

(6 Giugno 2013, Universita’ di Pavia)

Howto install Debian GNU/Linux on HTC Universal

htc_universallinux_1_tn.jpg

What follows is my personal experince in installing GNU/Linux on a HTC Universal pocketpc. I used Titchy Linux, a Debian Lenny based distribution with special drivers/config for HTC Universal. But the heart is Debian, and full support to Debian repois is grated.

Actually the only not working hardware is:
-camera.
-wifi sometimes works, sometimes doesn’t, the driver is unstable.

First of all, I splitted a 1Gb SD memory stick into two partitions: the first with 32Mb of size and FAT32 filesystem, the second an ext2 filesystem in all the remaining space. In this way, I can port all my config in another HTC (launcher and Linux installation) and show the magic of Linux to all of my Universal-friends. If you need some shared data on memory card, between Windows Mobile and Linux, simply make the FAT32 partition bigger and use it for storing these data.

I followed the steps in Titchy wiki for Universal installation and I copied haret.exe, zImage and startup.txt in the FAT32 memory stick partition. After 30 minutes, thanks to Titchy image, my HTC Universal booted with Linux. Included in the image a very nice sms /calling graphical interface, access to it pressing the green phone key. That’s all, have fun!

For alternative install (no xfce file manager, encripted home partition and lot of tricks) there is another great resource, with lot of useful post-configurations. Be sure to read the Titchy wiki for UMTS and Bluetooth access to the Internet.


RAM CONSIDERATION
: The HTC Universal has only 64 Mb of ram, and the base system, with
textual console, uses 12 Mb of it. XFCE installed by Titchy is nice, but the ram
consumption arrive to 40 Mb and the system responsivity is very bad.
With IceVM, instead, the totat used ram is 24 Mb and the system
responsivity is still good.

And now, general tip’s tricks.

Continue reading “Howto install Debian GNU/Linux on HTC Universal” →

Stampare un’immagine su piu’ pagine

blockposter.gif Se avete l’esigenza di stampare un’unica immagine su piu’ pagine, ecco qualche link utile:

Block Posters: questo sito permette di caricare un’immagine JPG grande fino ad 1 Mb, scegliere il formato della carta ed orientamento (A4 o US Letter, verticale o orizzontale) ed indicare il numero di fogli su cui suddividere la stampa. Dopo l’elaborazione, si otterra’ un PDF con l’immagine divisa, fetta dopo fetta, nelle pagine richieste.

The Rasterbator: meccanismo di funzionamento molto simile al primo, con la differenza che l’immagine generata e’ una rasterizzazione dell’immagine di partenza. In pratica l’immagine originale viene trasformata in tanti piccoli punti, che visti da vicino non hanno senso, ma quando si osservano da lontano in una visione d’insieme, ritrovano il loro significato originario. Ideale quindi per stampare grandi poster (anche qualche metro di lato) da appendere su grandi muri.

PRTLGPCT.EXE: Print a Large Bitmap on Multiple Pages: se siete dei programmatori, questo articolo dalla KB della Microsoft mostra come realizzare con poche righe di codice un programma in Visual Basic 6 (ma facilmente riadattabile anche al .NET) per stampare un’immagine suddivisa in piu’ pagine.

Continue reading “Stampare un’immagine su piu’ pagine” →

AS/400 tn5250 terminal on Linux

as400term-xt5250_tn
There are lot of ways for accessing to the AS400 functionalities (today know as iSeries, a wide-used “mainframe” produced by IBM) and one of the most important is, surely, the tn5250 terminal emulation.

Under Gnu/Linux, we can do this with different software, and each one has is pros and cons.

Personally i used the tn5250 software for simply terminal emulation, but also the IBM iSeries Access for Linux can be used for most advanced functions.

tn5250 – Linux tn5250 emulator

Under Debian and Debial-like distros (like Kubuntu, that i use), first step is install the tn5250 software

sudo apt-get install tn5250

or use your preferred package manager (synaptic, kpackage, others)

After this, you are virtually ready to connect to your AS400. Just run the following command (172.16.1.1 is the IP address of my AS400):

xt5250 172.16.1.1

The software, like the tn5250 protocol itself, has lot of options, but for my needs the most important are:

  • map: set the translation table between ASCII and EBCDIC. In my case, i use an italian translation map, corresponding to the code 280. For a list of all translation maps, run this command: man tn5250rc and search for the Translation Maps section
  • env.DEVNAME: set the device name for the AS/400 to assign to the 5250 session. In my case, this name is DSP002A
  • env.TERM: Set the terminal model name for the emulation session to use. In my case is IBM-3477-FC (80×132 color mode). For a list of all terminal models, run the same command of above, man tn5250rc, and search for Display Types section
  • font_80: the font used when terminal is in 80 column mode
  • font_132: the font used when terminal is in 132 column mode

Ok, with this parameters, my launch string became:

/usr/bin/xt5250 map=280 env.DEVNAME=DSP002A env.TERM=IBM-3477-FC font_80=10×20 font_132=10×20 172.16.1.1

I put this string in a new menu entries, using the icon from the file /usr/share/pixmaps/tn5250-48×48.png

Kde menu with tn5250 shortcut

Joke is done :)

Little trick: with Ctrl + Right click over the tn5250 window, you can access to the “VT Fonts” menu, and with Ctrl + Left click you can access to the “Main Options” menu.

You can also create a config file with all the options and then launch xt5250 <filename>. Search under the tn5250rc manual page for more information and take a look to this and this useful topic

{mxc}