A cohomological approach to n-gerbes with connection