Obama comes along and they decided to test him, so they fired that long ranged missile. Our response was weak.. nothing really happened. So they said "We're starting back up the Nuclear program" and now they've figured out how to do a crude A-bomb.
This was to get our attention.
They have not proven they can actually deliver the device, but NK, while rather insane, is not a country of suicidal maniacs. This was more to get "respect" and concessions from the US and others. No the real fear here, that they are working with, as they have in the past, Iran, and Iran is using NK to cover for it's own nuclear program.