My account: Login | Sign Up
Loading... 

Getting and setting MAC address, Subnet Mask Address | Thread profile

Thread profile page for "Getting and setting MAC address, Subnet Mask Address" on http://www.forum.nokia.com. This report page is a snippet summary view from a single thread "Getting and setting MAC address, Subnet Mask Address", located on the Message Board at http://www.forum.nokia.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity, which are reported in a table below. Additional thread profile information is also shown in the following ways:

1) Top Contributing Authors
2) Related Threads on "eBay Auctions"
3) Related Threads on Other Sites

Warning: These statistics are generated using 'best efforts' and can experience delays and reporting errors at times. Please note that such statistics do not constitute a thread's popularity and/or exact posting volumes at any given reporting period.

Title: Getting and setting MAC address, Subnet Mask Address
Site: Nokia Developer Discussion Boards  Nokia Developer Discussion Boards - site profile
Forum: Python  Python - forum profile
Total authors: 11 authors
Total thread posts: 24 posts
Thread activity: no new posts during last week
Domain info for: nokia.com

Thread posts in Getting and setting MAC address, Subnet Mask Address:

1. 
Started 4 months, 2 weeks ago (2008-07-18 16:41:00)  by Blackhawk255
Hey I'm new to this forum, so sorry if I'm not use to the customs. I am writing a program on an N80 in pys60. I have come across the need to get the MAC address, and get and set the Subnet mask address programmatically through python. I've been looking all over the web and I have not found a way to do it. I was wondering if someone could help me with this.
Size: 475 bytes
Customize:  Customize "Getting and setting MAC address, Subnet Mask Address :: Python :: Nokia Developer Discussion Boards"
2. 
Started 4 months, 2 weeks ago (2008-07-18 16:52:00)  by gaba88
HI Blackhawk225 first of all welcome to the python discussion board as far as i know you can get the IP address of your phone using pys60 if you know bit networking concepts then you can easily get other things. i hope this works for you.
Size: 790 bytes
Customize:  Customize "<b>Reply 1</b>: Getting and setting MAC address, Subnet Mask Address :: Python :: Nokia Developer Discussion Boards"
3. 
Started 4 months, 2 weeks ago (2008-07-19 17:18:00)  by jethro.fn
Quote: Originally Posted by Blackhawk255 I have come across the need to get the MAC address, and get and set the Subnet mask address programmatically through python. This is not possible as far as I can tell. It would require an extension written in C++ and there aren't any yet. Also note, that these low ...
Size: 1,029 bytes
Customize:  Customize "<b>Reply 2</b>: Getting and setting MAC address, Subnet Mask Address :: Python :: Nokia Developer Discussion Boards"
4. 
Started 4 months, 2 weeks ago (2008-07-19 22:31:00)  by krtrivdi
Hi, Its not possible to get the physical address but surely you can get the logical address of the device. Because it falls under the device capabilities. If you can play with the root level of symbian OS and hardware you can get it but as you know S60 is layer above symbian OS so you have to penetrate the OS first !
Size: 460 bytes
Customize:  Customize "<b>Reply 3</b>: Getting and setting MAC address, Subnet Mask Address :: Python :: Nokia Developer Discussion Boards"
5. 
Started 4 months, 2 weeks ago (2008-07-19 23:30:00)  by croozeus
Hi Blackhawk, Looks like you would need to hard code your MAC address, which would make your app : non portable. (Which is the only possible solution, I can see using Pys60) You can get the MAC Address by using code *#62209526# on the device Br, Croozeus
Size: 465 bytes
Customize:  Customize "<b>Reply 4</b>: Getting and setting MAC address, Subnet Mask Address :: Python :: Nokia Developer Discussion Boards"
6. 
Started 4 months, 2 weeks ago (2008-07-20 05:32:00)  by gaba88
hi Blackhawk255 yes once you get the mac address i think certainly get the other things with a little bit of manipulations on it. @kiran sir great to see you again in the discussion boards.
Size: 454 bytes
Customize:  Customize "<b>Reply 5</b>: Getting and setting MAC address, Subnet Mask Address :: Python :: Nokia Developer Discussion Boards"
7. 
Started 4 months ago (2008-07-31 09:35:00)  by reaper7
How to check with Pyton which IP I received from DHCP while connecting to AP? I've found such script: Code: import socket ap_id = socket.select_access_point() apo = socket.access_point(ap_id) apo.start() print "PHONE IP IS", apo.ip() But for me it works only in case I select connection different than WLAN (e.g. GPRS); while selecting WLAN IP address is always 196.254...
Size: 782 bytes
Customize:  Customize "<b>Reply 6</b>: Getting and setting MAC address, Subnet Mask Address :: Python :: Nokia Developer Discussion Boards"
8. 
Started 4 months ago (2008-08-03 03:40:00)  by szallah
@reaper7 That code works for me... I've manually set my IP for my AP at home to 192.168.2.95, an that's exactly what the code returns in my case.
Size: 219 bytes
Customize:  Customize "<b>Reply 7</b>: Getting and setting MAC address, Subnet Mask Address :: Python :: Nokia Developer Discussion Boards"
9. 
Started 4 months ago (2008-08-03 21:09:00)  by reaper7
@szallah: Of course you're right - if IP is set up manualny the script will show it correctly. But if I set it up manually of course I know it well and so don't have to check it I've set DHCP, connect to different APs and want to know which IP was assigned for me and this doesn't work correctly.
Size: 470 bytes
Customize:  Customize "<b>Reply 8</b>: Getting and setting MAC address, Subnet Mask Address :: Python :: Nokia Developer Discussion Boards"
10. 
Started 3 months, 4 weeks ago (2008-08-05 10:02:00)  by reaper7
another way to get the real address: Code: msg = "Ok" intip = "0.0.0.0" port = 8511 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) apid = None apid = socket.select_access_point() if not apid: sys.exit() apo = socket.access_point(apid) socket.set_default_access_point(apo) apo.start() s.bind(("0.0.0.0", port)) s.sendto(msg, ("255.255.255.255", port))...
Size: 1,056 bytes
Customize:  Customize "<b>Reply 9</b>: Getting and setting MAC address, Subnet Mask Address :: Python :: Nokia Developer Discussion Boards"
 

