LIFX Developer Zone

New StateWifiInfo message format?


#1

Hi guys!
I’m wondering if StateWifiInfo message format has changed? I’m seeing LiFX Mini return an oddball value for WiFi signal strength, there is the full message:
[‘0x32’, ‘0x0’, ‘0x0’, ‘0x14’, ‘0x61’, ‘0x64’, ‘0x0’, ‘0x0’, ‘0xd0’, ‘0x73’, ‘0xd5’, ‘0x31’, ‘0x89’, ‘0xc5’, ‘0x0’, ‘0x0’, ‘0x4c’, ‘0x49’, ‘0x46’, ‘0x58’, ‘0x56’, ‘0x32’, ‘0x1’, ‘0x0’, ‘0x88’, ‘0xd’, ‘0x88’, ‘0x8e’, ‘0xea’, ‘0x68’, ‘0x0’, ‘0x0’, ‘0x11’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x12’, ‘0x2d’, ‘0x7’, ‘0x34’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0xcb’, ‘0x11’]

WiFi signal strength is supposed to be 0x34072d12 which translates into 1.258925124147936e-07 ???

Regular bulbs send much more acceptable value like 0x42240000 (which is just 41 in decimal).

Also - LiFX Mini seems to set 2 last bytes that are described as ‘reserved’, do these have a meaning now?

RX and RX bytes make no much sense either - LiFX Mini sends all zeroes, LIFX+ sends 2158016404 all the time…

Does anyone have an updated documentation on StateWifiInfo? Thanks!!


#2

Just want to revive this - I can’t make any sense of the StateWifiInfo message either.

Any comment from LIFX devs?


#3

Hi,

StateWifiInfo isn’t relevant to the LIFX Mini because it only has host firmware. (older products had both host and wifi firmware).


#4

So I should be looking at StateHostInfo instead to get the signal information?

Hmm… tx, rx and signal are all 0 for StateHostInfo, the only field that has any values is the reserved field :frowning:


#5

oops, sorry, my brain thought we were talking about GetHostFirmware and GetWifiFirmware!

GetWifiInfo is indeed the one you want.

So, in that case, the values are different because the newer products use a different unit of measurement.

Signal in the old products is wifi rssi, whereas in the newer products it’s signal to noise ratio. I need to update the documentation sometime to explain this.


#6

I’ve updated the documentation for StateWifiInfo https://lan.developer.lifx.com/v2.0/docs/device-messages#section-statewifiinfo-17

It now contains code that can be used to understand whatever value the Signal propery has.


#7

Ah, thanks for that. The question is, which products are which? :slight_smile: Maybe time to update products.json?

Second question is how to decode the 32-bit float, is it little-endian like the ints?

If I assume it’s little-endian then I’m mostly getting values in the 10^-5 to 10^-7 range I think, big endian tends to negative values.


#8

Only the LCM2 products retrun snr (so things like the second generation Z, the Beam, the current release of A19 and BR30 products).

Everything in the protocol is little endian.