Hi,
I’m trying to develop a Lora gateway based on my Mallow board AM62.
A semtech LR1302 pcie board is connected to my spi , i2c and gpio SoM.
I’m able to run the first PHY piece of software names Semtech Lora Packet Forwarder.
It just send via UDP on port 1700 the result of radio scan. Because the advised way of working and the gpioset command are not in the basic images of toradex for my board, i’m running this paquet forwarder into a container. It works fine and i’m able to see udp crypted data.
This crypted data are send to the chirpstack-gateway-bridge that run into another container. This chirpstack-gateway-bridge listen on port 1700 to be able to receive data from the packet forwarder.
Both container are started by a docker-compose.yml file.
My problem is that as the two software are in two separate container, i can’t use ports: -1700:1700/udp for both because docker complain that the port is already in use.
Bind for 0.0.0.0:1700 failed: port is already allocated
How can I established the udp communication between this two container ?
Thank you.
Here is my docker-compose.yml file:
version: “3”
services:
chirpstack:
image: chirpstack/chirpstack:4
command: -c /etc/chirpstack
restart: unless-stopped
volumes:
- ./configuration/chirpstack:/etc/chirpstack
- ./lorawan-devices:/opt/lorawan-devices
depends_on:
- postgres
- mosquitto
- redis
environment:
- MQTT_BROKER_HOST=mosquitto
- REDIS_HOST=redis
- POSTGRESQL_HOST=postgres
ports:
- 8080:8080chirpstack-gateway-bridge:
image: chirpstack/chirpstack-gateway-bridge:4
restart: unless-stopped
volumes:
- ./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridge
environment:
- INTEGRATION__MQTT__EVENT_TOPIC_TEMPLATE=eu868/gateway/{{ .GatewayID }}/event/{{ .EventType }}
- INTEGRATION__MQTT__STATE_TOPIC_TEMPLATE=eu868/gateway/{{ .GatewayID }}/state/{{ .StateType }}
- INTEGRATION__MQTT__COMMAND_TOPIC_TEMPLATE=eu868/gateway/{{ .GatewayID }}/command/#
depends_on:
- mosquitto
ports:
- 1700:1700/udpchirpstack-gateway-bridge-basicstation:
image: chirpstack/chirpstack-gateway-bridge:4
restart: unless-stopped
command: -c /etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge-basicstation-eu868.toml
ports:
- 3001:3001
volumes:
- ./configuration/chirpstack-gateway-bridge:/etc/chirpstack-gateway-bridge
depends_on:
- mosquittochirpstack-rest-api:
image: chirpstack/chirpstack-rest-api:4
restart: unless-stopped
command: --server chirpstack:8080 --bind 0.0.0.0:8090 --insecure
ports:
- 8090:8090
depends_on:
- chirpstackpostgres:
image: postgres:14-alpine
restart: unless-stopped
volumes:
- ./configuration/postgresql/initdb:/docker-entrypoint-initdb.d
- postgresqldata:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=rootredis:
image: redis:7-alpine
restart: unless-stopped
command: redis-server --save 300 1 --save 60 100 --appendonly no
volumes:
- redisdata:/datamosquitto:
image: eclipse-mosquitto:2
restart: unless-stopped
ports:
- 1883:1883
volumes:
- ./configuration/mosquitto/config/:/mosquitto/config/semtech_pkt_fwd:
build: .
volumes:
- /dev:/dev
device_cgroup_rules:
- ‘c 254:* rmw’
- ‘c 153:* rmw’
- ‘c 89:* rmw’
ports:
- 1700:1700/udpvolumes:
postgresqldata:
redisdata: