WifiLamp

From RevSpace
Revision as of 20:38, 3 November 2019 by Bertrik Sikken (talk | contribs)
Jump to navigation Jump to search
Project WifiLamp
Wifilamp.jpg
Investigating my Action WiFi enabled LED lamp
Status Initializing
Contact bertrik
Last Update 2019-11-03

Intro

This page is about a WiFi enabled LED lamp from the Action store, with E27 form factor.

I hoped this would be an ESP8266 based lamp, so it can possibly be flashed with my StofAnanas/stoflama firmware so it can indicate local air quality (PM10).

More info:

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

https://www.cleancss.com/mac-lookup/68-57-2D

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

Protocol

broadcast message

I sniffed the 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

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

Turn off

Captured with root@LEDE:~# tcpdump -i wlan0 dst 192.168.1.240 -X

19:28:37.699451 IP 192.168.1.178.41410 > 192.168.1.240.6668: Flags [P.], seq 1198273966:1198274037, ack 144896, win 65535, length 71
	0x0000:  4500 006f 383b 4000 4006 7d5b c0a8 01b2  E..o8;@.@.}[....
	0x0010:  c0a8 01f0 a1c2 1a0c 476c 35ae 0002 3600  ........Gl5...6.
	0x0020:  5018 ffff 7278 0000 0000 55aa 0000 0005  P...rx....U.....
	0x0030:  0000 000d 0000 0037 332e 3300 0000 0000  .......73.3.....
	0x0040:  0000 0b00 09cb d0a8 5b7e 1c66 c995 c4fa  ........[~.f....
	0x0050:  49ba 3815 3f33 2863 f141 c27e 0295 4406  I.8.?3(c.A.~..D.
	0x0060:  c8d5 b6ad 8b11 0046 d5dc 8700 00aa 55    .......F......U
19:28:37.699511 IP 192.168.1.178.41410 > 192.168.1.240.6668: Flags [P.], seq 0:71, ack 1, win 65535, length 71
	0x0000:  4500 006f 383b 4000 4006 7d5b c0a8 01b2  E..o8;@.@.}[....
	0x0010:  c0a8 01f0 a1c2 1a0c 476c 35ae 0002 3600  ........Gl5...6.
	0x0020:  5018 ffff 7278 0000 0000 55aa 0000 0005  P...rx....U.....
	0x0030:  0000 000d 0000 0037 332e 3300 0000 0000  .......73.3.....
	0x0040:  0000 0b00 09cb d0a8 5b7e 1c66 c995 c4fa  ........[~.f....
	0x0050:  49ba 3815 3f33 2863 f141 c27e 0295 4406  I.8.?3(c.A.~..D.
	0x0060:  c8d5 b6ad 8b11 0046 d5dc 8700 00aa 55    .......F......U
19:28:37.715331 IP 192.168.1.178.41410 > 192.168.1.240.6668: Flags [.], ack 92, win 65535, length 0
	0x0000:  4500 0028 383c 4000 4006 7da1 c0a8 01b2  E..(8<@.@.}.....
	0x0010:  c0a8 01f0 a1c2 1a0c 476c 35f5 0002 365b  ........Gl5...6[
	0x0020:  5010 ffff bb54 0000                      P....T..
19:28:37.715391 IP 192.168.1.178.41410 > 192.168.1.240.6668: Flags [.], ack 92, win 65535, length 0
	0x0000:  4500 0028 383c 4000 4006 7da1 c0a8 01b2  E..(8<@.@.}.....
	0x0010:  c0a8 01f0 a1c2 1a0c 476c 35f5 0002 365b  ........Gl5...6[
	0x0020:  5010 ffff bb54 0000                      P....T..
19:28:37.720451 IP 192.168.1.178.41410 > 192.168.1.240.6668: Flags [.], ack 120, win 65535, length 0
	0x0000:  4500 0028 383d 4000 4006 7da0 c0a8 01b2  E..(8=@.@.}.....
	0x0010:  c0a8 01f0 a1c2 1a0c 476c 35f5 0002 3677  ........Gl5...6w
	0x0020:  5010 ffff bb38 0000                      P....8..
19:28:37.720511 IP 192.168.1.178.41410 > 192.168.1.240.6668: Flags [.], ack 120, win 65535, length 0
	0x0000:  4500 0028 383d 4000 4006 7da0 c0a8 01b2  E..(8=@.@.}.....
	0x0010:  c0a8 01f0 a1c2 1a0c 476c 35f5 0002 3677  ........Gl5...6w
	0x0020:  5010 ffff bb38 0000                      P....8..
19:28:37.727851 IP ec2-3-121-210-75.eu-central-1.compute.amazonaws.com.8886 > 192.168.1.240.49153: Flags [P.], seq 2446234639:2446234708, ack 35378, win 65535, length 69
	0x0000:  4500 006d 3ac2 4000 ed06 ba6b 0379 d24b  E..m:.@....k.y.K
	0x0010:  c0a8 01f0 22b6 c001 91ce 940f 0000 8a32  ...."..........2
	0x0020:  5018 ffff 0755 0000 1703 0300 40c9 f2fa  P....U......@...
	0x0030:  184f 47fe 3f04 4530 a14b ff5a c4ed 2364  .OG.?.E0.K.Z..#d
	0x0040:  b76a 065e e367 8569 d83b 7584 8b4b 05c7  .j.^.g.i.;u..K..
	0x0050:  b699 c776 aba7 b63b 8491 db21 ece0 619b  ...v...;...!..a.
	0x0060:  761e f4bc af1f 82f4 b550 95fa 46         v........P..F