Käynnissä

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, smart input, serial port programming, linux serial port programming, get help programming, get help expert, get expert advice, answers expert, serialport programming perl, perl programming serial device, voltage , programming help, me device, linux device, inverter, get programming answers, fedora, execution, device, battery, maximum execution time, serialport, programming advice, error sending, help data

About the Employer:
( 3 reviews ) Moscow, Russian Federation

Projektin tunnus: #474453

Myönnetty käyttäjälle:

hafpop

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)
1.8

3 freelanceria on tarjonnut keskimäärin 67 $ tähän työhön

srinichal

I can help on this

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

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

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