Hotplug - USB tty device links related to usb port

I have 5 devices with the same Vendor and Product ID (12d1/1c05/102) - GSM modems. Each device generates 3 interfaces ttyUSB0, ttyUSB1, ttyUSB2 in the DEV directory.

It needs to create its own interface names, which will be based on the usb port of the device. Each device will always connect to the same USB port on the active hub.

How to do it? Solving this problem is not a problem when udev is running on the system. There is neither udev package in OpenWrt nor can this package be installed. There are practically no examples of solutions for Hotplug.

The script below works fine, but only if the devices have different Vendor and Product ID. In my case this does not solve the problem as the devices are identical. So I can only bind them to a given usb port.

#!/bin/sh
if [ "$DEVTYPE" = "usb_interface" ] && [ "$ACTION" = "add" ]; then
    for tty in /sys/$DEVPATH/ttyUSB*; do
        [ -d "$tty" ] || continue
        OLDD=${tty##*/}

        # it is E173 #1
        if [ "x$PRODUCT" = "x12d1/1c05/102" ]; then
            NEWD="GSM1_"${DEVPATH##*.}
            rm /dev/$NEWD
            ln -s /dev/$OLDD /dev/$NEWD
        fi

        # it is E173 #2
        if [ "x$PRODUCT" = "x12d1/1436/0" ]; then
            NEWD="GSM3_"${DEVPATH##*.}
            rm /dev/$NEWD
            ln -s /dev/$OLDD /dev/$NEWD
        fi

    done
fi

All the information I have available about the device is:

DEVNAME=bus/usb/001/004
USER=root
OF_NAME=port
ACTION=bind
SHLVL=1
HOME=/
SEQNUM=680
BUSNUM=001
MAJOR=189
HOTPLUG_TYPE=usb
DEVPATH=/devices/platform/101c0000.ehci/usb1/1-1
LOGNAME=root
DEVICENAME=1-1
TERM=linux
SUBSYSTEM=usb
PATH=/usr/sbin:/usr/bin:/sbin:/bin
MINOR=3
DRIVER=usb
TYPE=0/0/0
DEVNUM=004
PRODUCT=12d1/1c05/102
PWD=/
DEVTYPE=usb_device
OF_FULLNAME=/ehci@101c0000/port@1
OF_COMPATIBLE_N=0

The result of the query dmesg:

[ 7933.814701] option 1-1:1.0: GSM modem (1-port) converter detected
[ 7933.821351] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 7933.828974] option 1-1:1.1: GSM modem (1-port) converter detected
[ 7933.835592] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 7933.843122] option 1-1:1.2: GSM modem (1-port) converter detected
[ 7933.849743] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2