Git Product home page Git Product logo

Comments (2)

Paraphraser avatar Paraphraser commented on July 18, 2024

Yes, there is a way around this.

Please read these links:

  1. This project is dormant - which will explain why you should be starting at SensorsIot/IOTstack.
  2. The assumptions IOTstack makes so you understand that this is a "your mileage may vary" situation.

The ttyAMA0 device is the Raspberry Pi serial port. Apparently, "AMA" is the name of the bus on the Raspberry Pi SOC that connects to the UART.

Because /dev/ttyAMA0 is pretty much guaranteed to exist on a Raspberry Pi, it is used fairly often in IOTstack service definitions, both "for real" and as a placeholder.

Node-RED is an example of a "for real" mapping:

- /dev/ttyAMA0:/dev/ttyAMA0

With that in place a flow using the node-red-node-serialport add-on node can access the serial port on the Raspberry Pi (left hand side of the above mapping) by communicating with the container's serial port (right hand side of the above mapping).

It doesn't matter whether any node or flow is or isn't using /dev/ttyAMA0. The mapping makes the serial port available inside the container in case a node or flow wants to use it. It's a subtle difference.

Octoprint and Zigbee2MQTT are examples of "placeholder" usage. Until you connect your 3D printer or Zigbee adapter, you don't know how it is going to show up in /dev. Each of those service definitions maps:

- /dev/ttyAMA0:/dev/ttyACM0

Because Docker-Compose can find the left hand side of the mapping, it will at least start both the stack as a whole and any containers using that mapping.

The process running inside the container may well get upset and go into a restart loop (Zigbee2MQTT does) but that's a separate matter.

Anyway, in the case of Node-RED, you can solve this problem by doing one of the following:

  1. Delete or comment-out the line containing /dev/ttyAMA0; or

  2. For your particular hardware, figure out which device connects to your serial port and substitute it. For example, if /dev/ttyS0 leads to your UART, change the line to be:

    - /dev/ttyS0:/dev/ttyAMA0
    

The approach you take depends on whether you have plans to communicate with the serial port - assuming that exists on your hardware.

I hope this makes sense?

from iotstack.

tester277 avatar tester277 commented on July 18, 2024

Phill Thanks for the detailed explanation. With this it makes sense.

from iotstack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.