During the Napoleonic Wars, he fought in the Mauritius campaign of 1809–1811 and was at the Invasion of Isle de France and was chosen as the bearer of despatches to England. In 1816, he went in Lord Amherst’s Embassy to China, with Basil Hall. He then went to the Loo Choo Islands in 1816 and created a dictionary.