Tuesday, October 6, 2009

Iphone RemoteControl for Emtec N200

How-To use any web-capable PDA as a RC for your N200
(Edit: Description adapted to newer, faster version)
(Edit2: Installation hints added, 'roadmap' extended)

NOTE: The information below is outdated, the pastebin-links have expired, and a fellow Reader has posted an alternate, better, and prettier version here:
Blog of Adicon

There are several reasons why you could want this:
  • Your table already hosts a zoo of remotes.
  • Your PDA doesn't feel flimsy like the default remote.
  • Your PDA uses a rechargeable battery. (priceless in the right moment)
  • Your device has more functions than buttons on the remote.
  • You get RSI from the awkward button placing or the funny shape of your hand.
  • Works through cabinet doors and even with poor aiming.
  • You can call your PDA-Phone if you lose it in the house.
  • You already use your PDA to control other AV-devices.
Some of these may not apply to you, but at least some should speak to you too. For me, 1, 4, 8 and sometimes 7 carried the most weight.

Screenshot of it in action (http://n200/cgi-bin/pda.cgi):

Mute Power
Media
Info
SubsBack ^Vol
+
Audio< Enter
/Go
>
PrevNext v Vol
-
FR FF StopPlay /
Pause
Chap
<
Chap
>
10sec
<
30sec
>
Zoom
-
Zoom
+
RepSlow
01 2
34
56 7
89


As you can see, I believe simplicity is one expression of elegance.
(Plus, it loads fast too and has nearly no dead space)

So, what do you need?
  • Emtec N200 or compatible device (feedback please!)
  • An IPhone or other web-enabled PDA (feedback please!)
  • telnet access to the device.
  • 2 scripts, 1 and 2, which are downloaded/used during the below installation steps.

Device preparation:
Some startscripts and the system area of the device will need to be modified, this is a one-time action, and has proven useful in other ways too. The device needs Internet Access during the installation to download the above scripts, or the 2 'wget'-commands will need to be adapted/replaced.
Now you need the telnet access to execute the following commands:

1. Make Root-Filesystem writeable:

/ # mount -o remount,rw /

2. Installing busybox1.9.1 with mkfifo support:

/ # mkdir -p /opt/bin
/ # cd /opt/bin
/ # wget http://moviecube.free.fr/Binaries/busybox1.9.1/busybox1.9.1
/ # chmod +x busybox1.9.1
/ # for i in top netcat strings mkfifo ether-wake nc; do ln -s busybox1.9.1 $i; done

3. Installing the WebUI

/ # cd /tmp_orig/www/cgi-bin
/ # wget -O - http://ralexs.pastebin.com/pastebin.php?dl=m2ccfab9b |sed "s/.$//" >pda.cgi
/ # chmod +x pda.cgi

4. Installing input redirection for DvdPlayer binary

/ # vi /usr/local/etc/rcS

Then go to this page, select all the text from the bottom textbox, and copy-paste it into the second line of the file currently open in the editor, /usr/local/etc/rcS

5. Setting launch trigger, committing changes and reboot

/ # touch /tmp_orig/loadExtScript
/ # sync
/ # mount -o remount,ro /
/ # reboot -f


Done!

Now just navigate -on whatever device- to:
http://IP.OF.UR.N200/cgi-bin/pda.cgi

On the Iphone you have to scale the page to the right size at first use. Can somebody test with a WinMobile device?

Note for developers concerning the major changes from V1:
The old version of this script used an input redirection based on "tail -f". That proved to be ineffective and slower. The new script uses "dd bs=1" and "mkfifo", which is why the installation requires the download/install of the enhanced busybox.

My current 'development version' of the script has more buttons. I've added "GoTo/Search" and "Root". "Eject", "TV Sys", and "Option" are still missing, because I did not (yet)find/integrate their codes. "Option" is not really needed though, because all its functions are available with direct keys.
The keycode behind the "Root"-Button is '/'. This *may* provide a way to build an http-file-browser, but i still need to do some testing.
StandBy-Mode, something missing from the default N200 may also be added to the next version (Also pending further testing/cleaning).
Step Nr.4 from the above steps will be replaced by a simpler wget command (I dont have the original rcS anymore, and have not yet looked for the 'unyaffs' incantation to extract a virgin copy).
I will post a new version soon, check back in 2,3 days.

The work described here was inspired by these two forum posts.

thanks to commenter l.lenzen for pointing out 2 problems with the above description, and thanks to 'triw' on the Emtect Moviecube forum for pointing towards 2 fixes, which I integrated in the above description.

have fun, ralexs

Tuesday, September 22, 2009

Communities and useful sites for the N200

Here's a list of useful internet ressources for the Emtec N200:

Emtec (manufacturer) official:
  • Current official firmware here.
  • Sources of the GPL'd parts here.


Third-Party forum and utilities:


I joined the MHDWorld forum, as usual trying to help others while pushing my own little agenda :)

