Hi FJ,
I just got an CMS error 322 back from my W810i when trying to send an SMS. I looked it up and it actually means "memory full", so clearing my INbox/Sent Items on the phone rectified the problem.
May I suggest you add a feature to your brilliant app so that these error codes are displayed in the human readable form as well?
I have found some of them on this page:
http://www.dreamfabric.com/sms/cms_error.html
You can also always get them directly from 3GPP in 27.007 and 27.005 specs. If you can't access them, I'd be happy to get them for you. They should be available at:
http://www.3gpp.org/ftp/Specs/latest/
Cheers!