Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bengtmartensson/abeacon
An AMX-compatible beacon for the Arduino
https://github.com/bengtmartensson/abeacon
amxbeacon arduino beacon ethernet udp
Last synced: about 2 months ago
JSON representation
An AMX-compatible beacon for the Arduino
- Host: GitHub
- URL: https://github.com/bengtmartensson/abeacon
- Owner: bengtmartensson
- License: gpl-2.0
- Created: 2015-07-26T16:37:20.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-12-20T09:55:52.000Z (about 5 years ago)
- Last Synced: 2024-10-22T11:23:31.991Z (3 months ago)
- Topics: amxbeacon, arduino, beacon, ethernet, udp
- Language: C++
- Size: 218 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ABeacon
This project consists of a class implementing an AMX-compatible beacon
on an Arduino with Ethernet card using W5100, W5200, or W5500 chips.
If using an Ethernet shield using W5500 or W5200 chip,
be sure to use version 2.0.0 (or later) of the Ethernet
library, since it supports both chips, auto-detecting during runtime.The AMX beacon protocol is described e.g. [here](http://www.globalcache.com/files/docs/API-GC-100.pdf).
This is a singleton class, with no public constructor. Instead, the
static "factory" function setup() should be called.
The user then has to call the send() function on
a regular basis, e.g. every 10 to 60 seconds.
Alternatively, checkSend() can be called arbitrarily often,
without flooding the LAN. See example/Beacon.ino for an example.The class requires that the Ethernet has been setup before calling newInstance.
It then instantiates its own private EthernetUDP instance.The beacon should transmit an UDP broadcast message to IP-address
239.255.250.250, port 9131. However, the Arduino library does not
consider this IP address to be a broadcast address. Therefore, this
implementation instead sends to broadcast address 255.255.255.255.## API documentation
[Up-to-date API, generated by Doxygen](http://bengtmartensson.github.io/ABeacon).
## Porting to other libraries/platforms
I am interesting in (clean) ports to other libraries and platforms.
For this, the calls* Udp.begin(uint16_t portNr) -- really necessary?
* Udp.beginPacket(const IPAddress broadcastIp, uint16_t broadcastPort)
* Udp.write(const char* payload)
* Udp.endPacket()are used. Pull requests are welcome!