If your rawImgNSDataBuffer is not nil, then things should be working fine. What do you mean that it has 0 contents? Are you viewing it in the debug area?
If you're printing out the contents and it displays nothing, it may just mean that the first bytes are '00' which in terms of char type, just means end of a string. However, it doesn't mean that there is no data there.
I suggest placing a breakpoint after your bytes call, then right-clicking on the rawImgNSDataBuffer variable in the debug area and selecting "View Memory of "rawImgNSDataBuffer"". You'll get a better picture of what the data actually looks like there.