Threads started by me:

Note: Unfortunately a.k.a. "Unanswered Questions"

Feel free to chime in, if you've found another useful ressource not yet listed here. Thanks already.

Thanks also go to the individuals who have already amassed lots of good resources (people, pics, code and text). Telemak, Bogy, Honki and Cybermomo, and ...
I would like to give proper credit for all the above links, but for some of them i don't know yet who created these resources.


Thanks for reading, see you later.

Emtec N200: Network footprint

The N200 runs Linux and is network-enabled by default. It supports local storage (USB and SD-Card). As such I bought it hoping I could extend it in ways not originally intended by the device manufacturer. Lets get to work:

A network scan reveals some interesting details:

# nmap n200
Starting Nmap 4.76 ( http://nmap.org )
Interesting ports on 192.168.n2.00:
Not shown: 997 closed ports
PORT STATE SERVICE
23/tcp open telnet
80/tcp open http
8082/tcp open blackice-alerts
MAC Address: 00:CE:39:DE:DB:EF (Unknown)
Nmap done: 1 IP address (1 host up) scanned in 0.89 seconds


Port 80 was to be expected, everything these days has a web-interface, however functional. Port 23 for Telnet was a happy discovery, and promised deep-level access into the device.

On port 23 we find the expected login prompt, and we get a root shell without a password. Swell. We will set a password later on.

Unfortunately, the N200 doesn't have netstat -plunt, even worse, it has no netstat at all.

Edit: I found a compatible busybox binary with netstat builtin.

/tmp/usbmounts/sda1/bin # ./busybox1.9.1 netstat -lunt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8082 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
udp 0 0 0.0.0.0:8086 0.0.0.0:*
udp 0 0 0.0.0.0:54450 0.0.0.0:*
udp 0 0 0.0.0.0:1900 0.0.0.0:*
Even more unknown ports! 1900 is supposed to be UPNP. Through testing, the 'DvdPlayer' binary is known to be the one using all these ports. But what for?

Note: Anybody know a way to show listening ports (with processes) without netstat?

I turned to the webpage, hoping for something that resembles the web interface of my Dreambox 800, including a PDA-usable virtual remote control. Some pointers pertaining to Port 8082, perhaps it being the admin port for some software component, like a builtin transcoding UPNP MediaServer ... </wishful_thinking>

The webpage was -well- rather limited. I suppose its useful for the integer-adding-impaired, but apart from that? Back at the root shell, with ps we find inetd running, enabled services are telnetd and httpd, both of which are symbolic links in /usr/sbin/ pointing to busybox.

Inspecting the contents of /var/www/cgi-bin/ it becomes visible, that the webpage summing up 2 number is meant to demonstrate the ease at which one could add more functionality through simple shell scripts.

All this is great news, but we still don't know what Port 8082 is about? It's probably not 'blackice-alerts'!

I tried connecting to it, which worked, but after that i pretty much hit a dead end for now:

# telnet n200 8082
Trying 192.168.N2.00...
Connected to 192.168.N2.00.
Escape character is '^]'.
help
?
test
W
X
menu
^]
telnet> quit
Connection closed.


No matter, what I typed, no returned output at all.

Thanks for reading; if you have some useful info (or praise), please do leave a comment.

Examining N200: 'DvdPlayer' - The Main program (Part1)

Startup & commandline options

