rss news & blogs

How to auto-reboot your Comcast cable modem

dave - 5 hours 11 min ago -

My office has a piece-of-junk Comcast cable modem that often needs to be rebooted. I got tired of walking back to the network closet, so I bought a USB relay for $30.

Yeah, I could have simply bought a better modem, but where’s the fun in that?

Here’s a photo of the relay board:

After connecting it to the modem’s power, I wrapped it in heat shrink:

And its final resting place where it will happily power cycle my cable modem for its entire useful life:

I put the relay between the modem’s power adapter and the modem itself, and connected the relay to my Linux server’s USB port for control. Once connected, the Linux kernel happily registered it as /dev/ttyUSB0 (it uses an FTDI chip for its USB-to-Serial translation, which is supported by all modern Linux kernels).

When connecting the power, I used the “C” and “NC” ports (“C” = “Common” and “NC” = “Normally Closed”). I didn’t use the “NO” port (“NO = “Normally Open”) because I don’t want my modem powering off just because the relay loses power (e.g., when the Linux box reboots).

This simple shell script power cycles the modem, which I run nightly using cron:


#!/bin/bash
device=/dev/ttyUSB0
printf '\xFF\x01\x01' >$device # Power off
sleep 60
printf '\xFF\x01\x00' >$device # Power on

I noticed that I needed to let the modem sleep for longer than 10 seconds, or there are problems on the network. In particular, our Outlook clients seem to lose their brains to our (off-site) Exchange server unless I sleep for longer. I used 60 seconds just to be safe.

The next step is to setup another cron job on my Linux box that will power cycle the modem if it ever discovers that it can’t reach the internet, or that its internet bandwidth is degraded.

I also wrote a small C++ program for Windows (about 20 lines) just to test the relay. It worked fine, but Linux was a lot easier to setup (no compiler necessary). In the time it took me to write that stupid C++ program, I was able to create both a working Python script and working shell script to do the same job (and Linux didn’t even require me to know the baud rate).

By the way, I would have avoided this whole exercise if my modem, like many others, had a software controllable reboot (some can be rebooted with wget, but not mine).

Happy (hardware) hacking!

Twitter Launches Facebook Connect Competitor, @Anywhere

me - Mon, 2010-03-15 13:49 -

I’ve long talked about the MVC model of the Building Block web.  Data Repositories like Amazon Simple Storage, Facebook Data Store, Google Data, and others comprise the Model of this new platform.  APIs like the Twitter API, the Facebook server-side APIs, or other REST-type APIs compose the Controllers of this web.  Then you have the View – something pretty much only Facebook and OpenSocial/Google Friend Connect have covered thus far.  The View enables developers to easily integrate and access code from a user’s Client, the web browser.  Today Twitter added their entry to that game, @Anywhere.

@Anywhere strives to provide a solution for a huge weakness in the Twitter API Platform thus far.  It provides an entire Javascript, Client-side platform for developers and website owners to integrate Twitter easily and simply right on top of their website, no server-side code involved.  This is the missing link Twitter has needed to have a truly competitive solution against Facebook’s Connect platform.

Facebook Connect relies on Javascript to provide an immersive experience into the Facebook environment right on top of any website owner’s site.  With a few lines of Javascript, and an HTML-like tag language called XFBML, website owners can pretty much copy and paste pieces of code in place and immediately have access to comments, become a fan boxes, post to their stream, and even more if you know a little Javascript as well.  It’s unclear if Twitter will be releasing an XFBML competitor (I’d love to help Twitter test if this becomes the case – I wrote the book on Facebook’s FBML), but Twitter is clearly going up against Facebook Connect to provide similar type tools, and I think it’s a very smart move.

I mentioned earlier I was excited about the entry of Josh Elman as product manager at Twitter.  I’m unclear if he had anything to do with this, but you can clearly see the Facebook influence in Twitter’s new API.  With not only Josh, but several others from the Facebook team now working at Twitter, you can bet they’ve compared and contrasted how they could obtain some of the millions of Facebook developers out there.  Making it as easy as possible is the smartest way to do this, and Twitter has already signed on several very big players in the Facebook Connect space, Huffington Post and Yahoo, to be launch partners in this effort.

In addition to those, the most significant partner that I think should not be ignored is Amazon.  Amazon, IMO, is the holy grail in Social E-Commerce, and despite not having a Facebook Connect solution, they seem willing to integrate Twitter into their environment.  Why they are choosing Twitter over Facebook is beyond me – maybe they have a Facebook deal in the works as well?

I’m very excited about this new announcement.  Soon, it will be easy for any developer to very seamlessly, in a single, well-understood language (Javascript), integrate Facebook and Twitter all on a single website with little effort.  As a developer, I’m drooling a bit over this.  I can’t wait to start playing with it.


