Can't give a solution without knowing the problem. There can be many reasons for "not work". Could be the wrong code. Could be the wrong protocol. Could be bad wiring. Could be a bad IR-LED.
If you look at the IR-LED through a webcam or cellphone camera, do you see it blink when it is supposed to be sending? If not, that would explain why it isn't sending.