if I put an ip address in the section s.connect(('10.255.255.255', 1)) that is valid on the subnet the nanopi receives it ip address in (ie 12.1.1.1, which does not actually exist) then it displays the ip address that was assigned to by DHCP.