Inhaltsverzeichnis

OBP60

siehe auch:

Firmware

Erstellen der Firmware unter Linux lediglich mit PlatformIO Core.

  1. Abhängigkeiten installieren (als root)
    apt-get install python3-venv
  2. PlatformIO installieren (als normaler Benutzer)
    1. Installer herunterladen:
      curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py

      oder

      wget -O get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py
    2. Installer ausführen
      python3 get-platformio.py
  3. Installer kann anschließend gelöscht werden
    rm get-platformio.py
  4. Quellen von OBP von Github holen
    git clone https://github.com/norbert-walter/esp32-nmea2000-obp60.git
  5. Firmware erstellen
    cd esp32-nmea2000-obp60
    ~/.platformio/penv/bin/pio run
  6. Firmware erstellen und auf das Gerät laden
    ~/.platformio/penv/bin/pio run -t upload

Linux / USB

Herstellen einer USB-Kabelverbindung. Systemprotokoll:

usb 3-1: new full-speed USB device number 7 using xhci_hcd
usb 3-1: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-1: Product: USB JTAG/serial debug unit
usb 3-1: Manufacturer: Espressif
usb 3-1: SerialNumber: 11:22:33:44:55:66
cdc_acm 3-1:1.0: ttyACM0: USB ACM device
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

Anpassen der Schnittstellengeschwindigkeit auf Standardwerte von OBP60

stty -F /dev/ttyACM0 speed 115200

Ausgabe der empfangegen Daten

cat < /dev/ttyACM0

oder

picocom -b 115200 --imap lfcrlf /dev/ttyUSB0
CTRL-a, CTRL-q beendet das Programm

Entwicklung

Seite erstellen

  1. Page<Name>.cpp anlegen
  2. config.json anpassen: page<n>type / list erweitern um den Namen
  3. obp60task.cpp/registerAllPages erweitern um neue Seite

Konfiguration

Informationen in config.json.

Felder

Im Projekt kann es mehrere Dateien geben, die beim Erstellen zu einer einzigen Konfiguration zusammengefügt werden.

Über Capabilities können Konfigurationsoptionen ein- oder ausgeschaltet werden, je nach Hardware. Die möglichen Werte werden über DECLARE_CAPABILITY eingestellt. Momentan in obp60task.h. Mit Capabilities ist es nicht möglich eine Einstellung mit verschiedenen Standardwerten vorzubelegen. Dazu müssen je nach PlatformIO-Environment verschiedene Konfigurationsdateien verwendet werden.

Screenshots

Im Browser

http://192.168.15.1/api/user/OBP60Task/screenshot

Oder über die console

wget --content-disposition http://192.168.15.1/api/user/OBP60Task/screenshot

Sonstiges

Kopplung an pypilot