You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know the actual reason, but in my case, both broadlink.discover and broadlink.setup fail, because apparently their network broadcast doesn't reach its destination. However, what does work is to use the target IP directly or at least the subnet broadcast address:
Does not work im my case: devices = broadlink.discover(timeout=5)
Does work in my case: devices = broadlink.discover(timeout=5, discover_ip_address='192.168.10.255')
While this is mentioned in the README, the consequences are not.
If the network broadcast does not work, then broadlink.setup won't work either! This function sends the prepared packet like this: sock.sendto(payload, ("255.255.255.255", 80))
It took me hours to find out, that I can simply solve the problem by providing the actual IP address of the device: sock.sendto(payload, ("192.168.10.1", 80))
This does work!
Therefore, my suggestion would be to modify the setup function like this:
so it can be used like this: setup_target("MySsid", "MyPassphrase", 3, "192.168.10.1")
Also, a minor side note: The README says "Manually connect to the WiFi SSID named BroadlinkProv.", but the SSID is actually "BroadLink_WiFi_Device" (at least for the Broadlink RM4 Pro).
The text was updated successfully, but these errors were encountered:
I don't know the actual reason, but in my case, both
broadlink.discover
andbroadlink.setup
fail, because apparently their network broadcast doesn't reach its destination. However, what does work is to use the target IP directly or at least the subnet broadcast address:Does not work im my case:
devices = broadlink.discover(timeout=5)
Does work in my case:
devices = broadlink.discover(timeout=5, discover_ip_address='192.168.10.255')
While this is mentioned in the README, the consequences are not.
If the network broadcast does not work, then
broadlink.setup
won't work either! This function sends the prepared packet like this:sock.sendto(payload, ("255.255.255.255", 80))
It took me hours to find out, that I can simply solve the problem by providing the actual IP address of the device:
sock.sendto(payload, ("192.168.10.1", 80))
This does work!
Therefore, my suggestion would be to modify the setup function like this:
so it can be used like this:
setup_target("MySsid", "MyPassphrase", 3, "192.168.10.1")
Also, a minor side note: The README says
"Manually connect to the WiFi SSID named BroadlinkProv."
, but the SSID is actually "BroadLink_WiFi_Device
" (at least for the Broadlink RM4 Pro).The text was updated successfully, but these errors were encountered: