Archived:How to get phone IP address using PySymbian
Aquivado: Este artigo foi arquivado, pois o conteúdo não é mais considerado relevante para se criar soluções comerciais atuais. Se você achar que este artigo ainda é importante, inclua o template {{ForArchiveReview|escreva a sua justificativa}}.
All PySymbian articles have been archived. PySymbian is no longer maintained by Nokia and is not guaranteed to work on more recent Symbian devices. It is not possible to submit apps to Nokia Store.
All PySymbian articles have been archived. PySymbian is no longer maintained by Nokia and is not guaranteed to work on more recent Symbian devices. It is not possible to submit apps to Nokia Store.
Article Metadata
This is a simple code snippet from which you can get your phones IP address using PySymbian
import socket
ap_id = socket.select_access_point()
apo = socket.access_point(ap_id)
apo.start()
print "PHONE IP IS", apo.ip()
If the returned IP address is 169.254.234.80, then DHCP failed and your router didn't give you any IP. Please check your Access Point settings.


21 Sep
2009