Depending of which mode, turning ON the external device by setting GPIO output either LOW or HIGH depending of the connetion mode.
So, in your case, you need to invert digitialWrite() states.
My explanation should be relevant for relay too, meaning that digitalWrite() inverted state would work there too.
EDIT : I've look at the Olimex schematic, and it is driven in a way that HIGH on GPIO is turning the relay ON.
So, the problem must be somewhere else in you code.