WifiLamp

From RevSpace
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
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)

20:40:56.712025 IP 192.168.1.178.41530 > 192.168.1.240.6668: Flags [P.], seq 137:208, ack 173, win 65535, length 71
	0x0000:  4500 006f 9522 4000 4006 2074 c0a8 01b2  E..o."@.@..t....
	0x0010:  c0a8 01f0 a23a 1a0c fa68 52cc 0000 948d  .....:...hR.....
	0x0020:  5018 ffff e352 0000 0000 55aa 0000 0002  P....R....U.....
	0x0030:  0000 000d 0000 0037 332e 3300 0000 0000  .......73.3.....
	0x0040:  0000 0700 0920 d832 0d91 0fb0 41e1 240d  .......2....A.$.
	0x0050:  c133 b03e c6da 47a5 9b4f bcd1 e4b9 8a03  .3.>..G..O......
	0x0060:  dee7 2c3f cc02 5a2b 04c4 af00 00aa 55    ..,?..Z+......U
20:40:56.712085 IP 192.168.1.178.41530 > 192.168.1.240.6668: Flags [P.], seq 137:208, ack 173, win 65535, length 71
	0x0000:  4500 006f 9522 4000 4006 2074 c0a8 01b2  E..o."@.@..t....
	0x0010:  c0a8 01f0 a23a 1a0c fa68 52cc 0000 948d  .....:...hR.....
	0x0020:  5018 ffff e352 0000 0000 55aa 0000 0002  P....R....U.....
	0x0030:  0000 000d 0000 0037 332e 3300 0000 0000  .......73.3.....
	0x0040:  0000 0700 0920 d832 0d91 0fb0 41e1 240d  .......2....A.$.
	0x0050:  c133 b03e c6da 47a5 9b4f bcd1 e4b9 8a03  .3.>..G..O......
	0x0060:  dee7 2c3f cc02 5a2b 04c4 af00 00aa 55    ..,?..Z+......U
