What role did the Bedouins play in creating Arabic grammar? A big one. There are many anecdotes about scholars who went deep into the desert to find Bedouins who could answer their questions about Arabic grammar.
I recently was in Poznań, Poland, and learned by coincidence that one of the greatest Arab scholars, al-Kindi (الْكِنْدِي), was one of the pioneers of cryptology. How did he manage to decrypt messages?