In Shadowrun 5, it's possible for a decker to hack a gun, but I don't quite get how that works.
Do you need a mark on the gun? The example on page 228 suggests you don't. But can you get a mark on the gun? And can you use that to do other things than bricking, like ejecting a clip or shooting it? (Sounds more fun than simply bricking; would be a shame if it's harder than bricking.)
Also, how does the Logic or Willpower of the goon holding the gun matter? If he's a random ganger, surely he's not jacked into his gun in any way, is he? For that matter, does it matter if the gun has a smartgun system, and whether that's connected to goggles or cybereyes?
And what's the Firewall of a device that has no Firewall (like most devices)?
And what about a PAN? Can you still dataspike the gun if it's slaved to a PAN? Do you first need a mark on the PAN? Can the goon's PAN in turn be slaved to his decker buddy's cyberdeck?
What is the exact order in which to do attack these various devices and what's the effect on various rolls?
There's quite a lot to take in and it's hard to keep everything straight. I've found some cheat sheets, but they don't seem to explain the complex stuff.