Move data from RS232 interface to MySQL


There are four pulse sensors, connected to a special receiver which converts pulses to a serial interface data. Each sensor gives the data to RS232 interface every 12 seconds. Since there are four sensors, data in to RS232 interface comes every 3 seconds. From each sensor data is being transmitted consistently: first data are from the first sensor (1> 15), after 3 seconds comes data from the second sensor (2> 12), then after 3 seconds comes data from third sensor (3> 18) and lastly after 3 seconds comes data from the fourth sensor (4> 24). This cycle is being repeated until forced communication break fro RS232 interface. Example of the data being received on RS232 interface:

1> 15

2> 12

3> 18

4> 24

1> 12

2> 16

3> 15

4> 25


1) Retrieve the data every 3 seconds from the RS232 serial interface;

2) Recognize from which sensor the data comes and remove the beginnings of „1>“, „2>“, „3>“ or „4>“ (leave only pulse counts);

3) If the data received from a first sensor, record it to an array 1, from the second sensor record data to an array 2 and so on. Each array must have 2 columns: first for the pulse value (without „1>“, „2>“..) and the second column should be filled with time tag as „date YYYY:MM:DD time: HH:MM:SS“.

4) When the array has more than 30 entries, then connect to MySQL database DB1 and write recorded data from the array to a table1. The table consist of the 4 columns: ID, pulse value, date_time, timestamp. Also at the same time array of data has to be written into the file /user/admin/documents/1_values. The file data must be separated by „ ; “. If connection to a MySQL database fails, then prolong the array to 100 entries, but at the same each recording time trying to connect MySQL database. If after 100 entries in the array connect to the MySQL data isn‘t established, then write the data to a file „1_values“ only. Accordingly, the data from the sensors 2,3 and 4 has to be written to a tables table2, table3, table4 and files „2_values“, „3_values“, „4_values“.

5) The cycle is turning as long as notice of termination (3, 5 months).

Possible solutions for improvement:

As the data will be transmitted via GPRS, tryiing to save transmission bandwidth and costs available arrays with different amount of entries, also different MySQL database recording algorithms.

Skills: C Programming, MySQL, PHP, Python, Shell Script

About the Client:
( 0 reviews ) Vilnius, Lithuania

Project ID: #711190

Awarded to:


Hi, please check your messages.

$150 USD in 14 days
(2 Reviews)

13 freelancers are bidding on average $223 for this job


We can implement the job well. We would like to know operating system for which the solution and preferred programming language. We are experts with embedded linux like openWRT. We can not go lower than this.

$180 USD in 3 days
(7 Reviews)

Good day Sir. We have twelve years of experience with low-level/hardware programming. We are experts in the Assembly/C language, and hardware interaction. We'd be honored if you choose us for your fascinating project.

$300 USD in 4 days
(13 Reviews)

Hello there, I am interested in doing this project. Looking forward to your positive response.

$130 USD in 5 days
(1 Review)

kindly check pmb.

$250 USD in 10 days
(2 Reviews)

Am ready when you are ready. I understand the specs and this is very dowable within time quoted!

$250 USD in 10 days
(1 Review)

Good day. I have 10 years of programming experience in C/C++, Java, Perl, PHP, SQL, Assembler (x86 and Itanium). Best regards.

$200 USD in 10 days
(1 Review)

RS 232 specialist see [login to view URL]

$500 USD in 21 days
(0 Reviews)

Hello, I have more than 5 years of experience dealing with Hardware Interfacing using - Serial Port (Rs232-RS422 and USB) - PArallel Port - TCP/UDP - Modems I have implemented such Applications using VB6 and C# More

$250 USD in 3 days
(0 Reviews)

Hello, please check PM. Thank you.

$150 USD in 3 days
(0 Reviews)

Please contact me for this project. I am very much familiar with these kinds of work. Best regards.

$245 USD in 10 days
(0 Reviews)

Hello, I am ready to work on this project. Please check PMB. waiting for your reply. regards

$200 USD in 10 days
(0 Reviews)

This is fairly simple and is similar to something I have recently done for a large public art install. I am confident that this can be done rather quickly.

$100 USD in 3 days
(0 Reviews)