This topic has been archived. It cannot be replied.
-
枫下家园 / 电脑电信 / 智能设备如何从手机上连接的原理?现在家里越来越多智能设备,很多可以直接用手机远程控制,我们都知道路由器有单向防火墙,不允许外部发起连接。那么手机是如何连上智能设备的呢?
-wuyg719(wuyg719);
2018-1-14
{136}
(#11290039@0)
+1
-
不连。
-troyd(|);
2018-1-14
(#11290046@0)
-
不连如何控制智能设备?
-wuyg719(wuyg719);
2018-1-14
(#11290056@0)
-
You don’t
-troyd(|);
2018-1-14
(#11290058@0)
-
不连还是不能控制?你说的话把我搞糊涂了。
-wuyg719(wuyg719);
2018-1-14
(#11290072@0)
-
Your router has firewall blocking traffic coming in. Then how do you access your devices?
-troyd(|);
2018-1-14
(#11290077@0)
-
这就是我的问题,你为什么反问我?我的手机上的应用确实能控制家里的智能设备,我不得其解,所以问这个问题。
-wuyg719(wuyg719);
2018-1-14
(#11290078@0)
+1
-
Your router has firewall blocking traffic coming in. Then you don’t access your devices.
-troyd(|);
2018-1-14
(#11290085@0)
-
Use NAT on rooter set port forwarding then router uses a static IP
-troyd(|);
2018-1-14
(#11290092@0)
-
我没有做任何特殊设置,手机应用就能够访问家里的智能设备,怎么解释?
-wuyg719(wuyg719);
2018-1-14
(#11290162@0)
+2
-
There are holes in the firewall.
-troyd(|);
2018-1-14
(#11290194@0)
-
每个手机应用都可以这样做,你的意思是每个路由器都有漏洞?
-wuyg719(wuyg719);
2018-1-14
(#11290237@0)
+1
-
你直接连 router 也好,通过智能设备的网站,然后再控制你的智能设备也好,走不走 VPN,都要有双向通信才行。防火墙要是没洞,大概你直接间接都接触不到。我猜是在设置智能设备的时候,是智能设备在防火墙开洞的时候。
-troyd(|);
2018-1-14
(#11290245@0)
-
你这个假设不成立:智能设备没有路由器管理密码能够改动路由器设置?每个路由器的设置方式不一样,这种可能性很小。我更相信智能设备用了代理服务器,自己主动连代理服务器。但问题是视频也用代理?代理服务器能受的了吗?
-wuyg719(wuyg719);
2018-1-14
(#11290257@0)
+1
-
如果是我,我会猜是在我把这个智能设备加到网络里时候,一次性或者打开某个端口(或者让我直接进入,或者是让第三方进入)。但我建议你还是找厂家吧。
-troyd(|);
2018-1-14
(#11290260@0)
-
这个假设应该很小,因为那样需要路由器的管理密码,我从来没有见到哪个智能设备需要路由器的管理密码,而且每个路由器打开端口的方式不一样。
-wuyg719(wuyg719);
2018-1-14
(#11290372@0)
+1
-
什么智能设备?
-xmlhttprequest(build5381);
2018-1-14
(#11290342@0)
-
着啊,我怎么就没想起问呢。
-troyd(|);
2018-1-14
(#11290345@0)
-
比如说智能开关,可以从外面打开或关闭家里的电源开关
-wuyg719(wuyg719);
2018-1-14
(#11290377@0)
+1
-
又如安保摄像机,可以从手机上看到家里视频
-wuyg719(wuyg719);
2018-1-14
(#11290378@0)
-
还有智能车库门,可以从手机上看到车库门的状态,远程打开或关闭
-wuyg719(wuyg719);
2018-1-14
(#11290382@0)
-
不清楚具体是那种设备,但是要么是 pull - 设备定期去 server 看有没有新指令 (会有延迟), 要么是 push --- 一般来说,会需要某些 TCP/UDP/HTTP 端口打开 (基本上在网上可以查到什么设备需要打开什么端口)...
-xmlhttprequest(build5381);
2018-1-14
(#11290443@0)
-
我认为在设置首次的时候,这个端口就被打开(firewall exceptions)了。但是楼主并没有留意到这个打开,或者软件没有显示。貌似楼主不认为端口被打开了,但又不知道通信怎么完成的。要么是到中转站,要么是智能产品别有蹊跷,只能问厂家了。
-troyd(|);
2018-1-14
(#11290520@0)
-
设置智能设备一般不会需要你手工打开那些端口。
-xmlhttprequest(build5381);
2018-1-14
(#11290540@0)
+1
-
我所谓的打开,是软件 run 着,就说我们得打开通道,你同意就 Yes 继续(如果同意,自然软件就自己跑去打开了),不同意就回去退货。
-troyd(|);
2018-1-14
(#11290546@0)
-
我感觉你理解错误,当一个连接是由内部设备建立的时候,防火墙不会阻挡,但问题是智能设备刚开始的时候不知道手机app的地址。而且如果手机上也有防火墙的话麻烦更大了。
-wuyg719(wuyg719);
2018-1-14
(#11290581@0)
+1
-
(远程情况下)智能设备和手机不会直接通讯,都是通过 server
-xmlhttprequest(build5381);
2018-1-14
(#11290617@0)
+1
-
你连一次就知道了, 这问题就不是问题。
-ontario_2014(rolian);
2018-1-14
(#11290088@0)
-
不是问题,但理论上如何实现?通过代理服务器?谁的代理服务器,视频也代理吗?
-wuyg719(wuyg719);
2018-1-14
(#11290163@0)
+1
-
我的理解是两个办法 1-代理 2-路由上port forward
-canadagoose(楓中秋雁);
2018-1-14
(#11290321@0)
+1
-
1.代理也得路由器上开端口指到代理才行吧?
-troyd(|);
2018-1-14
(#11290331@0)
-
家里的智能设备是outgoing 出去外面的代理服务器,路由器为什么还要开端口?
-canadagoose(楓中秋雁);
2018-1-14
(#11290350@0)
-
远程控制命令怎么进来呢?
-troyd(|);
2018-1-14
(#11290351@0)
-
NAT 进来, like your access to any Internet servers
-canadagoose(楓中秋雁);
2018-1-14
(#11290355@0)
+1
-
新邮件 notification 怎么进来的?
-xmlhttprequest(build5381);
2018-1-14
(#11290358@0)
-
the app polls the server in the internet every x-minutes
-canadagoose(楓中秋雁);
2018-1-14
(#11290361@0)
+1
-
mailman 放信箱,我的客户端软件定期溜达,没有拉倒,有就取的啊。
-troyd(|);
2018-1-14
(#11290365@0)
-
对,这是手机 background data 的消耗
-canadagoose(楓中秋雁);
2018-1-14
(#11290369@0)
-
就是手机和智能设备在不停的 looping?然后在中转站完成信息的交换?
-troyd(|);
2018-1-14
(#11290373@0)
-
手机发命令,然后放个中转站,然后智能设备到中转站去货,回来再执行命令?快赶上水牛城的货仓店了。
-troyd(|);
2018-1-14
(#11290371@0)
-
哈哈,这个解释好,non-technical 都能懂
-canadagoose(楓中秋雁);
2018-1-14
(#11290381@0)
-
LOL。non-technical 的解释,non-technical 能听不懂么。
-troyd(|);
2018-1-14
(#11290385@0)
-
我想个这个问题,如果是一些简单的命令或状态,通用代理能做到,但视频呢,通用代理不愿意转发如此规模的大数据,所以可能有厂商自己的专门视频代理,那么厂商倒闭的时候你的智能设备不就完蛋了?
-wuyg719(wuyg719);
2018-1-14
(#11290393@0)
-
是的,厂商倒闭时就没有有远程功能了
-canadagoose(楓中秋雁);
2018-1-14
(#11290416@0)
-
只需要代理establish session, once in session, videos can be streamed in via NAT
-canadagoose(楓中秋雁);
2018-1-14
(#11290422@0)
-
楼主的问题有两个小部分:1 是实时观看;2 是存储。他的问题是怎么转发存储的这部分数据,最起码要从自家的智能设备上传到服务器吧。
-troyd(|);
2018-1-14
(#11290429@0)
-
设备和家中的电脑之间是没有防火墙的,可以存储在里面
-canadagoose(楓中秋雁);
2018-1-14
(#11290454@0)
-
楼主原来的问题是 -- “手机是如何连上智能设备的呢?”。
-troyd(|);
2018-1-14
(#11290468@0)
-
在家里时可以是 bluetooth 或 WAN。远程遥控见上。#11290443
-xmlhttprequest(build5381);
2018-1-14
(#11290474@0)
-
代理如何建立sesson?NAT是什么?
-wuyg719(wuyg719);
2018-1-14
(#11290527@0)
-
session是根据TCP/IP 协议(OSI model layer 5)建立的。NAT(network address translation) 是家里路由的工作原里。
-canadagoose(楓中秋雁);
2018-1-14
(#11290577@0)
-
还是不太明白,如果NAT是指代理服务器,连接建立之后还要转发吗?所有的数据都需要转发吗?
-wuyg719(wuyg719);
2018-1-14
(#11290592@0)
-
连接建立之后,stream 数据就不用经过服务器了,因为手机已经知道智能设备的在路由的 port number 了
-canadagoose(楓中秋雁);
2018-1-14
(#11290623@0)
-
NAT 不是指代理服务器, PLEASE Google what is NAT
-canadagoose(楓中秋雁);
2018-1-14
(#11290628@0)
-
这些都是信息技术的基础,网上有大量资讯,放狗就知道了
-canadagoose(楓中秋雁);
2018-1-14
(#11290590@0)
-
有些通知速度非常快,快到一秒钟通知就来了,难道这些手机应用查询loop这么快?高度怀疑。
-wuyg719(wuyg719);
2018-1-14
(#11290576@0)
-
一般Email 是stateless application, 通知要靠poll。”一秒钟通知就来了“ 是stateful app, the 2 endpoints are in session continuously
-canadagoose(楓中秋雁);
2018-1-14
(#11290583@0)
-
我知道email的原理,好歹我还配置smtp,有个消息中转站(mail server),但这些apps根本不配置任何东西。
-wuyg719(wuyg719);
2018-1-14
(#11290593@0)
-
这些apps出去访问它hard coded 的服务器是不用告诉你的
-canadagoose(楓中秋雁);
2018-1-14
(#11290626@0)
-
lol... ok... how about Push Notification?
-xmlhttprequest(build5381);
2018-1-14
(#11290399@0)
-
wiki 是这样说的 -- For remote notification it is usually handled by remote server. Under this scenario the client application needs to be registered on the server with a unique key e.g.: UUID,and the server fires the message against the unique key to deliver the message to the client application via client/server agreed protocol such as HTTP, and then the client displays the message received.
-troyd(|);
2018-1-14
{203}
(#11290403@0)
-
就是说这些智能设备都有个 UUID。在开始设置的时候把 UUID 告诉 UUID 服务器。这和 static IP + static port 不是换汤不换药么。
-troyd(|);
2018-1-14
(#11290408@0)
-
lol 我只是举个例子。拿手机来说,不是一个 ‘uuid',是每个应用 比如 facebook app (加上每个 login 一个),这样 server 才知道该把 notification 发到哪里...
-xmlhttprequest(build5381);
2018-1-14
(#11290450@0)
-
颇有白忙的赶脚。不过倒是交流学习爽了一下。
-troyd(|);
2018-1-14
(#11290594@0)
-
每个应用有自己的port
-sxffff(lookingforjob);
2018-1-14
(#11290638@0)
-
不管是手机终端或者PC终端,一般远程访问自家smart device都需要个IP Bridge with static ip address。我们以前开发smart thermo就是这样做的。不过现在都是IoT,通过cloud server, smart device registration后可以实现send cmd
-littlecarpio(人畜无害小豌豆);
2018-1-14
(#11290607@0)
-
我猜测大概代理服务器告知双方Ip地址和端口,然后手机应用启动一个server在一个固定的端口,智能设备主动发起连接连到手机应用里,这样不会被防火墙挡住,这个理论有一个很重要的假设:手机上没有防火墙
-wuyg719(wuyg719);
2018-1-14
(#11290636@0)
-
差不多了
-canadagoose(楓中秋雁);
2018-1-14
(#11290651@0)
-
不是的--- 智能设备不会访问手机 / 一般手机也不会直接(远程)访问智能设备。楼上说的新型 IoT 要在 cloud 注册,形成一个”虚拟设备“,手机或其他 app 访问这个”虚拟设备“ -- 这样哪怕设备不随时在线也可以了...
-xmlhttprequest(build5381);
2018-1-14
(#11290654@0)
-
你应该抛弃防火墙概念了。现在IoT,用cloud或者aws做server,一切后台都是server完成。smart device登录server,手机app也是要登录server才能完成一切operation。smart device一般现在都有embedded RTOS,和远程数据interactive还是很容易的。
-littlecarpio(人畜无害小豌豆);
2018-1-14
(#11290818@0)
-
我真正电脑上的web server在路由器之后也没有办法在外面访问,除非在路由器上专门做一些设置,你的RTOS难道更牛?
-wuyg719(wuyg719);
2018-1-15
(#11291147@0)
-
简单来说,是 device 访问外面的 server,所以(一般)不需要特殊的设置 --- 和你架设 web site 允许外面访问进来是不一样的。
-xmlhttprequest(build5381);
2018-1-15
(#11291265@0)
-
不是牛,现在client端都很简单,一切都在server端。你想想你的voip adaptor也是要在server注册的。client端不需要防火墙,只要能上网
-littlecarpio(人畜无害小豌豆);
2018-1-15
(#11291364@0)
-
以后cloud computing很重要。就是cloud server/client模式,一切终端都不做大量运算,都发回cloud server由server做一切计算,然后在发回终端。
-littlecarpio(人畜无害小豌豆);
2018-1-14
(#11290827@0)
-
lol depends... 别的不说,自动驾驶汽车就不行...
-xmlhttprequest(build5381);
2018-1-14
(#11290855@0)
-
你还真别说,我去年面试了一家电动汽车公司,他们就有一部分数据传回cloud server进行运算然后再发回来。因为车载CPU耗电也很大,太多计算也不行。他们用的是电信carrier的信道传输数据。
-littlecarpio(人畜无害小豌豆);
2018-1-15
(#11291356@0)
-
实时控制部分肯定不能让云去计算 ---- 因为不能保证一定有 connection (比如隧道/山区)...
-xmlhttprequest(build5381);
2018-1-15
(#11291362@0)
-
那当然不行啦,所以本地和server计算都有。因为有些数据是已经training好的data sets,可以在本地做。
-littlecarpio(人畜无害小豌豆);
2018-1-15
(#11291369@0)