I built an RC controller for my drone and was wondering how do I add some kind of security so it doesnt get hacked and fly or drive off? I've tried to find some info on this but I'm not sure about what all I would need.I'm only sending joystick and on/off switch data ,so anyone know how or where to start making it safer?
Your first thought should be, is it really a problem with today's spread spectrum RC transmitters. If yes then the first thing to do is make the data look numerically unrecognizable, i.e., scrambled in some simple fashion. However, that's not a complete fix as a hacker can send it equally confusing data and make the craft do something erratic like fly away, crash, or run into another flyer. The receiver needs to know that the data is coming from you. The pipe number may not be enough as a listener will see it repeatedly in the head of the data stream. The next step might be to bury several bytes of ID at different places in the stream but use several distinct values so it also looks scrambled. The receiver would extract these values and if not one of a set known only to you then continue with the previous data. If valid data is not received in some length of time then leave the A & E sticks in the neutral position and reduce the throttle to some value just less than hover so it will land slowly, like the failsafe mode on a drone. Keep in mind that the ID and unscrambling needs to execute quickly, a simple integer or bit manipulation scheme, so the craft can still respond to commands as desired.
This is just one of many approaches. Other posters may have some techniques more reasonable to implement.
You need to tell us what wireless system you are using for controlling your drone.
If you are using an nRF24L01+ system I guess you could include a "password" in each message. If the drone failed to get the password it could shut down. I have no idea whether hackers are sufficiently interested or competent to try to capture your password.
...R