Thanks! Now tested with 7.12.1 and adding these options helps:
/ip dhcp-server option
add code=1 force=yes name=option1 value="'255.255.255.0'"
add code=28 name=option2 value="'192.168.88.255'"
The netmask option (1) is required for the card to configure properly without the confusing "no gateway" error message.
The broadcast option (28) is not strictly required but makes the card report proper broadcast address instead of 0.0.0.0.
The request from the card asks (option 55) for broadcast (28) but not netmask (1):
Dynamic Host Configuration Protocol (Request)
Message type: Boot Request (1)
Hardware type: Ethernet (0x01)
Hardware address length: 6
Hops: 0
Transaction ID: 0x0000794b
Seconds elapsed: 0
Bootp flags: 0x8000, Broadcast flag (Broadcast)
Client IP address: 0.0.0.0
Your (client) IP address: 0.0.0.0
Next server IP address: 0.0.0.0
Relay agent IP address: 0.0.0.0
Client MAC address: 00:02:99:10:e1:2d
Client hardware address padding: 00000000000000000000
Server host name not given
Boot file name not given
Magic cookie: DHCP
Option: (53) DHCP Message Type (Request)
Length: 1
DHCP: Request (3)
Option: (57) Maximum DHCP Message Size
Length: 2
Maximum DHCP Message Size: 548
Option: (50) Requested IP Address (192.168.1.100)
Length: 4
Requested IP Address: 192.168.1.100
Option: (54) DHCP Server Identifier (192.168.1.1)
Length: 4
DHCP Server Identifier: 192.168.1.1
Option: (55) Parameter Request List
Length: 8
Parameter Request List Item: (3) Router
Parameter Request List Item: (6) Domain Name Server
Parameter Request List Item: (28) Broadcast Address
Parameter Request List Item: (54) DHCP Server Identifier
Parameter Request List Item: (2) Time Offset
Parameter Request List Item: (23) Default IP Time-to-Live
Parameter Request List Item: (0) Padding
Parameter Request List Item: (255) End
Option: (255) End
Option End: 255
Padding: 000000000000000000000000000000000000000000000000000000000000000000000000…
MT DHCP server needs to be specifically configured to send the broadcast option (not sent by default even though requested), and the netmask option (with force=1 for clients that don't request it, like this UPS card). This is in a mostly default configuration.
For comparison, the Chinese routers (Phicomm, Tenda) do send both: broadcast, netmask (the latter even if not requested by client). Out of curiosity I've just tested another one, very old (2011) TP-Link TL-WR340G - only difference is that its broadcast is 255.255.255.255 (not subnet broadcast 192.168.x.255 as in the newer ones), but it also does send netmask even if not requested and this UPS card works properly. So this (DHCP server sending netmask option even if not requested by DHCP client, and sending broadcast option) seems to be common practice, and MT probably should follow that. Values of these options depend on specific IP configurations so it would be error-prone to set them manually (separately for each DHCP network, especially on routers that have many interfaces with possibly different netmasks).
Hope this helps someone, for those searching for solutions to the error messages from the card I include the messages below. With default MT DHCP server config (no netmask, no broadcast), not working:
Interface callback: FNS_IF_EVENT_ADDRESS_READY for 192.168.88.249.
DhcpCallback: DHCP_LEASE_IS_BOUND, IP 192.168.88.249
Error: Could not set DHCP Data!
IPv4 DHCP Address returned
No gateway is provided by DHCP server!
IP Address: 0.0.0.0
Netmask: 0.0.0.0
Broadcast Address: 0.0.0.0
DHCP/BootP Server: 0.0.0.0
With netmask (force=yes) and broadcast options added, working:
Interface callback: FNS_IF_EVENT_ADDRESS_READY for 192.168.88.249.
DhcpCallback: DHCP_LEASE_IS_BOUND, IP 192.168.88.249
Received DHCPv4 DNS Address: 192.168.88.1
IPv4 DHCP Address returned
IP Address: 192.168.88.249
Netmask: 255.255.255.0
Gateway: 192.168.88.1
Broadcast Address: 192.168.88.255
DHCP/BootP Server: 192.168.88.1
IPv4 DNS Server: "192.168.88.1"
MT, please consider changing the DHCP server defaults so these options don't have to be set manually (or at least, set them in the default router configuration to match most other SOHO routers) - it may affect other IoT devices which happen to be based on the same embedded OS (unknown one for now, but Google finds FNS_IF_EVENT_ADDRESS_READY in log messages from some VoIP phones).