Need help with Device::SerialPort

Hello, I need expert advice and guidance on communicating with a serial port under Fedora Core 8...

I'm trying to use the Perl module Device::SerialPort to connect to a "smart inverter" via /dev/ttyS0 which is supposed to give me data about battery charge level, input voltage, output voltage and other data very useful for me. I have a description of the protocol for this device and I'm able to communicate with this device, however, my lack of knowledge of the stty and other serial-related stuff does not let me retrieve information from this device... The maximum data I get is an error message, which tells me that "echoing" does not work... The device is to be fed one character at a time with a line like "PCRD4006C\r\n", every character transmitted will be echoed back to the script by the device. After the last character the device will start sending data, which in turn should be echoed one character at a time back to the device by my perl script. This is as far as I get. The only data I'm able to retrieve is an error message like "Er02F" which means "lack of echo"... I'm posting a bit of code which shows what I've achieved so far and output from execution of this code. Thus, if you know this area of programming, please help. I need suggestions and answers to serial port related questions I may have. Need to get this thing working. Yes, supposedly it works on some other systems, but not under my systems, maybe it has to do with stty settings, will need help on this too..

Taidot: Linux, Perl

Näytä lisää: serial port programming perl, what is r programming, smart input, serial port programming, Programming with R, programming questions and answers, need help in programming, need help for programming, linux serial port programming, i need help with c++ programming, i need help programming, help in programming, get help with c programming, get help by an expert, get expert advice, answers expert, serialport programming perl, perl send data serial port, perl programming serial device, need help with c# programming, voltage , serial port, programming help, Need help, me device

Tietoa työnantajasta:
( 3 arvostelua ) Moscow, Russian Federation

Projektin tunnus: #474453

Myönnetty käyttäjälle:


Hi ! It seems your code is ok BUT after every \r\n you should not to send anything until you are receiving the response (\r\n terminated), byte by byte and echo it to the device. You can try (for simplicity) to send en Lisää

$30 USD 2 päivässä
(1 arvostelu)

3 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön


I can help on this

$120 USD 4 päivässä
(32 arvostelua)

$10 - internet $5 - extra expense $5 - books $30 - human resource

$50 USD 2 päivässä
(0 arvostelua)