Temat: Pisanie do diód DS2408 przez MP00202-1

Próbuję się z tematem podłączenia do NanoPi NEO poprzez MP00202-1 urządzeń 1-wire takich jak termometry i diody którymi mógłbym sterować. System to Openwrt 19.07.10 z własnego builda.

MP00202: http://www.meraprojekt.com.pl/mp00202.html

Na tą chwilę jestem w stanie odczytywać temperatury z termometrów.

root@OpenWrt:~# digitemp_DS9097U -s /dev/ttyUSB0 -a -i
DigiTemp v3.7.2 Copyright 1996-2018 by Brian C. Lane
GNU General Public License v2.0 - http://www.digitemp.com
Turning off all DS2409 Couplers
..
Searching the 1-Wire LAN
281734F208000008 : DS18B20 Temperature Sensor
ROM #0 : 281734F208000008
Wrote .digitemprc
Apr 16 17:43:57 Sensor 0 C: 21.81 F: 71.26

Nie wiem w jaki sposób miałbym pisać do diód, skoro digitemp służy tylko do odczytywania z 1-wire, a w sysfs nie pokazują się żadne device'y. Najbardziej odpowiadałoby mi pisanie do diód jak dotychczas, czyli:

 echo -e '\x01' >  /sys/bus/w1/devices/29-00000028a51b/output 

Moduły jakie mam na ten moment doinstalowane do systemu:

root@OpenWrt:~# opkg list-installed
alsa-lib - 1.1.8-1
ath9k-htc-firmware - 20190416-1
base-files - 204.4-r11427-9ce6aa9d8d
blkid - 2.34-1
block-mount - 2020-05-12-84269037-1
brcmfmac-firmware-usb - 20190416-1
busybox - 1.30.1-6
ca-bundle - 20200601-1
carl9170-firmware - 20190416-1
cgi-io - 2021-09-08-98cef9dd-20
chat - 2.4.7.git-2019-05-25-3
comgt - 0.32-33
confuse - 3.2.2-1
cryptsetup - 2.1.0-2
curl - 7.66.0-3
digitemp - 3.7.2-2
digitemp-usb - 3.7.2-2
dnsmasq - 2.80-16.3
dropbear - 2019.78-2
e2fsprogs - 1.44.5-2
ethtool - 5.2-1
fdisk - 2.34-1
ffmpeg - 3.4.9-1
firewall - 2019-11-22-8174814a-3
fstools - 2020-05-12-84269037-1
ftdi_eeprom - 1.4-7
fwtool - 2
getrandom - 2019-06-16-4df34a4d-4
git - 2.26.3-1
gpioctl-sysfs - 0.0.6-2
hostapd - 2019-08-08-ca8c2bd2-8
hostapd-common - 2019-08-08-ca8c2bd2-8
hostapd-utils - 2019-08-08-ca8c2bd2-8
hwclock - 2.34-1
i2c-tools - 4.1-3
ip6tables - 1.8.3-1
iperf3 - 3.7-1
iptables - 1.8.3-1
iw - 5.0.1-1
jshn - 2020-05-25-66195aee-1
jsonfilter - 2018-02-04-c7e938d6-1
kernel - 4.14.275-1-353d4795ee8410ad704d426ee2983281
kmod-ath - 4.14.275+4.19.237-1-1
kmod-ath6kl - 4.14.275+4.19.237-1-1
kmod-ath6kl-sdio - 4.14.275+4.19.237-1-1
kmod-ath6kl-usb - 4.14.275+4.19.237-1-1
kmod-ath9k-common - 4.14.275+4.19.237-1-1
kmod-ath9k-htc - 4.14.275+4.19.237-1-1
kmod-brcmfmac - 4.14.275+4.19.237-1-1
kmod-brcmutil - 4.14.275+4.19.237-1-1
kmod-carl9170 - 4.14.275+4.19.237-1-1
kmod-cfg80211 - 4.14.275+4.19.237-1-1
kmod-crypto-aead - 4.14.275-1
kmod-crypto-ecb - 4.14.275-1
kmod-crypto-hash - 4.14.275-1
kmod-crypto-manager - 4.14.275-1
kmod-crypto-null - 4.14.275-1
kmod-crypto-pcompress - 4.14.275-1
kmod-crypto-sha1 - 4.14.275-1
kmod-crypto-user - 4.14.275-1
kmod-dax - 4.14.275-1
kmod-dm - 4.14.275-1
kmod-eeprom-93cx6 - 4.14.275-1
kmod-gre - 4.14.275-1
kmod-hid - 4.14.275-1
kmod-hid-generic - 4.14.275-1
kmod-hwmon-adcxx - 4.14.275-1
kmod-hwmon-core - 4.14.275-1
kmod-i2c-algo-bit - 4.14.275-1
kmod-i2c-algo-pca - 4.14.275-1
kmod-i2c-algo-pcf - 4.14.275-1
kmod-i2c-core - 4.14.275-1
kmod-i2c-gpio - 4.14.275-1
kmod-i2c-tiny-usb - 4.14.275-1
kmod-input-core - 4.14.275-1
kmod-input-evdev - 4.14.275-1
kmod-ip6tables - 4.14.275-1
kmod-ipt-conntrack - 4.14.275-1
kmod-ipt-core - 4.14.275-1
kmod-ipt-nat - 4.14.275-1
kmod-ipt-offload - 4.14.275-1
kmod-iptunnel - 4.14.275-1
kmod-lib-crc-ccitt - 4.14.275-1
kmod-lib-crc-itu-t - 4.14.275-1
kmod-lib80211 - 4.14.275+4.19.237-1-1
kmod-libertas-usb - 4.14.275+4.19.237-1-1
kmod-mac80211 - 4.14.275+4.19.237-1-1
kmod-mii - 4.14.275-1
kmod-mmc - 4.14.275-1
kmod-mppe - 4.14.275-1
kmod-mt76-core - 4.14.275+2021-02-15-5c768dec-1
kmod-mt76-usb - 4.14.275+2021-02-15-5c768dec-1
kmod-mt7601u - 4.14.275+4.19.237-1-1
kmod-mt76x0-common - 4.14.275+2021-02-15-5c768dec-1
kmod-mt76x02-common - 4.14.275+2021-02-15-5c768dec-1
kmod-mt76x02-usb - 4.14.275+2021-02-15-5c768dec-1
kmod-mt76x0u - 4.14.275+2021-02-15-5c768dec-1
kmod-mt76x2-common - 4.14.275+2021-02-15-5c768dec-1
kmod-mt76x2u - 4.14.275+2021-02-15-5c768dec-1
kmod-net-rtl8192su - 4.14.275-1
kmod-nf-conntrack - 4.14.275-1
kmod-nf-conntrack6 - 4.14.275-1
kmod-nf-flow - 4.14.275-1
kmod-nf-ipt - 4.14.275-1
kmod-nf-ipt6 - 4.14.275-1
kmod-nf-nat - 4.14.275-1
kmod-nf-reject - 4.14.275-1
kmod-nf-reject6 - 4.14.275-1
kmod-nls-base - 4.14.275-1
kmod-p54-common - 4.14.275+4.19.237-1-1
kmod-p54-usb - 4.14.275+4.19.237-1-1
kmod-ppp - 4.14.275-1
kmod-pppoe - 4.14.275-1
kmod-pppox - 4.14.275-1
kmod-pptp - 4.14.275-1
kmod-regmap-core - 4.14.275-1
kmod-regmap-i2c - 4.14.275-1
kmod-rt2500-usb - 4.14.275+4.19.237-1-1
kmod-rt2800-lib - 4.14.275+4.19.237-1-1
kmod-rt2800-usb - 4.14.275+4.19.237-1-1
kmod-rt2x00-lib - 4.14.275+4.19.237-1-1
kmod-rt2x00-usb - 4.14.275+4.19.237-1-1
kmod-rt73-usb - 4.14.275+4.19.237-1-1
kmod-rtc-ds1307 - 4.14.275-1
kmod-rtc-pcf8563 - 4.14.275-1
kmod-rtc-sunxi - 4.14.275-1
kmod-rtl8187 - 4.14.275+4.19.237-1-1
kmod-rtl8192c-common - 4.14.275+4.19.237-1-1
kmod-rtl8192cu - 4.14.275+4.19.237-1-1
kmod-rtl8xxxu - 4.14.275+4.19.237-1-1
kmod-rtlwifi - 4.14.275+4.19.237-1-1
kmod-rtlwifi-usb - 4.14.275+4.19.237-1-1
kmod-scsi-core - 4.14.275-1
kmod-slhc - 4.14.275-1
kmod-sound-core - 4.14.275-1
kmod-usb-acm - 4.14.275-1
kmod-usb-core - 4.14.275-1
kmod-usb-dwc2 - 4.14.275-1
kmod-usb-dwc3 - 4.14.275-1
kmod-usb-ehci - 4.14.275-1
kmod-usb-hid - 4.14.275-1
kmod-usb-ledtrig-usbport - 4.14.275-1
kmod-usb-net - 4.14.275-1
kmod-usb-net-cdc-ether - 4.14.275-1
kmod-usb-net-cdc-ncm - 4.14.275-1
kmod-usb-net-hso - 4.14.275-1
kmod-usb-net-huawei-cdc-ncm - 4.14.275-1
kmod-usb-net-qmi-wwan - 4.14.275-1
kmod-usb-net-rndis - 4.14.275-1
kmod-usb-net-rtl8150 - 4.14.275-1
kmod-usb-net-rtl8152 - 4.14.275-1
kmod-usb-net-sierrawireless - 4.14.275-1
kmod-usb-ohci - 4.14.275-1
kmod-usb-serial - 4.14.275-1
kmod-usb-serial-ch341 - 4.14.275-1
kmod-usb-serial-cp210x - 4.14.275-1
kmod-usb-serial-ftdi - 4.14.275-1
kmod-usb-serial-option - 4.14.275-1
kmod-usb-serial-pl2303 - 4.14.275-1
kmod-usb-serial-qualcomm - 4.14.275-1
kmod-usb-serial-sierrawireless - 4.14.275-1
kmod-usb-serial-ti-usb - 4.14.275-1
kmod-usb-serial-wwan - 4.14.275-1
kmod-usb-storage - 4.14.275-1
kmod-usb-wdm - 4.14.275-1
kmod-usb2 - 4.14.275-1
kmod-usb3 - 4.14.275-1
kmod-usbmon - 4.14.275-1
kmod-w1 - 4.14.275-1
kmod-w1-master-ds2490 - 4.14.275-1
kmod-w1-slave-smem - 4.14.275-1
kmod-w1-slave-therm - 4.14.275-1
kmod-wl12xx - 4.14.275+4.19.237-1-1
kmod-wl18xx - 4.14.275+4.19.237-1-1
kmod-wlcore - 4.14.275+4.19.237-1-1
kmod-zd1211rw - 4.14.275+4.19.237-1-1
lame-lib - 3.100-1
libacl - 2.2.53-1
libaio - 0.3.112-1
libattr - 2.4.48-1
libblkid1 - 2.34-1
libblobmsg-json - 2020-05-25-66195aee-1
libbz2-1.0 - 1.0.8-1
libc - 1.1.24-2
libcomerr0 - 1.44.5-2
libcurl4 - 7.66.0-3
libdb47 - 4.7.25.4.NC-5
libdevmapper - 2.03.02-2
libertas-usb-firmware - 20190416-1
libext2fs2 - 1.44.5-2
libf2fs6 - 1.12.0-3
libfdisk1 - 2.34-1
libffi - 3.3-2
libffmpeg-full - 3.4.9-1
libftdi - 0.20-5
libftdi1 - 1.4-7
libgcc1 - 7.5.0-2
libgdbm - 1.11-1
libi2c - 4.1-3
libip4tc2 - 1.8.3-1
libip6tc2 - 1.8.3-1
libiwinfo-lua - 2019-10-16-07315b6f-1
libiwinfo20181126 - 2019-10-16-07315b6f-1
libjson-c2 - 0.12.1-3.1
libjson-script - 2020-05-25-66195aee-1
liblua5.1.5 - 5.1.5-3
liblucihttp-lua - 2019-07-05-a34a17d5-1
liblucihttp0 - 2019-07-05-a34a17d5-1
liblzma - 5.2.5-1
libmbedtls12 - 2.16.12-1
libncurses6 - 6.1-5
libnl-tiny - 0.1-5
libopenssl-conf - 1.1.1n-1
libopenssl1.1 - 1.1.1n-1
libpopt0 - 1.16-2
libpthread - 1.1.24-2
libreadline8 - 8.0-1
librt - 1.1.24-2
libsmartcols1 - 2.34-1
libsqlite3-0 - 3310100-1
libss2 - 1.44.5-2
libtirpc - 1.2.6-2
libubox20191228 - 2020-05-25-66195aee-1
libubus-lua - 2022-02-21-b32a0e17-1
libubus20210603 - 2022-02-21-b32a0e17-1
libuci20130104 - 2019-09-01-415f9e48-4
libuclient20160123 - 2020-06-17-51e16ebf-1
libugpio - 0.0.6-2
libusb-1.0-0 - 1.0.22-2
libusb-compat4 - 0.1.5-2
libuuid1 - 2.34-1
libxml2 - 2.9.9-3
libxtables12 - 1.8.3-1
logd - 2019-06-16-4df34a4d-4
lsof - 4.91-1
lua - 5.1.5-3
luci - git-22.099.58928-786ebc9-1
luci-app-firewall - git-22.099.58928-786ebc9-1
luci-app-opkg - git-22.099.58928-786ebc9-1
luci-base - git-22.099.58928-786ebc9-1
luci-lib-ip - git-22.099.58928-786ebc9-1
luci-lib-jsonc - git-22.099.58928-786ebc9-1
luci-lib-nixio - git-22.099.58928-786ebc9-1
luci-mod-admin-full - git-22.099.58928-786ebc9-1
luci-mod-network - git-22.099.58928-786ebc9-1
luci-mod-status - git-22.099.58928-786ebc9-1
luci-mod-system - git-22.099.58928-786ebc9-1
luci-proto-3g - git-22.099.58928-786ebc9-1
luci-proto-ipv6 - git-22.099.58928-786ebc9-1
luci-proto-ppp - git-22.099.58928-786ebc9-1
luci-proto-qmi - git-22.099.58928-786ebc9-1
luci-theme-bootstrap - git-22.099.58928-786ebc9-1
lvm2 - 2.03.02-2
minicom - 2.7.1-1
mkf2fs - 1.12.0-3
mmc-utils - 2018-12-09-aef913e3-1
mt7601u-firmware - 20190416-1
mtd - 24
netifd - 2021-01-09-753c351b-1
odhcp6c - 2021-01-09-64e1b4e7-16
odhcpd-ipv6only - 2020-05-03-49e4949c-3
openssh-client - 8.0p1-1
openssh-keygen - 8.0p1-1
openssh-server - 8.0p1-1
openssl-util - 1.1.1n-1
openwrt-keyring - 2021-02-20-49283916-2
opkg - 2021-01-31-c5dccea9-1
p54-usb-firmware - 1
partx-utils - 2.34-1
ppp - 2.4.7.git-2019-05-25-3
ppp-mod-pppoe - 2.4.7.git-2019-05-25-3
ppp-mod-pptp - 2.4.7.git-2019-05-25-3
pppstats - 2.4.7.git-2019-05-25-3
procd - 2020-03-07-09b9bd82-1
python-pip-conf - 0.1-1
python3 - 3.7.13-1
python3-asyncio - 3.7.13-1
python3-base - 3.7.13-1
python3-certifi - 2019.11.28-1
python3-cgi - 3.7.13-1
python3-cgitb - 3.7.13-1
python3-chardet - 3.0.4-2
python3-codecs - 3.7.13-1
python3-ctypes - 3.7.13-1
python3-curl - 7.43.0.3-1
python3-dateutil - 2.8.0-3
python3-dbm - 3.7.13-1
python3-decimal - 3.7.13-1
python3-distutils - 3.7.13-1
python3-docutils - 0.14-1
python3-email - 3.7.13-1
python3-gdbm - 3.7.13-1
python3-idna - 2.9-1
python3-light - 3.7.13-1
python3-logging - 3.7.13-1
python3-lzma - 3.7.13-1
python3-multiprocessing - 3.7.13-1
python3-ncurses - 3.7.13-1
python3-openssl - 3.7.13-1
python3-packages - 1.0-1
python3-pip - 22.0.4-1
python3-pkg-resources - 47.1.0-1
python3-pydoc - 3.7.13-1
python3-pyserial - 3.4-1
python3-requests - 2.23.0-1
python3-setuptools - 47.1.0-1
python3-six - 1.13.0-1
python3-sqlite3 - 3.7.13-1
python3-unittest - 3.7.13-1
python3-urllib - 3.7.13-1
python3-urllib3 - 1.25.10-1
python3-xml - 3.7.13-1
resolveip - 2
rpcd - 2020-05-26-67c8a3fd-1
rpcd-mod-file - 2020-05-26-67c8a3fd-1
rpcd-mod-iwinfo - 2020-05-26-67c8a3fd-1
rpcd-mod-luci - 20201107
rpcd-mod-rrdns - 20170710
rt2800-usb-firmware - 20190416-1
rt73-usb-firmware - 20190416-1
rtl8192cu-firmware - 20190416-1
rtl8192su-firmware - 20190416-1
terminfo - 6.1-5
uboot-envtools - 2018.03-3.1
ubox - 2019-06-16-4df34a4d-4
ubus - 2022-02-21-b32a0e17-1
ubusd - 2022-02-21-b32a0e17-1
uci - 2019-09-01-415f9e48-4
uclient-fetch - 2020-06-17-51e16ebf-1
uhttpd - 2020-10-01-3abcc891-1
uqmi - 2019-06-27-1965c713-7
urandom-seed - 1.0-1
urngd - 2020-01-21-c7f7b6b6-1
usb-modeswitch - 2017-12-19-f40f84c2-2
usbutils - 007-10
usign - 2020-05-23-f1f65026-1
wireless-regdb - 2021.08.28-1
wl12xx-firmware - 20190416-1
wl18xx-firmware - 20190416-1
wpa-cli - 2019-08-08-ca8c2bd2-8
wpa-supplicant - 2019-08-08-ca8c2bd2-8
wwan - 2014-07-17-1
zlib - 1.2.11-4

