Difference between revisions of "WifiLamp"

From RevSpace
Jump to navigation Jump to search
(Protocol)
Line 26: Line 26:
 
The local protocol appears to use UDP.
 
The local protocol appears to use UDP.
 
There is an UDP broadcast message sent by the lamp of 172 bytes.
 
There is an UDP broadcast message sent by the lamp of 172 bytes.
 +
 +
== Capture ==
 +
Turn ON the lamp:
 +
(captured with tcpdump -i wlan0 src 192.168.1.240 -X)
 +
 +
<pre>
 +
18:36:41.270980 IP 192.168.1.240.6668 > 192.168.1.178.41290: Flags [.], ack 167, win 2302, length 0
 +
0x0000:  4500 0028 0613 0000 ff06 30ca c0a8 01f0  E..(......0.....
 +
0x0010:  c0a8 01b2 1a0c a14a 0001 1775 63d9 ecc7  .......J...uc...
 +
0x0020:  5010 08fe fe75 0000                      P....u..
 +
18:36:41.271040 IP 192.168.1.240.6668 > 192.168.1.178.41290: Flags [.], ack 167, win 2302, length 0
 +
0x0000:  4500 0028 0613 0000 ff06 30ca c0a8 01f0  E..(......0.....
 +
0x0010:  c0a8 01b2 1a0c a14a 0001 1775 63d9 ecc7  .......J...uc...
 +
0x0020:  5010 08fe fe75 0000                      P....u..
 +
18:36:41.868260 IP 192.168.1.240.49153 > ec2-3-121-210-75.eu-central-1.compute.amazonaws.com.8886: Flags [P.], seq 431:612, ack 208, win 1885, length 181
 +
0x0000:  4500 00dd 0614 0000 ff06 1caa c0a8 01f0  E...............
 +
0x0010:  0379 d24b c001 22b6 0000 751c 91ce 80ca  .y.K.."...u.....
 +
0x0020:  5018 075d 3ec9 0000 1703 0300 b042 416f  P..]>........BAo
 +
0x0030:  6862 6d64 3661 4739 3149 4652 319f bc08  hbmd6aG91IFR1...
 +
0x0040:  51da e246 20e7 5510 90ca f987 d943 c04c  Q..F..U......C.L
 +
0x0050:  49ae ae03 9e33 edd8 3d5c 8481 c861 c099  I....3..=\...a..
 +
0x0060:  30d8 e9f1 9488 c3f8 b03e 5ed5 e34e 48d0  0........>^..NH.
 +
0x0070:  170f 5931 1667 a5c7 44a8 dbe0 bec1 5712  ..Y1.g..D.....W.
 +
0x0080:  e0e1 21bc 39fc a4e4 6393 439a 4b9a c25e  ..!.9...c.C.K..^
 +
0x0090:  cfe0 15a9 26fe 71f3 28df fc51 094e e687  ....&.q.(..Q.N..
 +
0x00a0:  2d52 c46d c6cf 808e a387 b1e6 e45e 5cb7  -R.m.........^\.
 +
0x00b0:  f6a0 ed58 f2ee 749e 6082 0c9e f2d1 5c8a  ...X..t.`.....\.
 +
0x00c0:  2981 2095 62f4 eedf 513a 3a56 4fa3 71ac  )...b...Q::VO.q.
 +
0x00d0:  4e7e 9009 39c7 b4c8 1d4e 65ee b9        N~..9....Ne..
 +
18:36:41.870000 IP 192.168.1.240.6668 > 192.168.1.178.41290: Flags [P.], seq 266:357, ack 167, win 2302, length 91
 +
0x0000:  4500 0083 0615 0000 ff06 306d c0a8 01f0  E.........0m....
 +
0x0010:  c0a8 01b2 1a0c a14a 0001 1775 63d9 ecc7  .......J...uc...
 +
0x0020:  5018 08fe 42b7 0000 0000 55aa 0000 0000  P...B.....U.....
 +
0x0030:  0000 0008 0000 004b 0000 0000 332e 3300  .......K....3.3.
 +
0x0040:  0000 0000 0000 6300 0000 0132 0d91 0fb0  ......c....2....
 +
0x0050:  41e1 240d c133 b03e c6da 47cc d07d e609  A.$..3.>..G..}..
 +
0x0060:  3e99 2b80 0f93 caf3 0690 ac4f 0c58 6945  >.+........O.XiE
 +
0x0070:  347a 49aa 4b75 0d05 5c3c e1f6 9b92 6e00  4zI.Ku..\<....n.
 +
0x0080:  00aa 55                                  ..U
 +
18:36:41.870080 IP 192.168.1.240.6668 > 192.168.1.178.41290: Flags [P.], seq 266:357, ack 167, win 2302, length 91
 +
0x0000:  4500 0083 0615 0000 ff06 306d c0a8 01f0  E.........0m....
 +
0x0010:  c0a8 01b2 1a0c a14a 0001 1775 63d9 ecc7  .......J...uc...
 +
0x0020:  5018 08fe 42b7 0000 0000 55aa 0000 0000  P...B.....U.....
 +
0x0030:  0000 0008 0000 004b 0000 0000 332e 3300  .......K....3.3.
 +
0x0040:  0000 0000 0000 6300 0000 0132 0d91 0fb0  ......c....2....
 +
0x0050:  41e1 240d c133 b03e c6da 47cc d07d e609  A.$..3.>..G..}..
 +
0x0060:  3e99 2b80 0f93 caf3 0690 ac4f 0c58 6945  >.+........O.XiE
 +
0x0070:  347a 49aa 4b75 0d05 5c3c e1f6 9b92 6e00  4zI.Ku..\<....n.
 +
0x0080:  00aa 55                                  ..U
 +
18:36:42.213341 IP 192.168.1.240.49153 > ec2-3-121-210-75.eu-central-1.compute.amazonaws.com.8886: Flags [.], ack 277, win 1816, length 0
 +
0x0000:  4500 0028 0616 0000 ff06 1d5d c0a8 01f0  E..(.......]....
 +
0x0010:  0379 d24b c001 22b6 0000 75d1 91ce 810f  .y.K.."...u.....
 +
0x0020:  5010 0718 a4f8 0000                      P.......
 +
18:36:42.218281 IP 192.168.1.240.6668 > 192.168.1.178.41290: Flags [P.], seq 357:385, ack 167, win 2302, length 28
 +
0x0000:  4500 0044 0617 0000 ff06 30aa c0a8 01f0  E..D......0.....
 +
0x0010:  c0a8 01b2 1a0c a14a 0001 17d0 63d9 ecc7  .......J....c...
 +
0x0020:  5018 08fe 01dd 0000 0000 55aa 0000 0053  P.........U....S
 +
0x0030:  0000 000d 0000 000c 0000 0000 59fd a1b0  ............Y...
 +
0x0040:  0000 aa55                                ...U
 +
18:36:42.218361 IP 192.168.1.240.6668 > 192.168.1.178.41290: Flags [P.], seq 357:385, ack 167, win 2302, length 28
 +
0x0000:  4500 0044 0617 0000 ff06 30aa c0a8 01f0  E..D......0.....
 +
0x0010:  c0a8 01b2 1a0c a14a 0001 17d0 63d9 ecc7  .......J....c...
 +
0x0020:  5018 08fe 01dd 0000 0000 55aa 0000 0053  P.........U....S
 +
0x0030:  0000 000d 0000 000c 0000 0000 59fd a1b0  ............Y...
 +
0x0040:  0000 aa55                                ...U
 +
18:36:43.233222 IP 192.168.1.240.49153 > 255.255.255.255.6667: UDP, length 172
 +
0x0000:  4500 00c8 0618 0000 ff11 f274 c0a8 01f0  E..........t....
 +
0x0010:  ffff ffff c001 1a0b 00b4 f1e8 0000 55aa  ..............U.
 +
0x0020:  0000 0000 0000 0013 0000 009c 0000 0000  ................
 +
0x0030:  d097 6667 6f33 69eb 10b5 e9f1 32fd 802a  ..fgo3i.....2..*
 +
0x0040:  748d b61a 5e0b 3034 aff7 9af9 cddc f214  t...^.04........
 +
0x0050:  4ef9 12df 8046 2fa3 7469 859b 52d0 97eb  N....F/.ti..R...
 +
0x0060:  35d6 9379 4bc7 a48f 53c5 29be 7e05 2782  5..yK...S.).~.'.
 +
0x0070:  7256 f992 ef0b b3c9 946f 6ca8 e2e1 4853  rV.......ol...HS
 +
0x0080:  2e0d bc9a 92c3 3172 86eb f238 be57 9786  ......1r...8.W..
 +
0x0090:  a9e3 b2e7 b4bb 197b 7ef4 b0f2 267e 06c8  .......{~...&~..
 +
0x00a0:  5594 f0a3 1645 4ac1 6035 27f9 845c 201b  U....EJ.`5'..\..
 +
0x00b0:  7a23 e3b2 249f 5adf 48a7 14f8 51aa f439  z#..$.Z.H...Q..9
 +
0x00c0:  e9a5 9add 0000 aa55                      .......U
 +
18:36:43.233282 IP 192.168.1.240.49153 > 255.255.255.255.6667: UDP, length 172
 +
0x0000:  4500 00c8 0618 0000 ff11 f274 c0a8 01f0  E..........t....
 +
0x0010:  ffff ffff c001 1a0b 00b4 f1e8 0000 55aa  ..............U.
 +
0x0020:  0000 0000 0000 0013 0000 009c 0000 0000  ................
 +
0x0030:  d097 6667 6f33 69eb 10b5 e9f1 32fd 802a  ..fgo3i.....2..*
 +
0x0040:  748d b61a 5e0b 3034 aff7 9af9 cddc f214  t...^.04........
 +
0x0050:  4ef9 12df 8046 2fa3 7469 859b 52d0 97eb  N....F/.ti..R...
 +
0x0060:  35d6 9379 4bc7 a48f 53c5 29be 7e05 2782  5..yK...S.).~.'.
 +
0x0070:  7256 f992 ef0b b3c9 946f 6ca8 e2e1 4853  rV.......ol...HS
 +
0x0080:  2e0d bc9a 92c3 3172 86eb f238 be57 9786  ......1r...8.W..
 +
0x0090:  a9e3 b2e7 b4bb 197b 7ef4 b0f2 267e 06c8  .......{~...&~..
 +
0x00a0:  5594 f0a3 1645 4ac1 6035 27f9 845c 201b  U....EJ.`5'..\..
 +
0x00b0:  7a23 e3b2 249f 5adf 48a7 14f8 51aa f439  z#..$.Z.H...Q..9
 +
0x00c0:  e9a5 9add 0000 aa55                      .......U
 +
</pre>

Revision as of 20:37, 3 November 2019

Intro

This page is about a WiFi enabled LED lamp from the Action store.

https://www.action.com/nl-nl/p/lsc-smart-connect-slimme-multicolor-ledlamp-3/

Hardware info

The lamp communicates over 2.4 GHz WiFi.

It has two setup modes, triggered by switching it off-and-on three times quickly in a row

  • fast blink mode: about 1 blink per second
  • slow blink mode: about 1 blink per 3 seconds

MAC address: 68:57:2d:1a:6a:ea

It received ip address 192.168.1.240 through DHCP from an OpenWRT router.

Protocol

broadcast message

I sniffed to protocol using TCP dump.

Changing the state of the lamp by the app causes a message to be sent to (TCP): ec2-3-121-210-75.eu-central-1.compute.amazonaws.com.8886

The local protocol appears to use UDP. There is an UDP broadcast message sent by the lamp of 172 bytes.

Capture

Turn ON the lamp: (captured with tcpdump -i wlan0 src 192.168.1.240 -X)

18:36:41.270980 IP 192.168.1.240.6668 > 192.168.1.178.41290: Flags [.], ack 167, win 2302, length 0
	0x0000:  4500 0028 0613 0000 ff06 30ca c0a8 01f0  E..(......0.....
	0x0010:  c0a8 01b2 1a0c a14a 0001 1775 63d9 ecc7  .......J...uc...
	0x0020:  5010 08fe fe75 0000                      P....u..
18:36:41.271040 IP 192.168.1.240.6668 > 192.168.1.178.41290: Flags [.], ack 167, win 2302, length 0
	0x0000:  4500 0028 0613 0000 ff06 30ca c0a8 01f0  E..(......0.....
	0x0010:  c0a8 01b2 1a0c a14a 0001 1775 63d9 ecc7  .......J...uc...
	0x0020:  5010 08fe fe75 0000                      P....u..
18:36:41.868260 IP 192.168.1.240.49153 > ec2-3-121-210-75.eu-central-1.compute.amazonaws.com.8886: Flags [P.], seq 431:612, ack 208, win 1885, length 181
	0x0000:  4500 00dd 0614 0000 ff06 1caa c0a8 01f0  E...............
	0x0010:  0379 d24b c001 22b6 0000 751c 91ce 80ca  .y.K.."...u.....
	0x0020:  5018 075d 3ec9 0000 1703 0300 b042 416f  P..]>........BAo
	0x0030:  6862 6d64 3661 4739 3149 4652 319f bc08  hbmd6aG91IFR1...
	0x0040:  51da e246 20e7 5510 90ca f987 d943 c04c  Q..F..U......C.L
	0x0050:  49ae ae03 9e33 edd8 3d5c 8481 c861 c099  I....3..=\...a..
	0x0060:  30d8 e9f1 9488 c3f8 b03e 5ed5 e34e 48d0  0........>^..NH.
	0x0070:  170f 5931 1667 a5c7 44a8 dbe0 bec1 5712  ..Y1.g..D.....W.
	0x0080:  e0e1 21bc 39fc a4e4 6393 439a 4b9a c25e  ..!.9...c.C.K..^
	0x0090:  cfe0 15a9 26fe 71f3 28df fc51 094e e687  ....&.q.(..Q.N..
	0x00a0:  2d52 c46d c6cf 808e a387 b1e6 e45e 5cb7  -R.m.........^\.
	0x00b0:  f6a0 ed58 f2ee 749e 6082 0c9e f2d1 5c8a  ...X..t.`.....\.
	0x00c0:  2981 2095 62f4 eedf 513a 3a56 4fa3 71ac  )...b...Q::VO.q.
	0x00d0:  4e7e 9009 39c7 b4c8 1d4e 65ee b9         N~..9....Ne..
18:36:41.870000 IP 192.168.1.240.6668 > 192.168.1.178.41290: Flags [P.], seq 266:357, ack 167, win 2302, length 91
	0x0000:  4500 0083 0615 0000 ff06 306d c0a8 01f0  E.........0m....
	0x0010:  c0a8 01b2 1a0c a14a 0001 1775 63d9 ecc7  .......J...uc...
	0x0020:  5018 08fe 42b7 0000 0000 55aa 0000 0000  P...B.....U.....
	0x0030:  0000 0008 0000 004b 0000 0000 332e 3300  .......K....3.3.
	0x0040:  0000 0000 0000 6300 0000 0132 0d91 0fb0  ......c....2....
	0x0050:  41e1 240d c133 b03e c6da 47cc d07d e609  A.$..3.>..G..}..
	0x0060:  3e99 2b80 0f93 caf3 0690 ac4f 0c58 6945  >.+........O.XiE
	0x0070:  347a 49aa 4b75 0d05 5c3c e1f6 9b92 6e00  4zI.Ku..\<....n.
	0x0080:  00aa 55                                  ..U
