|
@@ -156,18 +156,21 @@ static connectDeviceManager *connectDeviceManagerInstance = nil;
|
|
|
|
|
|
_curConnectDeviceState = DeviceConnectDeciceing;
|
|
|
|
|
|
+ NSString *curSdnId = self.DeviceThirdIdMod.data.sdnId; //@"3dfe7c1f";
|
|
|
|
|
|
/// 3. 根据对端的 SDN ID 创建连接
|
|
|
- [RaylinkProxy.sharedManager createNewConnection:self.DeviceThirdIdMod.data.sdnId];
|
|
|
+ [RaylinkProxy.sharedManager createNewConnection:curSdnId];
|
|
|
|
|
|
/// 4. 创建 HttpService
|
|
|
- self.tcpPort = [RaylinkProxy.sharedManager createHttpService:self.DeviceThirdIdMod.data.sdnId];
|
|
|
+ self.tcpPort = [RaylinkProxy.sharedManager createHttpService:curSdnId];
|
|
|
self.tcpPortStr = [[NSString alloc] initWithFormat:@"%ld",self.tcpPort];
|
|
|
|
|
|
self.socket = [[GCDAsyncSocket alloc] initWithDelegate:self delegateQueue:dispatch_get_main_queue()];
|
|
|
|
|
|
/// 6. 添加端口防火墙
|
|
|
- [RaylinkProxy.sharedManager addSdnId:self.DeviceThirdIdMod.data.sdnId allowPort:9100];
|
|
|
+ [RaylinkProxy.sharedManager addSdnId:curSdnId allowPort:9300];
|
|
|
+ [RaylinkProxy.sharedManager addSdnId:curSdnId allowPort:9100];
|
|
|
+
|
|
|
|
|
|
//[self.connectBtn setEnabled:NO];
|
|
|
|