I think that building devices is a bit like wrestling a bear (not that I've ever actually done any bear wresting). It's an ongoing struggle and then, just when you think you might be winning (always a dangerous thing to do) the bear pulls out a killer move and knocks you flat on the floor.
I've just suffered from this. Nasty bear.
I've been building HullPixelbot devices for c4di and AzureCraft and connecting them to my home wifi for testing. It's been going well (a dangerous sign). I'm controlling them quite successfully and thinking that I might actually end up with a working system. And then today everything slowed right down. Commands that previously took no time at all to deploy suddenly took ages, which is a problem because all the robots need to move at the same time.
Of course I thought my software was broken and spent a couple of frantic hours trying to speed it up. But the performance was still rubbish.
Then, at 3:00 am this morning the answer came to me. At the same time as deploying the final version of the code I'd switched to my portable WiFi router, rather than the home network. All the problems started then. Turns out that not all WiFi was created equal. Some is much slower than others.
At 3:30 am I was resigned to going off and buying a new router in the hope it might be faster. At 4:00 am I realised that I actually had a router I'd bought a while back for another project. Only problem is that it was running the Chinese version of the router firmware.
So at 8:00 am this morning I was trying decipher Chinese menu screens and load a new version of the firmware into the router. I've finally managed to get it working and performance is back to reasonable again. One up on the bear.
However, the most important thing about the "bear wrestling model of hardware development" is that you mustn't start to think that the bear hates you. He doesn't. He's just there to wrestle, because that is what bears like to do. You need to work on the basis that at some point the bear will step back, bow gracefully and say "I'm going to let you win this one".