Although I've only been playing a short time, I've yet to see the flak cannons on my ships activate. I know they have an incredibly short range, but there are times I've had a corvette hovering right above me (and killing my ship in 5 seconds, but that peeve is another matter) and been practically nose to nose with another ship and I haven't seen the flak cannons fire at all. Am I missing something here?
You have fire them yourself; they're secondary weapons. Switch from your primary to use them.
You have to press Q to switch weapons to the flak cannons and fire them yourselves. If you're looking for an automated proximity defense system, look into autocannon modules.
D pad left and right.
press right on the d-pad to swap to your secondary weapons. flaks have a max range of 800 metres