Synology-Forum.nl

Tweaks / Addons A.K.A. The Underground => Overige mods => Topic gestart door: KeesL op 17 augustus 2016, 20:58:53

Titel: pyserial & arduino
Bericht door: KeesL op 17 augustus 2016, 20:58:53
Ik wil vanuit mijn DS115j met pyserial met mijn Arduino nano communiceren. Vanuit mijn PC met Windows 10 lukt dat uitstekend met allerlei voorbeeld scripts. Als ik hetzelfde probeer op mijn DS115j met als poort /dev/ttyS0 of /dev/ttyS1 krijgt geen enkel response, noch bij lezen noch bij schrijven. Maar ook geen foutmeldingen. Wie weet raad?
(DSM 6.0.1-7393 Update 2, Python 2.7.11, PySerial 3.1.1 )
Titel: Re: pyserial & arduino
Bericht door: Stephan296 op 18 augustus 2016, 05:25:08
Als je je arduino nano aansluit op je nas en je typt het volgende in putty in: dmesg

Wat krijg je dan voor output?
Kan zijn dat hij een ander adres heeft dan dat jij nu opgeeft
Titel: Re: pyserial & arduino
Bericht door: KeesL op 18 augustus 2016, 07:37:01
Als newbe kende ik het commando  dmesg niet, ik heb het zo uitgevoerd:

dmesg | grep -i tty

[    0.000000] Kernel command line: console=ttyS0,115200 ip=off initrd=0x8000040,8M root=/dev/sda1 rw syno_hw_version=DS115j ihd_num=0 netif_num=1 flash_size=8
[   10.916323] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 41) is a 16550A
[   11.540920] console [ttyS0] enabled
[   11.544943] serial8250.1: ttyS1 at MMIO 0xf1012100 (irq = 42) is a 16550A