18:36:41.870080 IP 192.168.1.240.6668 > 192.168.1.178.41290: Flags [P.], seq 266:357, ack 167, win 2302, length 91
	0x0000:  4500 0083 0615 0000 ff06 306d c0a8 01f0  E.........0m....
	0x0010:  c0a8 01b2 1a0c a14a 0001 1775 63d9 ecc7  .......J...uc...
	0x0020:  5018 08fe 42b7 0000 0000 55aa 0000 0000  P...B.....U.....
	0x0030:  0000 0008 0000 004b 0000 0000 332e 3300  .......K....3.3.
	0x0040:  0000 0000 0000 6300 0000 0132 0d91 0fb0  ......c....2....
	0x0050:  41e1 240d c133 b03e c6da 47cc d07d e609  A.$..3.>..G..}..
	0x0060:  3e99 2b80 0f93 caf3 0690 ac4f 0c58 6945  >.+........O.XiE
	0x0070:  347a 49aa 4b75 0d05 5c3c e1f6 9b92 6e00  4zI.Ku..\<....n.
	0x0080:  00aa 55                                  ..U
18:36:42.213341 IP 192.168.1.240.49153 > ec2-3-121-210-75.eu-central-1.compute.amazonaws.com.8886: Flags [.], ack 277, win 1816, length 0
	0x0000:  4500 0028 0616 0000 ff06 1d5d c0a8 01f0  E..(.......]....
	0x0010:  0379 d24b c001 22b6 0000 75d1 91ce 810f  .y.K.."...u.....
	0x0020:  5010 0718 a4f8 0000                      P.......