20:40:56.720005 IP 192.168.1.240.49153 > ec2-18-185-218-106.eu-central-1.compute.amazonaws.com.8886: Flags [P.], seq 138:319, ack 139, win 2368, length 181
	0x0000:  4500 00dd 03d4 0000 ff06 078b c0a8 01f0  E...............
	0x0010:  12b9 da6a c001 22b6 0000 3e44 4a38 df8e  ...j.."...>DJ8..
	0x0020:  5018 0940 d7e8 0000 1703 0300 b042 416f  P..@.........BAo
	0x0030:  6862 6d64 3661 4739 3149 4652 31f8 e4a1  hbmd6aG91IFR1...
	0x0040:  84ce d52e bdc1 a36d 84e3 43e1 10e9 0b16  .......m..C.....
	0x0050:  2702 bc93 e1f1 aad3 fa06 3ec4 fa3d b2fa  '.........>..=..
	0x0060:  8238 7687 6f05 8abf 140b 4da3 5cee c8b8  .8v.o.....M.\...
	0x0070:  aa4f cd1f c989 1ca9 1d0c 795f c06a d484  .O........y_.j..
	0x0080:  2a6f 924b 2cf8 c2a1 7585 a85b a136 5cc1  *o.K,...u..[.6\.
	0x0090:  80ac 1404 4850 2881 4a8a b76b 411a ae59  ....HP(.J..kA..Y
	0x00a0:  1b7a bbb8 aba7 4ff1 3783 7bc1 de48 72cd  .z....O.7.{..Hr.
	0x00b0:  9a98 e1b9 457c 81c1 9254 d377 27eb ed3c  ....E|...T.w'..<
	0x00c0:  9fe4 263e 41ca fc6e 1526 ef33 e7f8 88be  ..&>A..n.&.3....
	0x00d0:  e92b 6456 f8a2 c599 797b 7a8e 1f         .+dV....y{z..
20:40:56.720845 IP 192.168.1.240.6668 > 192.168.1.178.41530: Flags [P.], seq 173:264, ack 208, win 2713, length 91
	0x0000:  4500 0083 03d5 0000 ff06 32ad c0a8 01f0  E.........2.....
	0x0010:  c0a8 01b2 1a0c a23a 0000 948d fa68 5313  .......:.....hS.
	0x0020:  5018 0a99 d5e4 0000 0000 55aa 0000 0000  P.........U.....
	0x0030:  0000 0008 0000 004b 0000 0000 332e 3300  .......K....3.3.
	0x0040:  0000 0000 0000 1c00 0000 0132 0d91 0fb0  ...........2....
	0x0050:  41e1 240d c133 b03e c6da 47be e5c9 a66a  A.$..3.>..G....j
	0x0060:  a6b6 5174 6eee e672 bac9 d94f 0c58 6945  ..Qtn..r...O.XiE
	0x0070:  347a 49aa 4b75 0d05 5c3c e11e 07fb 7a00  4zI.Ku..\<....z.
	0x0080:  00aa 55                                  ..U
20:40:56.720905 IP 192.168.1.240.6668 > 192.168.1.178.41530: Flags [P.], seq 173:264, ack 208, win 2713, length 91
	0x0000:  4500 0083 03d5 0000 ff06 32ad c0a8 01f0  E.........2.....
	0x0010:  c0a8 01b2 1a0c a23a 0000 948d fa68 5313  .......:.....hS.
	0x0020:  5018 0a99 d5e4 0000 0000 55aa 0000 0000  P.........U.....
	0x0030:  0000 0008 0000 004b 0000 0000 332e 3300  .......K....3.3.
	0x0040:  0000 0000 0000 1c00 0000 0132 0d91 0fb0  ...........2....
	0x0050:  41e1 240d c133 b03e c6da 47be e5c9 a66a  A.$..3.>..G....j
	0x0060:  a6b6 5174 6eee e672 bac9 d94f 0c58 6945  ..Qtn..r...O.XiE
	0x0070:  347a 49aa 4b75 0d05 5c3c e11e 07fb 7a00  4zI.Ku..\<....z.
	0x0080:  00aa 55                                  ..U
20:40:56.740665 IP ec2-18-185-218-106.eu-central-1.compute.amazonaws.com.8886 > 192.168.1.240.49153: Flags [P.], seq 139:208, ack 319, win 33768, length 69
	0x0000:  4500 006d 0d3c 4000 ed06 d092 12b9 da6a  E..m.<@........j
	0x0010:  c0a8 01f0 22b6 c001 4a38 df8e 0000 3ef9  ...."...J8....>.
	0x0020:  5018 83e8 27fd 0000 1703 0300 400e 80aa  P...'.......@...
	0x0030:  276e 5c0b 606e c30e 255a 5290 f2e9 2cf9  'n\.`n..%ZR...,.
	0x0040:  77b4 d09c 582d fe23 8bb9 cfec 78fc 906c  w...X-.#....x..l
	0x0050:  615b cc88 6e71 dd85 af36 0f14 e973 3649  a[..nq...6...s6I
	0x0060:  7c5e 19a3 f7ba 1607 369f 25f5 93         |^......6.%..
20:40:56.823365 IP 192.168.1.178.41530 > 192.168.1.240.6668: Flags [.], ack 264, win 65535, length 0
	0x0000:  4500 0028 9523 4000 4006 20ba c0a8 01b2  E..(.#@.@.......
	0x0010:  c0a8 01f0 a23a 1a0c fa68 5313 0000 94e8  .....:...hS.....
	0x0020:  5010 ffff 8c36 0000                      P....6..
20:40:56.823505 IP 192.168.1.178.41530 > 192.168.1.240.6668: Flags [.], ack 264, win 65535, length 0
	0x0000:  4500 0028 9523 4000 4006 20ba c0a8 01b2  E..(.#@.@.......
	0x0010:  c0a8 01f0 a23a 1a0c fa68 5313 0000 94e8  .....:...hS.....
	0x0020:  5010 ffff 8c36 0000                      P....6..
20:40:56.825725 IP 192.168.1.240.6668 > 192.168.1.178.41530: Flags [P.], seq 264:292, ack 208, win 2713, length 28
	0x0000:  4500 0044 03d6 0000 ff06 32eb c0a8 01f0  E..D......2.....
	0x0010:  c0a8 01b2 1a0c a23a 0000 94e8 fa68 5313  .......:.....hS.
	0x0020:  5018 0a99 a438 0000 0000 55aa 0000 0002  P....8....U.....
	0x0030:  0000 000d 0000 000c 0000 0000 8de1 4f44  ..............OD
	0x0040:  0000 aa55                                ...U
20:40:56.825785 IP 192.168.1.240.6668 > 192.168.1.178.41530: Flags [P.], seq 264:292, ack 208, win 2713, length 28
	0x0000:  4500 0044 03d6 0000 ff06 32eb c0a8 01f0  E..D......2.....
	0x0010:  c0a8 01b2 1a0c a23a 0000 94e8 fa68 5313  .......:.....hS.
	0x0020:  5018 0a99 a438 0000 0000 55aa 0000 0002  P....8....U.....
	0x0030:  0000 000d 0000 000c 0000 0000 8de1 4f44  ..............OD
	0x0040:  0000 aa55                                ...U
20:40:56.829005 IP 192.168.1.240.49153 > ec2-18-185-218-106.eu-central-1.compute.amazonaws.com.8886: Flags [.], ack 208, win 2299, length 0
	0x0000:  4500 0028 03d7 0000 ff06 083d c0a8 01f0  E..(.......=....
	0x0010:  12b9 da6a c001 22b6 0000 3ef9 4a38 dfd3  ...j.."...>.J8..
	0x0020:  5010 08fb ab60 0000                      P....`..
20:40:56.927465 IP 192.168.1.178.41530 > 192.168.1.240.6668: Flags [.], ack 292, win 65535, length 0
	0x0000:  4500 0028 9524 4000 4006 20b9 c0a8 01b2  E..(.$@.@.......
	0x0010:  c0a8 01f0 a23a 1a0c fa68 5313 0000 9504  .....:...hS.....
	0x0020:  5010 ffff 8c1a 0000                      P.......
20:40:56.927545 IP 192.168.1.178.41530 > 192.168.1.240.6668: Flags [.], ack 292, win 65535, length 0
	0x0000:  4500 0028 9524 4000 4006 20b9 c0a8 01b2  E..(.$@.@.......
	0x0010:  c0a8 01f0 a23a 1a0c fa68 5313 0000 9504  .....:...hS.....
	0x0020:  5010 ffff 8c1a 0000                      P.......

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