Generalized connections and higher spin equations