18:36:42.218281 IP 192.168.1.240.6668 > 192.168.1.178.41290: Flags [P.], seq 357:385, ack 167, win 2302, length 28
	0x0000:  4500 0044 0617 0000 ff06 30aa c0a8 01f0  E..D......0.....
	0x0010:  c0a8 01b2 1a0c a14a 0001 17d0 63d9 ecc7  .......J....c...
	0x0020:  5018 08fe 01dd 0000 0000 55aa 0000 0053  P.........U....S
	0x0030:  0000 000d 0000 000c 0000 0000 59fd a1b0  ............Y...
	0x0040:  0000 aa55                                ...U
18:36:42.218361 IP 192.168.1.240.6668 > 192.168.1.178.41290: Flags [P.], seq 357:385, ack 167, win 2302, length 28
	0x0000:  4500 0044 0617 0000 ff06 30aa c0a8 01f0  E..D......0.....
	0x0010:  c0a8 01b2 1a0c a14a 0001 17d0 63d9 ecc7  .......J....c...
	0x0020:  5018 08fe 01dd 0000 0000 55aa 0000 0053  P.........U....S
	0x0030:  0000 000d 0000 000c 0000 0000 59fd a1b0  ............Y...
	0x0040:  0000 aa55                                ...U
18:36:43.233222 IP 192.168.1.240.49153 > 255.255.255.255.6667: UDP, length 172
	0x0000:  4500 00c8 0618 0000 ff11 f274 c0a8 01f0  E..........t....
	0x0010:  ffff ffff c001 1a0b 00b4 f1e8 0000 55aa  ..............U.
	0x0020:  0000 0000 0000 0013 0000 009c 0000 0000  ................
	0x0030:  d097 6667 6f33 69eb 10b5 e9f1 32fd 802a  ..fgo3i.....2..*
	0x0040:  748d b61a 5e0b 3034 aff7 9af9 cddc f214  t...^.04........
	0x0050:  4ef9 12df 8046 2fa3 7469 859b 52d0 97eb  N....F/.ti..R...
	0x0060:  35d6 9379 4bc7 a48f 53c5 29be 7e05 2782  5..yK...S.).~.'.
	0x0070:  7256 f992 ef0b b3c9 946f 6ca8 e2e1 4853  rV.......ol...HS
	0x0080:  2e0d bc9a 92c3 3172 86eb f238 be57 9786  ......1r...8.W..
	0x0090:  a9e3 b2e7 b4bb 197b 7ef4 b0f2 267e 06c8  .......{~...&~..
	0x00a0:  5594 f0a3 1645 4ac1 6035 27f9 845c 201b  U....EJ.`5'..\..
	0x00b0:  7a23 e3b2 249f 5adf 48a7 14f8 51aa f439  z#..$.Z.H...Q..9
	0x00c0:  e9a5 9add 0000 aa55                      .......U
18:36:43.233282 IP 192.168.1.240.49153 > 255.255.255.255.6667: UDP, length 172
	0x0000:  4500 00c8 0618 0000 ff11 f274 c0a8 01f0  E..........t....
	0x0010:  ffff ffff c001 1a0b 00b4 f1e8 0000 55aa  ..............U.
	0x0020:  0000 0000 0000 0013 0000 009c 0000 0000  ................
	0x0030:  d097 6667 6f33 69eb 10b5 e9f1 32fd 802a  ..fgo3i.....2..*
	0x0040:  748d b61a 5e0b 3034 aff7 9af9 cddc f214  t...^.04........
	0x0050:  4ef9 12df 8046 2fa3 7469 859b 52d0 97eb  N....F/.ti..R...
	0x0060:  35d6 9379 4bc7 a48f 53c5 29be 7e05 2782  5..yK...S.).~.'.
	0x0070:  7256 f992 ef0b b3c9 946f 6ca8 e2e1 4853  rV.......ol...HS
	0x0080:  2e0d bc9a 92c3 3172 86eb f238 be57 9786  ......1r...8.W..
	0x0090:  a9e3 b2e7 b4bb 197b 7ef4 b0f2 267e 06c8  .......{~...&~..
	0x00a0:  5594 f0a3 1645 4ac1 6035 27f9 845c 201b  U....EJ.`5'..\..
	0x00b0:  7a23 e3b2 249f 5adf 48a7 14f8 51aa f439  z#..$.Z.H...Q..9
	0x00c0:  e9a5 9add 0000 aa55                      .......U