It could have been a nuclear test. But think about it: North Korea is in shambles. They do get some help from China, but they need to enter the wider world beyond that. They need the influx of foreign capital to get themselves out of the gutter.
The only way to reach that goal is to open negotiations with those very same foreign powers, like the US, since drug smuggling apparently didn't pan out too well for them. But since North Korea doesn't have anything worth negotiating over, they need to generate an elaborate smokescreen to get the foreigners around the table with them.
All the South Koreans registered was a large explosion. That could have been a nuclear test, as claimed. But it also could have been a large, deep hole filled with conventional explosives -- only to generate enough FUD (Fear, Uncertainty, Doubt) to strengthen their position in negotiations.