Broadcast

broadcast.data

Abbreviation

br d

Access

get/set

Description

A comma separated list of information fields to be periodically transmitted in a UDP packet or sent to a remote HTTP server. See the Broadcast UDP Packet application note.

Arguments

<csv list> where <csv list> is a comma separated value list constructed from:

List Item Description
bssid wlan interface -> BSSID of the AP
channel Wi-Fi radio channel
gpioX Current state of GPIO X
ip Current IP address
mac wlan MAC address
rssi wlan interface -> RSSI of the AP
ssid wlan interface -> SSID of the AP
time Gecko OS local time
uuid Hardware ID
version Firmware version
remote_terminal_port inbound network port for the remote terminal

Default

mac,bssid,channel,ip,ssid,rssi,remote_terminal_port,time,uuid,version

Properties

Supported Platforms

Get example

> get br d
R000033
mac,bssid,channel,version,gpio0

Set example

> set br d mac,bssid,channel
R000008
Set OK

broadcast.http.host

Abbreviation

br h h

Access

get/set

Description

When specified, periodically issue JSON formatted data to the specified host as an HTTP(S) post request. If null, the HTTP post function is disabled. The post may be to an unencrypted or HTTPS secure webserver. If a non-standard HTTP/HTTPS port is required, the port may be appended to the end of the URL, for example myserver.com:3002 . The URL must be prefixed with https:// for HTTPS secure connections on the default port 443.

Arguments

<http_host>

Default

Null

Properties

Supported Platforms

Get example

> get br h h
myhttpserver.com
Set OK

Set example

> set br h h myhttpserver.com
Set OK

Set example 2

> set br h h https://mysecureserver.com
Set OK

broadcast.interface

Abbreviation

br i

Access

get/set

Description

The default interface used to transmit informational packets.

If set to default , uses the interface specified in network.default_interface

Arguments

<wlan/softap/default>

Default

default

Properties

Supported Platforms

Get example

> get br i
R000006
wlan

Set example

> set br i softap
R000008
Set OK

broadcast.interval

Abbreviation

br t

Access

get/set

Description

The time between transmission of informational packets. Units are in seconds.

To disable both UDP and HTTP broadcast, set the interval to 0.

Arguments

<seconds>

Default

10

Properties

Supported Platforms

Get example

> get br t
R000004
10

Set example

> set br t 20
R000008
Set OK

broadcast.udp.ip

Abbreviation

br u a

Access

get/set

Description

Informational UDP packets are sent to this IP address.

To enable general UDP broadcast, set the IP address to 255.255.255.255 (default), i.e

set broadcast.udp.ip 255.255.255.255

To disable UDP broadcast, set the IP address to 0.0.0.0, i.e

set broadcast.udp.ip 0.0.0.0

Alternatively, set broadcast.interval to 0 to disable both UDP and HTTP broadcast.

Arguments

<IP address>

Default

255.255.255.255

Properties

Supported Platforms

Get example

> get br u a
R000017
255.255.255.255

Set example

> set br u a 192.168.1.255
R000008
Set OK

broadcast.udp.remote_port

Abbreviation

br u p

Access

get/set

Description

Informational UDP packets are sent to this port.

Arguments

<port>

Default

55555

Properties

Get example

> get br u p
R000007
55555

Set example

> set br u p 50007
R000008
Set OK