I did this for a gx10 on Oranage It may help
i also had trouble with text messages when i put my Sharp gx10 on to Orange. to get round it i rang orange and told them i was having problem with both types of text messages. I never told them i was using a SHARP phone, I just said i dont know much about phones as i have bought it of a mate.
they then sent me a text which activated the text. (word text only). check you phone screen to see if it has a small box on the screen with the letter G in it as that was sent by Orange, it may differ for O2. To get it to text pictures i had to type in the codes as you have already done. this might work.
or go on the net for forum for unlocking gx20 there are a few and i sure others had had the same problem as you.