[vz-users] USB IR on Synology NAS

volkszaehler at vpathuis.dds.nl volkszaehler at vpathuis.dds.nl
Tue Oct 4 21:33:41 CEST 2016


Hi,

Thank you for your suggestion! However, the device doesn't respond the 
first time, directly after creating it (with 300 baud) and writing the 
first command (scrypt attached, as txt for security).
The problem that is described is related to changing the baudrate. So I 
don't think this is the problem ....

Gr,
Vincent

On 3-10-2016 21:58, Udo1 wrote:
> Am 03.10.2016 um 21:40 schrieb volkszaehler at vpathuis.dds.nl:
>> Any help or idea at all would be much appreciated!
>  iManufacturer           3 Linux 2.6.32.12 xhci_hcd
>
> I think the Linux-kernel is to old.
> https://bugzilla.kernel.org/show_bug.cgi?id=42586
>
> BR
> Udo

-------------- next part --------------
import serial
from time import sleep
conn = serial.Serial('/dev/ttyUSB0',
                     baudrate=300,
                     bytesize=serial.SEVENBITS,
                     parity=serial.PARITY_EVEN,
                     stopbits=serial.STOPBITS_TWO,
                     timeout=1,
                     xonxoff=0,
                     rtscts=0
                     )
# Wake up
conn.setRTS(False)
conn.setDTR(False)
sleep(5)
conn.setDTR(True)
conn.setRTS(True)
# send /?!
conn.write("\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2F\x3F\x21\x0D\x0A") # --> this should let the IR-led blink, but it doesn't!
# Read at 300 BAUD, typenr
print(str(conn.readline())) 
print(str(conn.readline()))

# Now switch to 2400 BAUD
conn.baudrate=2400

# Keep reading
try:
    while True:
        print(str(conn.readline()))# readlines() will probably never return.
finally:
    conn.close()


More information about the volkszaehler-users mailing list