RevPi Connect 4 - Modbus /dev/ttyRS485 nicht vorhanden

danielz
Posts: 8
Joined: 13 Aug 2020, 16:23

RevPi Connect 4 - Modbus /dev/ttyRS485 nicht vorhanden

Post by danielz »

Hallo,

Ich versuche eine Modbus Verbindung mit einem RevPi Connect 4 einzurichten. Dabei habe ich das Problem, dass /dev/ttyRS485 nicht vorhanden ist.

Folgende Vorgehensweise:
  • in PicTory habe ich ein virtuelles Device hinzugefügt, 'Modbus RTU Master'
  • unter device_path ist /dev/ttyRS485 angegeben
  • config gespeichert und 'reset driver' ausgeführt
  • piTest -d zeigt den Modbus Adapter
Found 2 devices:

Address: 0 module type: 136 (0x88) RevPi Connect 4 V1.0
Module is present
input offset: 0 length: 6
output offset: 6 length: 7

Address: 64 module type: 24580 (0x6004) ModbusRTU Master Adapter V0.0
Module is present
input offset: 13 length: 101
output offset: 114 length: 73

Unter Services ist 'Enable/Disable Modbus Master' enabled.

Unter /dev kann ich jedoch den Pfad /dev/ttyRS485 nicht finden.
Fehlt hierzu noch irgendwo eine weitere Einstellung?


tail -f /var/log/daemon.log zeigt diesen Eintrag nach dem driver reset:
piModbusMaster[2337]: RTU Master waiting for serial device:/dev/ttyRS485
User avatar
dirk
KUNBUS
Posts: 1970
Joined: 15 Dec 2016, 13:19

Re: RevPi Connect 4 - Modbus /dev/ttyRS485 nicht vorhanden

Post by dirk »

Hi danielz, danke für die ausführliche Schilderung deines Fehlerbildes und der tiefen Analyse, das ist spitze. Ich finde es merkwürdig dass das "/dev/ttyRS485" Gerät fehlt. Die Schritte, die Du ausgeführt hast, um Modbus RTU in Betrieb zu nehmen, sind perfekt.

Möglicherweise ist Dein System noch auf dem auspack Stand, kann das sein? Wenn ja aktualisiere es bitte z.B. via

Code: Select all

sudo apt update; sudo apt upgrade; sudo reboot
Alternativ stehen Dir vier frisch gebackene Images im Download Bereich zur Verfügung:
https://revolutionpi.com/en/tutorials/d ... evpiimages
danielz
Posts: 8
Joined: 13 Aug 2020, 16:23

Re: RevPi Connect 4 - Modbus /dev/ttyRS485 nicht vorhanden

Post by danielz »

Hallo Dirk, vielen Dank für deine schnelle Rückmeldung!

Ich habe ein Update vorgenommen:

Code: Select all

sudo apt update && sudo apt full-upgrade -y && sudo reboot
Aber auch danach taucht leider das Gerät /dev/ttyRS485 nicht auf.

Meinst du der nächste Schritt ist hier ein neues Image zu probieren?
User avatar
nicolaiB
KUNBUS
Posts: 893
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: RevPi Connect 4 - Modbus /dev/ttyRS485 nicht vorhanden

Post by nicolaiB »

Wie sieht deine /boot/config.txt aus?
Was ist die Ausgabe von `ls /dev/ttyAMA*`?

Gruß Nicolai
danielz
Posts: 8
Joined: 13 Aug 2020, 16:23

Re: RevPi Connect 4 - Modbus /dev/ttyRS485 nicht vorhanden

Post by danielz »

Hallo Nicolai,


cat /boot/config.txt

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2
hdmi_mode=82

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Enable DRM VC4 V3D driver
#dtoverlay=vc4-kms-v3d
#max_framebuffers=2

[pi4]
[cm4s]
dtoverlay=dwc2,dr_mode=host

[all]
dtoverlay=dwc2,dr_mode=host



ls /dev/ttyAMA*
ls: cannot access '/dev/ttyAMA*': No such file or directory
danielz
Posts: 8
Joined: 13 Aug 2020, 16:23

Re: RevPi Connect 4 - Modbus /dev/ttyRS485 nicht vorhanden

Post by danielz »

Hallo Dirk und Nicolai,

Habt ihr hierzu noch weitere Vorschläge die ich probieren kann, oder muss ich es mit einem neuen Image probieren?
User avatar
nicolaiB
KUNBUS
Posts: 893
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: RevPi Connect 4 - Modbus /dev/ttyRS485 nicht vorhanden

Post by nicolaiB »

Hallo Daniel,

kannst du mir mal die Ausgabe von `sudo vclog -m` schicken?

Nicolai
danielz
Posts: 8
Joined: 13 Aug 2020, 16:23

Re: RevPi Connect 4 - Modbus /dev/ttyRS485 nicht vorhanden

Post by danielz »

sudo vclog -m