Top contributing authors for Getting and setting MAC address, Subnet Mask Address

Name
Posts
gaba88
8
user's latest post:
Getting and setting MAC address,...
Published (2008-10-17 02:18:00)
Quote: Originally Posted by marcelobarrosalmeida Same problem. Sometimes ip.start() seems not to have enough time to get a valid IP and returns 192.254.x.y IP (link local addressing - RFC 3927). I tried to stop/start the selected access point but the problem (?) remains. Any workaround or is this the expected behavior ? hi marcelobarrosalmeida welcome to the forum nokia python discussion boards. Have you tried the method given by reaper7 in...
reaper7
5
user's latest post:
Getting and setting MAC address,...
Published (2008-09-07 09:58:00)
croozeus in another post gave a link to an interesting application in c++. IfInfo shows twice a single interface with different settings! Here are the results of operations on my phone with the active WLAN (working Nokia Internet Browser) Code: Interface Name: EthWlan4 State: Up Speed Metric: 10000 Mac Address: 00:1C:D6:xx:xx:xx IP Address: 196.254.13.225 Netmask: 0.0.0.0 Broadcast: 0.0.0.0 Gateway: 0.0.0.0 DNS 1: 192.168.0.1 DNS 2: Interface...
lhuovine
2
user's latest post:
Getting and setting MAC address,...
Published (2008-08-08 09:07:00)
Quote: Originally Posted by gaba88 hi lhuovine have you tried the another way provided by reaper7 in this thread earlier it may work for you also. Enjoy Pythoning Gaba88 Sure, it works well enough (btw. thanks for reaper7 for the workaround). Of course it would be nice that the &quot;apo.ip()&quot; method worked, too I guess it would be time to file a bug report regarding this issue (unless someone hasn't done that already).
Blackhawk255
2
user's latest post:
Getting and setting MAC address,...
Published (2008-08-06 20:44:00)
Quote: Originally Posted by croozeus Hi Blackhawk, Looks like you would need to hard code your MAC address, which would make your app : non portable. (Which is the only possible solution, I can see using Pys60) You can get the MAC Address by using code *#62209526# on the device Br, Croozeus I was wondering what you mean by code *#62209526# on the device. What do you mean by code? Code where?
croozeus
1
user's latest post:
Getting and setting MAC address,...
Published (2008-07-19 23:30:00)
Hi Blackhawk, Looks like you would need to hard code your MAC address, which would make your app : non portable. (Which is the only possible solution, I can see using Pys60) You can get the MAC Address by using code *#62209526# on the device Br, Croozeus
szallah
1
user's latest post:
Getting and setting MAC address,...
Published (2008-08-03 03:40:00)
@reaper7 That code works for me... I've manually set my IP for my AP at home to 192.168.2.95, an that's exactly what the code returns in my case.
petrib
1
user's latest post:
Getting and setting MAC address,...
Published (2008-08-06 04:19:00)
And the code is easier to remember, if you think of it as *#MAC WLAN# ('M' on the regular mobile phone (ITU-T) keypad is on the key '6', 'A' is on the key '2', 'C' is also on '2', etc.).
reaper7 Offline
1
user's latest post:
Getting and setting MAC address,...
Published (2008-09-07 09:58:00)
croozeus in another post gave a link to an interesting application in c++. IfInfo shows twice a single interface with different settings! Here are the results of operations on my phone with the active WLAN (working Nokia Internet Browser) Code: Interface Name: EthWlan4 State: Up Speed Metric: 10000 Mac Address: 00:1C:D6:xx:xx:xx IP Address: 196.254.13.225 Netmask: 0.0.0.0 Broadcast: 0.0.0.0 Gateway: 0.0.0.0 DNS 1: 192.168.0.1 DNS 2: Interface...
marcelobarrosalmeida
1
user's latest post:
Getting and setting MAC address,...
Published (2008-10-16 23:12:00)
Same problem. Sometimes ip.start() seems not to have enough time to get a valid IP and returns 192.254.x.y IP (link local addressing - RFC 3927). I tried to stop/start the selected access point but the problem (?) remains. Any workaround or is this the expected behavior ?
jethro.fn
1
user's latest post:
Getting and setting MAC address,...
Published (2008-07-19 17:18:00)
Quote: Originally Posted by Blackhawk255 I have come across the need to get the MAC address, and get and set the Subnet mask address programmatically through python. This is not possible as far as I can tell. It would require an extension written in C++ and there aren't any yet. Also note, that these low level networking parameters require the CommDD and NetworkControl capabilities to access.