Not sure if/how it will work with a camera- but here is a trick used by Horse Packers in the Lochsa country and Frank Church Wilderness. Take a balloon ( like a party balloon) and put a tablespoon of ground cayenne pepper in it and then blow it up/tie it off. Coat the balloon with bacon grease or peanut butter and hang it by the camera. The bear will bite or paw the balloon and get a snout full of cayenne pepper when it pops. This trick works very well with ice coolers and other things you don't want a bear getting into- they always seem to go for the balloon first, and learn real quick to avoid human stuff after encountering one of those pepper 'bombs', according to the Packers that told me about it.