ODIN-W2 series - Getting Started
UBX-15017452 - R02
Advance Information
Peers
Page 8 of 27
2
Peers
A connection consists of a sender and a receiver of data. It can also consist of a sender and several receivers in
the case of a wireless multidrop/broadcast data. In both cases, every sender and receiver in a setup is referred to
as a peer. Thus, a peer is capable of either receiving and/or sending data.
There are two kinds of peer classes in the serial port adapter:
•
Local peer
•
Remote peer
The local peer is (currently) synonymous with the UART. In contrast to the local peer, the remote peer is another
device or broadcast range on the network. Several remote peers can be defined if a multi-drop scenario is
needed.
A remote peer is addressed using a Uniform Resource Locator, URL. These locators are strings representing
nodes on internet or on a local net. This is the same addressing technology used in for example a web browser.
For more information about URLs, rea<scheme>:<scheme-specific-part>
Where <scheme> is the scheme or protocol used when communicating and <scheme-specific-part> is normally
the address and port number of the remote node.
For example, a web server on the internet can have the following address:
This tells the browser to use the HTTP protocol and connect to the node at address•
tcp: TCP connection
•
udp: UDP connection, broadcast capabilities
•
spp: Bluetooth Serial Port Profile
•
dun: Bluetooth Dial Up Networking
•
sps: Bluetooth Low Energy u-blox Serial Port Service
Syntax:
•
tcp/udp
•
<scheme>://ipaddress<:portnumber>
•
spp/dun/sps
•
<scheme>://bluetooth_address/
Remarks:
•
IP address can be either a numeric IP address or a host and domain name that can be resolved using the
configured DNS servers.
Examples
•
tcp://10.0.0.9:5003
•
tcp://echo.u-blox.com:7
•
udp://192.168.0.42:6809
•
spp://0012f3000001
A peer can be setup using either the default remote peer command (AT+UDDRP) or dynamically created using
the connect peer command (AT+UDCP). A connection is closed using AT+UDCC.
To enable incoming connections, servers must be enabled using the command AT+UDSC. One server of each
type can be created, but it can allow for multiple incoming connections. By default, the SPP server is enabled on
Server id 0, and in Bluetooth Low Energy, enable the SPS service using the AT+UDSC command.