I'm trying to connect to a server(dfmt2) with another client(ndmt2) because switchbots dont work on the protected client (df).
I ve unpacked the root of dfmt2 so i got the ip and the ports.
I changed the ports and ip in the unprotected client(ndmt2) and i still cant connect.It says Error in connection with the server.
serverinfo.py of dfmt2 :
SERVER_NAME = "DFMT2"
SERVER_IP = "37.221.210.58"
CH_NAME = "CH1"
CH2_NAME = "CH2"
PORT_1 = 20010
PORT_2 = 20000
PORT_3 = 20010
PORT_4 = 20020
STATE_NONE = "..."
STATE_DICT = {
0 : "....",
1 : "NORM",
2 : "BUSY",
3 : "FULL"
}
SERVER01_CHANNEL_DICT = {
1:{"key":11,"name":CH_NAME,"ip":SERVER_IP,"tcp_por t":PORT_1,"udp_port":PORT_1,"state":STATE_NONE, },
2:{"key":12,"name":CH2_NAME,"ip":SERVER_IP,"tcp_po rt":PORT_4,"udp_port":PORT_4,"state":STATE_NONE, },
}
REGION_NAME_DICT = {
0 : "",
}
REGION_AUTH_SERVER_DICT = {
0 : {
1 : { "ip":SERVER_IP, "port":PORT_2, },
}
}
REGION_DICT = {
0 : {
1 : { "name" :SERVER_NAME, "channel" : SERVER01_CHANNEL_DICT, },
},
}
MARKADDR_DICT = {
10 : { "ip" : SERVER_IP, "tcp_port" : PORT_3, "mark" : "10.tga", "symbol_path" : "10", },
}
serverinfo.py (unchanged,default) of the ndmt2 client
import os
import app
import locale
import debugInfo
##patch fix
CHINA_PORT = 50000
def BuildServerList(orderList):
retMarkAddrDict = {}
retAuthAddrDict = {}
retRegion0 = {}
ridx = 1
for region, auth, mark, channels in orderList:
cidx = 1
channelDict = {}
for channel in channels:
key = ridx * 10 + cidx
channel["key"] = key
channelDict[cidx] = channel
cidx += 1
region["channel"] = channelDict
retRegion0[ridx] = region
retAuthAddrDict[ridx] = auth
retMarkAddrDict[ridx*10] = mark
ridx += 1
return retRegion0, retAuthAddrDict, retMarkAddrDict
app.ServerName = None
if locale.IsEUROPE():
STATE_NONE = "..."
STATE_DICT = {
0 : "...",
1 : "NORM",
2 : "BUSY",
3 : "FULL"
}
SERVER01_CHANNEL_DICT = {
1:{"key":11,"name":"CH1 ","ip":"37.221.210.78","tcp_port":45600,"udp_port" :45600,"state":STATE_NONE,},
2:{"key":12,"name":"CH2 ","ip":"37.221.210.78","tcp_port":45700,"udp_port" :45700,"state":STATE_NONE,}
}
REGION_NAME_DICT = {
0 : "CANADA",
}
REGION_AUTH_SERVER_DICT = {
0 : {
1 : { "ip":"37.221.210.78", "port":45500, },
}
}
REGION_DICT = {
0 : {
1 : { "name" : "NDMT2", "channel" : SERVER01_CHANNEL_DICT, },
},
}
MARKADDR_DICT = {
10 : { "ip" : "37.221.210.78", "tcp_port" : 45600, "mark" : "10.tga", "symbol_path" : "10", },
}
edited serverinfo.py of ndmt2 client by me
import os
import app
import locale
import debugInfo
##patch fix
CHINA_PORT = 50000
def BuildServerList(orderList):
retMarkAddrDict = {}
retAuthAddrDict = {}
retRegion0 = {}
ridx = 1
for region, auth, mark, channels in orderList:
cidx = 1
channelDict = {}
for channel in channels:
key = ridx * 10 + cidx
channel["key"] = key
channelDict[cidx] = channel
cidx += 1
region["channel"] = channelDict
retRegion0[ridx] = region
retAuthAddrDict[ridx] = auth
retMarkAddrDict[ridx*10] = mark
ridx += 1
return retRegion0, retAuthAddrDict, retMarkAddrDict
app.ServerName = None
if locale.IsEUROPE():
STATE_NONE = "..."
STATE_DICT = {
0 : "...",
1 : "NORM",
2 : "BUSY",
3 : "FULL"
}
SERVER01_CHANNEL_DICT = {
1:{"key":11,"name":"CH1 ","ip":"37.221.210.58","tcp_port":20010,"udp_port" :20010,"state":STATE_NONE,},
2:{"key":12,"name":"CH2 ","ip":"37.221.210.58","tcp_port":20020,"udp_port" :20020,"state":STATE_NONE,}
}
REGION_NAME_DICT = {
0 : "CANADA",
}
REGION_AUTH_SERVER_DICT = {
0 : {
1 : { "ip":"37.221.210.58", "port":20010, },
}
}
REGION_DICT = {
0 : {
1 : { "name" : "dfserver", "channel" : SERVER01_CHANNEL_DICT, },
},
}
MARKADDR_DICT = {
10 : { "ip" : "37.221.210.58", "tcp_port" : 20010, "mark" : "10.tga", "symbol_path" : "10", },
}
what could be the problem?