Proszę o wsparcie

2

Odp: Pisanie do diód DS2408 przez MP00202-1

No nie możesz. Kup adapter który widoczny jest na usb ale nie jako port szeregowy.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

3

Odp: Pisanie do diód DS2408 przez MP00202-1

Udało mi się załatwić ten problem poprzez narzędzie owfs

FT232RL pojawia mi się w systemie jako ttyUSB0 więc polecenie wygląda tak

owfs -s localhost:4304 -d /dev/ttyUSB0 -C

Wtedy cały system plików z wykrytymi urządzeniami 1-wire montuje mi się w /mnt/owfs

root@OpenWrt:~# ls /mnt/owfs/
01.6A3CE91A0000  alarm            simultaneous     system
28.1734F2080000  bus.1            statistics       uncached
29.58D42D000000  settings         structure

#termometr
root@OpenWrt:~# ls /mnt/owfs/28.1734F2080000/
address        fasttemp       r_address      temperature10  templow
alias          id             r_id           temperature11  tempres
crc8           latesttemp     r_locator      temperature12  type
errata         locator        scratchpad     temperature9
family         power          temperature    temphigh

#diody
root@OpenWrt:~# ls /mnt/owfs/29.58D42D000000/
LCD_H            address          latch.7          sensed.2
LCD_M            alias            latch.ALL        sensed.3
PIO.0            crc8             latch.BYTE       sensed.4
PIO.1            family           locator          sensed.5
PIO.2            id               out_of_testmode  sensed.6
PIO.3            latch.0          por              sensed.7
PIO.4            latch.1          power            sensed.ALL
PIO.5            latch.2          r_address        sensed.BYTE
PIO.6            latch.3          r_id             set_alarm
PIO.7            latch.4          r_locator        strobe
PIO.ALL          latch.5          sensed.0         type
PIO.BYTE         latch.6          sensed.1

I jestem wtedy w stanie nie tylko czytać ale też zadawać stany na diody smile Zostawiam dla potomnych