TCPDUMP of OpenRemote ZWay authentication
With v2.1.2-rc-17 still the same problems, though the TCPDUMP looks slightly different from before.
Code: Select all
DS212> tcpdump -A -v -s 10240 'tcp port 8083 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 10240 bytes
15:38:44.400120 IP (tos 0x0, ttl 64, id 53660, offset 0, flags [DF], proto TCP (6), length 217)
DS212.56798 > raspberry.fritz.box.8083: Flags [P.], cksum 0x8459 (incorrect -> 0x73aa), seq 785799336:785799501, ack 3299199293, win 183, options [nop,nop,TS val 191007037 ecr 51423], length 165
E.....@.@......!..........X....=.....Y.....
.b.=....GET /OpenRemote/SwitchBinaryStatus/9/0 HTTP/1.1
User-Agent: OpenRemoteController
Content-Type: application/json
Host: raspberrypi:8083
Connection: Keep-Alive
15:38:44.425443 IP (tos 0x0, ttl 64, id 483, offset 0, flags [DF], proto TCP (6), length 269)
raspberry.fritz.box.8083 > DS212.56798: Flags [P.], cksum 0x75ba (correct), seq 1:218, ack 165, win 470, options [nop,nop,TS val 51425 ecr 191007037], length 217
..@.@..z.......!.......=..YM....u......
.....b.=HTTP/1.1 401 Unauthorized
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Content-Type: text/plain
Content-Length: 13
Transfer-Encoding: chunked
D
Not logged in
0
DS212 is the Synology box where the OpenRemote service runs. I don't see any of the handshaking that Marcus refers to. (two posts above this one)
TCPCUMP of OpenRemote KODI authenthication
As a reference I give here the trace for the working Open Remote - Kodi(
XBMC) authentication steps
Code: Select all
DS212> tcpdump -A -v -s 10240 'tcp port 8080 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 10240 bytes
14:39:43.990946 IP (tos 0x0, ttl 64, id 45101, offset 0, flags [DF], proto TCP (6), length 206)
DS212.52627 > Fetuut.fritz.box.webcache: Flags [P.], cksum 0x8455 (incorrect -> 0xf5c5), seq 2906046474:2906046628, ack 1501338075, win 183, options [nop,nop,TS val 17788962 ecr 59536], length 154
E....-@.@..h...!...#.....6.
Y|.......U.....
..p"....POST /jsonrpc HTTP/1.1
User-Agent: OpenRemoteController
Content-Type: application/json
Content-Length: 0
Host: fetuut:8080
Connection: Keep-Alive
14:39:43.991434 IP (tos 0x0, ttl 64, id 29004, offset 0, flags [DF], proto TCP (6), length 194)
Fetuut.fritz.box.webcache > DS212.52627: Flags [P.], cksum 0x0520 (correct), seq 1:143, ack 154, win 235, options [nop,nop,TS val 59536 ecr 17788962], length 142
E...qL@.@.EU...#...!....Y|...6....... .....
......p"HTTP/1.1 401 Unauthorized
Content-Length: 0
Connection: close
WWW-Authenticate: Basic realm=XBMC
Date: Wed, 25 Nov 2015 13:39:43 GMT
14:39:43.994825 IP (tos 0x0, ttl 64, id 46501, offset 0, flags [DF], proto TCP (6), length 241)
DS212.52628 > Fetuut.fritz.box.webcache: Flags [P.], cksum 0x8478 (incorrect -> 0xd9fd), seq 2916992386:2916992575, ack 488566679, win 183, options [nop,nop,TS val 17788962 ecr 59537], length 189
E.....@.@......!...#.................x.....
..p"....POST /jsonrpc HTTP/1.1
User-Agent: OpenRemoteController
Content-Type: application/json
Content-Length: 0
Host: fetuut:8080
Connection: Keep-Alive
Authorization: Basic a29kaTpiYWNo
14:39:43.995282 IP (tos 0x0, ttl 64, id 1799, offset 0, flags [DF], proto TCP (6), length 236)
Fetuut.fritz.box.webcache > DS212.52628: Flags [P.], cksum 0xd4c8 (correct), seq 1:185, ack 189, win 235, options [nop,nop,TS val 59537 ecr 17788962], length 184
E.....@.@..p...#...!...........?...........
......p"HTTP/1.1 200 OK
Content-Length: 76
Content-Type: application/json
Date: Wed, 25 Nov 2015 13:39:43 GMT
{"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}
^C
4 packets captured
4 packets received by filter
0 packets dropped by kernel