HDMI out Sony BDP-360

fugalh - Mon, 2010-03-15 08:32 -

HDMI out on my Sony BDP-360 BluRay player worked fine for a month or two, then mysteriously cut out. I’m still troubleshooting, and the unit may need repair, but when I contacted Sony support they sent me this link which has already been very helpful: http://www.kb.sony.com/selfservice/documentLink.do?externalId=C567099

It may be coincidence but twice in a row I held down the stop button for 10+ seconds then replugged the HDMI cable, and it came back. I have it on 720p now and if it doesn’t cut out again I’ll assume some kind of 1080p problem, e.g. I need a better cable or there’s some EM interference or something.

Tangentially, the player has a quirk in audio output. It refuses to send the full audio signal over HDMI to the TV, even though the TV passes a digital signal through to my receiver. I know this works because MythTV send Dolby Digital 5.1 audio through HDMI, which is then passed from the TV to my receiver unharmed. But I can’t get more than stereo downmixed dolby surround from this BD player, except if I hook up the digital audio out directly to the receiver. This is annoying because I have to switch the TV input source and the receiver both.

I’ve Been a Little Rough on Google Lately

me - Sat, 2010-03-13 20:37 -

For having posted just less than 1,000 posts, this blog has gotten a lot of attention in just the last one or two years.  It used to be when I posted something I would get few comments (I still wish I had more), little traffic, and I knew it was only going to perhaps a few hundred eyes at most in an RSS Reader somewhere.  But it took off.  I’m not saying this to gloat, and I accept that I’m nowhere near a TechCrunch or a Mashable in terms of readers or traffic, but I’ve quickly learned that some times when I say things here it seems to have a lot of influence. Some times my articles end up on Techmeme.  Some times people like TechCrunch and Mashable mention what I say.  Some times Google employees talk about them.  Not only that, but it goes out to near 25,000 people on Twitter, thousands on FriendFeed, not to mention the thousands of subscribers that read this in their RSS Reader.  I tend to forget that when I talk here, it has the potential for a lot of people to read what I say. It’s not the old days of when I would just strive to get someone to read my stuff.  For that, I apologize – I’ve been a little negative on Google lately without realizing the implications, and I want to make ammends.

The truth is, I like Google for a lot of stuff.  My main e-mail client is Gmail.com.  In fact I also use it as my FriendFeed, Facebook, and Twitter client.  Despite my frustrations, I still use Google Reader as my main RSS Reader, not because it’s Google, but because it’s still by far the best Reader out there.  There have been various Chrome releases that have been by far the fastest and best browser out there.  Google Calendar is my favorite scheduling application – it’s the best of any tool I’ve come across.  I’ve replaced the phone icons on my iPhone with Google’s http://voice.google.com Google Voice client.

Truth be told, I still love Google.  They’re an amazing company.  They’re a company full of amazing talent and smart people.  Perhaps I hold them to a higher standard, and hence my criticism.

I think it’s obvious that I also have a bit of a Facebook bias.  I’ve written many apps both for myself and others on the Facebook platform, wrote two books about it, and I’m very close with many of their team over there.  Most of my business is to help other businesses integrate Facebook technology into their products – with over 400 million users and still growing, a very accessible API, and a lot of rules that go with that API, my help is often needed, and I’m happy to provide.  I’m just as passionate, if not more about Facebook as I am Google, but I think some of that gets to me at times.

I am also passionate about open standards.  I admit Facebook is not open across the board as others like to define it, but neither is Google.  Ideally, I guess I’d like to see a web that is completely free of the big guys like Facebook and Google – sure, they’ll still have a presence, but the user will be in control, not these companies or even developers.  There is no one perfect solution right now.  This is why I talk about Kynetx a lot.  I don’t think any of the open standards available right now completely tackle this, so I get passionate, perhaps too passionate about it at times.

So, to Google, DeWitt, and any of the team there I may have offended, I apologize.  I’d like to make ammends.   Sure, we may disagree at times, but as my Mom always taught me, “If you don’t have anything nice to say, don’t say anything at all”.  I’m going to be much more careful with what I say online from now on, especially when I disagree.  I’d like the things you take from here to be positive.  I want to influence, but in a good way.  To start the mending process, I’m re-creating my Google profile and re-opening my Buzz account, which you can find here.

Let’s open the air here – what else can I improve about this blog and what I share online?  Am I making the right choice in backing down in my criticism?

Image courtesy http://www.youpimped.com/comment_graphics/i_am_sorry


Getting Started with Cassandra

redbeard - Sat, 2010-03-13 10:00 -

Interpreting Recipe Input

redbeard - Fri, 2010-03-12 22:00 -
Syndicate content