Those look really cool! Nice to see what you're doing with the Spark!
I could use some ideas...
I can now successfully control pixels using the photon. The photons are hooked up over WiFi to my home network. I have a Raspberry Pi controlling the show. It is hooked into the router via ethernet (Router is an AirPort Extreme). I have everything setup for Unicast. (I haven't had much luck with the photon in Multicast mode.)
If I am just controlling one photon, everything works great. But if I try to control multiple devices, I get extreme 'lag' in my display. It seems to be related to the quality of the WiFi connection. One device with a weak connection seems to lag up my whole show.
So I guess my question is, how does UDP data actually work and how do ARP packets come into the equation?
I was always under the impression that UDP packets are sent out, and if they don't arrive, then no one is the wiser. But it seems like there is back and forth communication happening and the router is getting hung up trying to communicate to a device with a weak signal. I have since moved the router on top of the roof, right out front. So I have line of sight to all devices and a RSSI between -60 and -70 on all devices. Still having the same problem.
I'm starting to get the feeling that this is ARP related, but I just barely learned that ARP is a thing 2 days ago though so who knows.
My next thought is to try a different router...
Any ideas are welcome!
James (MrRocketman)
The ARP can be related to the UNICAST and the pi. There were some threads on the falcon forum about that. The Pi native stack does not handle a missing device well on unicast because of the arp not being there and has to time out for the packet, and then the next packet , ad nasuem.
If you are testing without the pi in the equation, then investigate how you can modify the stack to not really care about the arp answers.
That's correct about UDP - the application would have to implement error checking on its own, but part of the benefit of UDP is the sort of "send it and forget it" idea since it's quite a bit faster than, say, TCP, as a result.
For your signal issues, what I did for my Photon-powered outdoor weather station was just use an external antenna. I bought a tall one for mine of Amazon (since my Photon sits in a box on the ground), but there's plenty of options there.
I would also check to make sure you have good wireless performance overall. I ran into some crazy latency on my wireless network recently if I used 802.11 b or g. I had to force n before I was able to get acceptable, and predicable, packet latency and throughput, likely because there's quite a few other wireless networks in my area.
Okay so I finally figured out the issue with the lag. It was a combination of issues. Poor wireless signal and QoS.
So I have external antennas on all of my photons. I also needed to add a second little router in AP mode to get a better signal to everything. But the biggest and most important difference was a router that had QoS (Quality of Service) settings. Once I added all of my photons and the Raspberry Pi at the highest priority QoS setting, my issues vanished. My AirPort Extreme didn't have QoS settings so I picked up 2 little $40 NetGear WNR2000v5 down at Walmart and problem solved.
I will be running my entire show off of these Photons this season. I have around 6000 pixels plus 40 strips of dumb RGB lights. If everything goes well I will share everything and maybe make some kits for next year. Really can't beat the price on them. 8-16 output Wi-Fi controller for $25. And it can easily control over 1,000 pixels. Haven't found the practical limit in the number of pixels I can control yet.
James (MrRocketman)
That's really cool stuff! Glad to hear QoS solved it. I didn't think about that one, but I have run into that dumb limitation of the Airport before as well. For as much as that thing costs, it really needs QoS.
Anyways please do keep us posted!
