The commands that you have listed should work, if the gpio number is correct. While I have not worked with Nitrogen6X in particular, I have found out that Linux GPIO pin numbers often do not match the labels on the board. I advice trying to find out the proper mapping experimentally by watching all possible GPIOs:
cd /sys/class/gpio
for x in `seq 1 128`; do echo $x > export; done
ground the pin in question via 10k resistor, run:
grep . gpio*/value > /tmp/values0
connect the pin in question to Vcc via 10k resistor, run:
grep . gpio*/value > /tmp/values1
diff the files, and pay attention which pin has changed.