Program en comms via RS-232

Hello,

I have to build an application where i need to control an arduino via a SCADA application. the only option is to go via RS232 or RS485 since my muxes only transport these channel down a fibre line (roughly 1KM).

at the arduino end i only have a bunch of sensors that i read and some digital pins to control. then i need an RS232 connection to the surface PC running the software. but i also want to use this RS 232 connection to re-program the duino since it's going to be build in a sealed-off unit (going 1KM under water).

Is it possible to use serial pins to program and control the arduino over 232 with a pc at the other end? (USB to 232 converter used)

also, anyone any suggestions on which SCADA software/protocol to use? (i was thinking OPC. CAN or MODBUS is based on 485 if i'm not mistaking)

hopefully you can help me out here.

I presume spending an extra £5 or £10 is not an obstacle.

What about having two Arduinos in the sealed box. One with a program to receive data over the RS232 connection and upload a program to the other one.

I am using something like that at the moment to program an Attiny1634. I have an Atmega 328 on a breadboard running the ArduinoISP program and connected to the Attiny by SPI. The Atmega 328 connects to my PC using a USB-TTL cable. But that could probably be replaced with an RS232 connection and a MAX232 converter (from RS232 to TTL).

...R