The main program on the Emtec N200 is DvdPlayer. It resides in /usr/local/bin. The script to start it is /usr/local/etc/rcS. DvdPlayer itself then creates a few dozen forks.
After telneting to the Device, the command stopall allows the user to shutdown the GUI. Following that it is possible to relaunch it with commandline options.

To find out the available options:

/usr/local/bin # DvdPlayer --help
CMD: mkdir -p /tmp/netb/smb
In my system...
CMD: mkdir -p /tmp/smb
In my system...
CMD: ifconfig > /tmp/netb/samba_my_ip
In my system...
file system 2, sector 4294966272
mount to /usr/local/etc/hdd/volumes/HDD1
file system 4, sector 262144
mount to na
file system 3, sector 262144
mount to /usr/local/etc/hdd/root
MediaServer.cpp , 433 bind local IP fail !!error = Unknown error 125
station id [467] not found!
station id [2049] not found!

mele_iradio_init ok!

s_n_stations = 236

GrandMa Revision: 188778
rev: v7.1.1 r1193 by fengyh@MeleSoft at Jul 22 15:39:16 2009
Unrecognized option: --
DvdPlayer: -h -l [on/off] -o -p -f [NTSC/PAL]
-h: help
-l [on/off]: user input logging switch, defaultly off
-o : output file for output. Defaultly log.txt will be written
-p : output file for timing information logging
-f [NTSC/PAL]: select TV system (encoder)
-s [POWER/EJECT/RTC]: select start mode
-r [0/1/2/3/4/5/6/7/8]: set region code
-A : audio dumpfile
-V : video dumpfile
-S : size for debug memory
-t: calulate AP starting time

mele_iradio_release !


I'm not quite sure, what the first block of messages is trying to tell me, but the lower half is quite helpful. There are also some terms that seem noteworthy, like mele_iradio, MediaServer and GrandMa Revision. The Firmware version number Emtec uses is also contained here (rev: v7.1.1 r1193)

If you can shed some light on the meaning of the first half, please do so in the comments section. I will soon publish another post about the actual options, and how they can be applied in a permanent fashion.

Thanks for reading.

Sunday, September 20, 2009

Emtec N200: My new Mediaplayer

Replacing my PS3 as HD-Mediaplayer with the N200 was a good choice.
The PS3 was loud and picky, while the N200 plays most everything I tried, noiselessly.

German: Der lautlose N200 hat meine PS3 auch bzgl. unterstützter Formate aus dem Wasser geschlagen, und ist daher mein Haupt-Mediaplayer geworden.

Even so, like most devices more powerful than a calculator, it has a few addressable shortcomings. On the other hand, with the right 'glue' this device could be even more. This device, and compatible devices have already gathered quite a community, and some extensions to the Linux-based system have already been published.

German: Leider hat dieses Gerät, wie die meisten modernen Elektronikgeräte, einige Eigenarten. Glücklicherweise lassen sich viele davon durch Firmwareupdates beheben, oder sind es schon. Für dieses, und einige andere kompatible Geräte gibt es schon ein paar Foren, und Erweiterungen für dieses Linux-basierte Gerät sind auch schon im Umlauf.

Note: This post is not finished, come back soon
Edit: Added some German text

Wednesday, September 2, 2009

Excerpt from my current iPhone apps list

Categorized, though mostly focused on remote controlling and media access, along with some notes:

[Remote] Media Control/Playing:
  • MPoD - controls mpd, my Home Stereo system.
  • dreaMote - controls your DreamBox DVB Receiver.
  • XBMControl - controls XBMC, the great Media-Center.
  • (non-free) PlugPlayer - UPNP Media Control (Experimental).
  • (non-free) iMediaSuite - UPNP Media Control (Experimental).
  • iLirc from daspider - LIRC Integration, unfortunately not (yet?) in the App Store, so currently only usable on phones with removed App restrictions. (Thus currently non usable for me)
Generic remote control applications:
  • Touchpad (non-free) - Use your iphone as external wifi touchpad.
  • TouchTerm - SSH Client with some nice features.
WebDAV-related, and not bound to specific providers:
  • Disks - Supports SSL Connections. Still testing.
  • DAV-E free - Still testing.
Communication:
  • XSPhone - SIP VoIP Client, configurable for other providers.