002231.797: arasan: arasan_emmc_open
002231.969: arasan: arasan_emmc_set_clock C0: 0x00800000 C1: 0x000e0047 emmc: 200000000 actual: 390625 div: 0x00000100 target: 400000 min: 400000 max: 400000 delay: 5
002336.750: arasan: arasan_emmc_set_clock C0: 0x00800000 C1: 0x000e0047 emmc: 200000000 actual: 390625 div: 0x00000100 target: 400000 min: 400000 max: 400000 delay: 5
002336.838: arasan: arasan_emmc_set_clock C0: 0x00800f00 C1: 0x000e0047 emmc: 200000000 actual: 390625 div: 0x00000100 target: 400000 min: 390000 max: 400000 delay: 5
002372.260: arasan: arasan_emmc_set_clock C0: 0x00800f02 C1: 0x000e0407 emmc: 200000000 actual: 25000000 div: 0x00000004 target: 25000000 min: 0 max: 25000000 delay: 1
002451.260: brfs: File read: /mfs/sd/config.txt
002452.099: brfs: File read: 1784 bytes
002458.573: brfs: File read: /mfs/sd/dt-blob.bin
002477.622: HDMI0:EDID error reading EDID block 0 attempt 0
002478.639: HDMI0:EDID giving up on reading EDID block 0
002490.126: HDMI1:EDID error reading EDID block 0 attempt 0
002491.140: HDMI1:EDID giving up on reading EDID block 0
002491.223: brfs: File read: 68542 bytes
002492.533: brfs: File read: /mfs/sd/config.txt
002493.328: gpioman: gpioman_get_pin_num: pin DISPLAY_SDA not defined
002493.345: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
002982.719: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
002984.004: *** Restart logging
002984.023: brfs: File read: 1784 bytes
002989.494: hdmi: HDMI0:EDID error reading EDID block 0 attempt 0
002990.512: hdmi: HDMI0:EDID giving up on reading EDID block 0
002995.556: hdmi: HDMI0:EDID error reading EDID block 0 attempt 0
002996.570: hdmi: HDMI0:EDID giving up on reading EDID block 0
003008.073: hdmi: HDMI1:EDID error reading EDID block 0 attempt 0
003009.091: hdmi: HDMI1:EDID giving up on reading EDID block 0
003014.130: hdmi: HDMI1:EDID error reading EDID block 0 attempt 0
003015.146: hdmi: HDMI1:EDID giving up on reading EDID block 0
003015.165: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
003015.181: HDMI0: hdmi_pixel_encoding: 300000000
003015.192: HDMI1: hdmi_pixel_encoding: 300000000
003015.712: kernel=
003017.988: gpioman: gpioman_get_pin_num: pin CAMERA_0_I2C_PORT not defined
003050.694: dtb_file 'bcm2711-rpi-cm4.dtb'
003060.790: brfs: File read: /mfs/sd/bcm2711-rpi-cm4.dtb
003060.806: Loaded 'bcm2711-rpi-cm4.dtb' to 0x100 size 0xd6d5
003074.339: brfs: File read: 54997 bytes
003083.492: brfs: File read: /mfs/sd/overlays/overlay_map.dtb
003154.487: brfs: File read: 2347 bytes
003156.426: brfs: File read: /mfs/sd/config.txt
003157.466: brfs: File read: 1784 bytes
003168.164: brfs: File read: /mfs/sd/overlays/revpi-connect4.dtbo
003217.674: Loaded overlay 'revpi-connect4'
003217.689: Loaded HAT overlay
003217.710: dtparam: audio=on
003830.385: brfs: File read: 7839 bytes
003835.521: brfs: File read: /mfs/sd/overlays/dwc2.dtbo
003852.044: Loaded overlay 'dwc2'
003852.068: dtparam: dr_mode=host
003902.437: brfs: File read: 801 bytes
003904.410: brfs: File read: /mfs/sd/cmdline.txt
003904.489: Read command line from file 'cmdline.txt':
003904.515: 'dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 fsck.repair=yes rootwait nosplash plymouth.ignore-serial-consoles'
004227.407: brfs: File read: 136 bytes
006007.655: brfs: File read: /mfs/sd/kernel8.img
006007.694: Loaded 'kernel8.img' to 0x80000 size 0x7f0db0
008753.721: Kernel relocated to 0x200000
008753.744: Device tree loaded to 0x2eff1300 (size 0xec1e)
008761.352: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
011051.852: vchiq_core: vchiq_init_state: slot_zero = 0xeb080000, is_master = 1
011055.334: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
011062.631: TV service:host side not connected, dropping notification 0x00000002, 0x00000002, 0x00000052
016095.898: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
016095.917: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
016095.953: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
016095.971: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
User avatar
nicolaiB
KUNBUS
Posts: 893
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: RevPi Connect 4 - Modbus /dev/ttyRS485 nicht vorhanden

Post by nicolaiB »

Sieht unauffällig aus. Um einen Hardware Defekt auszuschließen versuche es bitte einmal mit dem aktuellsten 64-bit Image. Du findest es in unserem Downloadbereich. Falls dann der Fehler immer noch auftritt, schlage ich vor den RMA Prozess beim Verkäufer zu starten.

Gruß Nicolai
danielz
Posts: 8
Joined: 13 Aug 2020, 16:23

Re: RevPi Connect 4 - Modbus /dev/ttyRS485 nicht vorhanden

Post by danielz »

Ich habe heute versucht ein neues Image auf diesem RevPi zu installieren, jedoch ohne Erfolg. Das Gerät wird mit der Software rpiboot nicht erkannt. Ich habe es sowohl von Windows als auch Linux versucht, und auch mit verschiedenen USB-Kabeln. Ein anderer RevPi, den ich hier habe, wurde mit dem gleichen Setup direkt erkannt.

Deutet das darauf hin, dass mit dem RevPi Connect 4 den ich hier habe etwas nicht stimmt?
Post Reply