rs232 script suport please

hi … i just buy a mppt solar charge controler from ivt . that controler have a serial port to be remote read it … i have the comunication protocol … can anybody help me with a very simple script for rb433ah?

Electrical specification

Pin description (RJ/12)

6.GND
5.GND
4.RX (open collector input)
3.TX (open collector output)
2.+12V
1.+12V

USART serial port: 9600 bit/s, 1 start bit, 8 data bit ,1 stop bit


Read data from Solar charger:

Send data to charger: ASCII (“R”) - minimal repetition time 500 ms

Response:

  1. byte ASCII (“D”)
  2. byte BIN (U_batt_H)
  3. byte BIN (U_batt_L)
  4. byte BIN (I_batt_H)
  5. byte BIN (I_batt_L)
  6. byte BIN (U_solar_H)
  7. byte BIN (U_solar_L)
  8. byte BIN (1)
  9. byte BIN(0)
  10. byte BIN(0)
  11. byte BIN(0)
  12. byte BIN(0)
  13. byte BIN(0)
  14. byte BIN(0)
  15. byte BIN(0)
  16. byte ASCII (“O”) - solar voltage OK
    ASCII (“S”) - solar voltage low

4.RX (open collector input)
3.TX (open collector output)

You sure they’re Open Collector ?

That’d be very very odd if they are.

using hyperteminal i get the right string … i build the cable using 6p plug → db9 all ok … but i don’t know to make that script for ros …
i like to get that string using serial port from rb433ah i have it there 8 meters away

I think you’ll have to run OpenWRT in a metarouter, and disable the serial console in ROS to get what you want.

no way … this 433Ah run 2 r52hn and ~40 clients 2mbps each one so no place for metarouter :wink:

just tell me how to make that script to run every single minute and append the result to a file …

i just can’t make it work on rs232

serial console can be disabled manualy

i just can’t make it work on rs232

Neither could I when i tried.