If you know any noteworthy additions to above list, or have any other hints or notes, like free functional equivalents to the non-free applications, feel free to drop me a comment.
I will update this post as time progresses. Thanks for reading.

Tuesday, September 1, 2009

Post-S02E11 True Blood thoughts

Nice episode overall, but I do concur with most people out there, that the Maryanne storyline really needs to die soon. And go out with a big bang, off course. But some finer points were raised in this Episode.

Eric Northman flying like Kal-El? I thought he could only levitate. OK, "levitate up" to a 3rd floor window. But Superman-style? Or am i forgetting a mention of this from the Books?

YES, more Pam please! Doesn't anybody else think Pam/Kirsten Bauer is underrepresented in both airtime, and mention in the credits? And TV-sites mostly only call her "recurring guest role". Reading about Pam in the books was/is one of my reasons for watching TB. In the Books she is much more present and important.

Is Lafayette going to be the new Bubba? To me it seems like they are constructing Lafayette to fit into Bubba's shoes. Think about it:
  • He already likes Sookie Stackhouse as a friend, and cares for her.
  • He's not interested in Sookie the way all other Supes are.
  • Lafayette is alive, when in the books he is dead.
  • Bubba would soon make an appearance in the storyline.
  • Conversion going bad because of drug abuse history? +1 for Lafayette
  • Bubba was an artist. Lafayette did some dancing (and other "performances")
  • Bubba is not too bright, but has a good heart.
  • Bubba is under Eric's command, as Lafayette'd be, if Eric "made" him.
  • They brought up turning Lafayette Reynolds in the TV-series already.
On the plus side for the studio and the writers: They don't need to worry about losing LR's fanbase, since Bubba is around a lot later. And this way they don't have to find awkward ways for re-including a dead Lafayette character in current and future events.

So, here is my suggestion, on how they could play this out:
We know, Lafayette has come to Sookie's/Maryanne's house with bags of party snacks. I guess he could get apprehended, turned into a party-animal with bug-eyes and gobs down some colorful ones too. Add some music and orgy, True Blood style.
Then the big guns (Bill Compton, Eric Northman, hopefully Pam, and Sam Merlott) show up. I hope we get to see Sam as some big, sleek, fast and deadly animal. Unfortunately, with Karl (the previous companion to Maryanne) out of the picture, the only bug-eyes left are the local, possessed people. So Sam will probably not gruesomely tear any bad guys to shreds.
Well, then mayhem ensues. Lafayette gets banged up pretty bad, and is fatally wounded, while still filled to the brim with his own party favors. Sookie comes over, starts crying, "I'm so, so sorry" (We see a scene like that in the S02E12 promo trailer). She really is, she feels like she dragged him into this, as if this had been entirely her fault.
Sookie turns to her men. "Heal him!" Both say something like "Too far gone". Lafayette -dying- joyfully suggests being turned. Sookie goes with it, turns to the vamps again. Bill refuses to turn Lafayette for some reason, like "way to far gone, and full of drugs -> Will not work" . Sookie gets emotional, then angry with him.
Eric then offers to turn Lafayette, under the condition, that she should not be mad, if this becomes very messy, and still doesn't work.
Bill is fuming at Eric's attempt to "resuscitate" Lafayette. Emotional music cues in, eventually we get to know Lafayette "made it". But, he is now more like the Bubba from the books, because the conversion did not work optimally. This effect may not be clear at this point.
Tara is shell-shocked, she just wants to get away from Bontemps, and later we find out she opened her own clothing store in that nearby bigger town. We don't see her for a few episodes, and she turns more into the Tara from the books.

