It seems you are missing the critical part of converting RS232 signal (which is not 3.3 V) to RPI GPIO compatible 3.3V Signal as described in this example: https://www.abelectronics.co.uk/kb/article/20/raspberry-pi-serial-port-usage http://raspberrypi.tomasgreno.cz/uart-to-rs-232.html
On GPIO header of RPi you can find a so called UART pins. In fact, it is normal >serial port you know from computers with only one change. UART uses 0 Volts for >logical 0 and 3,3 Volts for logical 1 while regular RS-232 uses -10V for 1 and >+10V for 0. This difference means that when you connect RS-232 device directly to >UART pins, RPi will surely not survive. For this reason, MAX3232CPE integrated >circuit was developed. It is a simple converter that converts voltage levels with >help of few capacitors. To build this, you will need:
You can either create your own converter like this people did: http://justanotherlanguage.org/content/jallib/tutorials/tutorial_serial_port_board
Many circuits will require some serial port communication, you may buy yourself a >rs232 to TTL adapter off the net for as little as $10, or you can build one >yourself. The max232 is a very popular chip. It converts your 5v circuit to the >12v required for serial communication to things like your PC. Many >microcontrollers have RX and TX output pins.
Or buy a converter designed for such purpose: https://cablematic.com/en/products/adapter-raspberry-pi-gpio-txrx-to-rs232-db9-male-MS050/
Specifications RS232 serial interface adapter card in a Raspberry Pi GPIO Tx/Rx system. Ideal for connecting serial devices in a Raspberry circuit: PLCs, industrial >controllers, etc. Transmission frequencyData ion: 230 Kbps. Input voltage: 2.7V to 5.25V. It has male DB9 connector, 4-pin connector, and connection cable.
Good luck