Hunan and Hubei, Lin Zexu, banned the foreign trade of opium. China was defeated, and in 1842 agreed to the provisions of the Treaty of Nanking. Hong Kong Island was ceded to Britain, and certain ports, including Shanghai and Guangzhou, were opened to British trade and residence. In 1856, the Second Opium War broke out; the Chinese were again defeated and forced to the terms of the 1858 Treaty of Tientsin and the 1860 Convention of Peking. The treaty opened new ports to trade and allowed foreigners to travel in the interior. Lamarr accompanied Mandl to business meetings where he conferred with scientists and other professionals involved in military technology. Lamarr's earliest inventions include an improved traffic stoplight and a tablet that would dissolve in water to create