Thanks, dialing *#0*# and then sensor menu worked for me.
I would like to add that at first I kept the phone flat and moved it in a figure 8 pattern, as if sitting on a table. That didn't help though. What did work was waving it around in the air in all different orientations.