Comments (1)
The WiFly firmware offers no direct support for setting different target IP adresses for induvidual packages/messages. That sucks, but I cannot change it.
Depending on your applciation, there are some workarounds however:
- Broadcasts
If all your receipients are in the same physical network (i.e. all in connected to the same wireless AP), you can send your packages to a broadcast adress. i.e. setting the target adress in the setup to "255.255.255.255" will result in the messages going to everybody in the network. Your IPhone-App will just throw away all the debug messages it is not interested in. You can also use a computer in the network to forward specific broadcasts to an IP outside of the network.
If you think this is a security issue, you should be aware that anybody with a network sniffer will also be able to read messages sent to specific IPs. The WiFly security is a bit dubious anyway. - Setting target IPs between transmissions.
For setting target IPs, the WiFly has to switch to command mode and back, so this will take an awful amount of time...
It can be done using the setHostIP(const char *buf);
method of your WiFly object:
wifly.setHostIP(192.168.0.5); // send messages to iphone. Will take a few seconds.
client.sendInt(analogRead(A0),"/ard/A0Value");
wifly.setHostIP(192.168.0.42); // send messages to datalogger. Will take a few seconds again.
client.sendInt(analogRead(A1),"/ard/A1Value");
- Use multiple WiFlys
You can also attach multiple Wiflys to different serial ports and use them in parallel. You can even connect them to different APs to keep the status data away from the audience devices.
This works great if you have a MEGA with multiple hardware serials. When using multiple software serials, only one can receive data at a time.
Hope that helped!
from ardoscforwiflyhq.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ardoscforwiflyhq.