Sookie looks at Eric like he is her hero, while Bill retreats with a strange expression on his face.
The End. ('Till Summer 2010)

Thanks for reading!

So, what do you say? Workable? Ridiculous? Let me hear it!

Edit: Upon searching for Bubba / Lafayette I found a thread over at http://www.ericnorthman.net/forum/viewtopic.php?f=3&t=732 from 6 weeks ago that hinted at the same idea, but did not elaborate much (7 Posts).
Here is another one with slightly more posts: http://www.facebook.com/topic.php?uid=69144888562&topic=9424, but also from some time ago.

Post-Finale-Edit: It didn't turn out like described above. I liked their version better too, so Kudos to the Script Writers :)

Sunday, August 30, 2009

More disclaiming

Dear lawyers, and other By-the-book people,

This is my personal blog, so anything you read here is not to be connected to past, present and future employers/family_members/neighbors.

Everything here, unless marked otherwise, is written by me. I hope you like, what you read, but you may not. There have been previous critical reactions to my writing.
Sometimes I generalize or abstract for brevity, effect or other reasons. I've been known to occasionally pick the wrong word(ing)s to express the right meaning, with proportional fallout, ... unfortunately.
Obvious, Do-I-Really-Have-To-Mention-This points regularly fall victim to brevity, and occasionally (provocative) statements not anchored in my belief system will be posted for sake of inciting discussion. Be forewarned.

Do not try anything you find described here, unless you are a certified rocket scientist, doctor, wacko, (Jedi-) master, or stunt driver (depending on topic).

I am none of the above, so if -like me- warnings like the above do not discern you, please at least make sure you can recover from anything that might happen.
  • And/Or be confident about bringing all required tools and knowledge to the table.
  • And don't blame me, if you end up with lots of pieces with sharp edges, or expensive paperweights.
You get to keep all the pieces, and bed the losses!

Also, if anything described here happens to be illegal in your particular jurisdiction: This is academic, multi-subject, multi-purpose longterm research material.
However, I'd be glad, if You, Dear Reader, could point out such cases to me, before people come blasting through my doors at ungodly hours.

The wording of the above post will probably evolve to cover the potential holes and pitfalls future readers will hopefully point out to me.

So, if you are versed in Legalese, and have a few moments to spare, please do suggest some wording&phrasing enhancements. Mind you, if at all possible, I'd like to avoid making this post dry reading material :)

Thanks for reading, see you next time

Media consumption - Source of bliss and frustration

We've been playing back music on our Home Stereos for several decades, it's a common scenario. Videos too. Chances are, you've done one or both today already.

But, media playback for regular consumers has -with few (mostly costly) exceptions- been severely limited by One-to-One relations between participating components, e.g. Your DVD player outputs to only one TV at a time, as does your satellite receiver, you have (in most cases) 1 remote-control per device, and it usually only works in 1 room. Most existing playback devices can only hold 1 Media like a disc at a time.
You can probably also see the pattern.
And this is just one of the many annoying problems media playback chains have (inherited).

What we can already do with media is great, don't get me wrong. And most people are happy with the Status Quo. Most people can't even imagine all existing functions, let alone understanding or using them. They seem to be happy with the limited functionality they can elicit from their specific combination of devices and media. I am not!

In my Opinion, above points are justs some of the symptoms of -what I call it- Multimedia Hell.

Now, advancing technologies have lessened or eliminated these pesky limitations, or at least have the potential to, but we're not quite there yet.

I'm working on it. Come back soon for more musings on how UPNP, Mpd, PCM, TCP/IP, and some other sexy akronyms might help us (or at least me) win this battle.

So, thanks for reading, see you next time.

Disclaimer and Raison d'être (1 of ...)

Hi! Dear Reader, this is my first post here.

I fairly sure I'm not a great writer, and I'm 100% sure you'll find mistakes in spelling, grammar, and even content. My Form and Presentation will surely (hopefully) evolve over time.
Hints, corrections, optimizations of any form are gladly accepted. After all, one of the reasons I setup this blog is: "Knowledge that finds me"
I can not promise right now what kind of content you will find here, but I'll do my best to keep it rational, non-offensive, truthful, legal, et cetera. This is the part, where I hope the benefits of the "comments" functionality will kick in.
If you do comment on any my posts here, please try to use a similar 'tone' and stay on topic.
Though I welcome comments, and threads of comments on about anything here, I'd rather have long discussions with lots of comments about post content, than about which languages could have influenced my punctuation habits.

Having gotten that of my chest, I'm glad you're still with me.
I'm going to leave it at that for now. I invite you to come back soon, maybe you'll find your hot topic covered here. Maybe -once there is some content here- you can point me to a related hot topic :)

So, thanks for reading!