Pages: [1]   Go Down
Author Topic: If I don't know arduino local IP address, can I use broadcast address?  (Read 654 times)
0 Members and 1 Guest are viewing this topic.
Central MN, USA
Offline Offline
Tesla Member
***
Karma: 72
Posts: 7171
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried and failed to do this. I am trying to solve a problem that I don't know arduino wifi shield's dynamically assigned IP address. I read about broadcast address. With my settings below I just can't make it work.

gateway:192.168.1.1
IP subnet Mask 255.255.255.0

I tried broadcast address 255.255.255.255 and 192.168.1.255
I can't reach my arduino, which can be reached at 182.168.1.5

Am I wrong to assume a broadcast address on a web browser is going to reach my arduino?
Logged


Earth
Offline Offline
Edison Member
*
Karma: 52
Posts: 1762
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Easy;-

At command prompt, type "arp -a" then enter
you get  lists a number of MAC addresses with the associated IP addresses. Since you have Arduino MAC address, scroll down the list to find the associated IP address.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 72
Posts: 7171
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Easy;-

At command prompt, type "arp -a" then enter
you get  lists a number of MAC addresses with the associated IP addresses. Since you have Arduino MAC address, scroll down the list to find the associated IP address.

Thanks. It seems to work on a PC. Is thers any app that will list address table on a tablet or smart phone? I would like to ultimately use a smart phone to join the local wifi network, find the IP address of the arduino, and direct my smart phone web browser to arduino.
Logged


Earth
Offline Offline
Edison Member
*
Karma: 52
Posts: 1762
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks. It seems to work on a PC. Is thers any app that will list address table on a tablet or smart phone? I would like to ultimately use a smart phone to join the local wifi network, find the IP address of the arduino, and direct my smart phone web browser to arduino.

Same thing;-

Linux:
Arduino Mac address is "00:07:E9:62:8F:F3"
$ /usr/sbin/arp -n | grep 8F:F3 | awk '{print $1}'
will give you "192.168.1.X" back.

Apple/iOS for Iphone or Ipad:
iOS is a Linux kernel based operating system, install OpenSSH will give you command prompt ( jailbroken is needed)

Google/Android for phone or tablet:
Android is a Linux kernel based operating system, Try Android Terminal Emulator application, It will allow you to access android's built-in Linux command line shell.




« Last Edit: May 01, 2013, 10:43:29 am by sonnyyu » Logged

Earth
Offline Offline
Edison Member
*
Karma: 52
Posts: 1762
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I prefer brainless solution.   smiley-razz

Here is my way;- Open router admin web GUI page, It is there! It might be dependent on router OS.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 72
Posts: 7171
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I prefer brainless solution.   smiley-razz

Here is my way;- Open router admin web GUI page, It is there! It might be dependent on router OS.

Thanks! The router is going to be a 3G Android device serving as a wifi hotspot inside of a weather-proof box so I prefer the hard ways. Maybe an easy way is to try "all possible" addresses or just look at your own address when you connect to this 3G Android device. Say it's 192.168.1.3, then guess 192.168.1.2 for arduino smiley-wink
Logged


Earth
Offline Offline
Edison Member
*
Karma: 52
Posts: 1762
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks! The router is going to be a 3G Android device serving as a wifi hotspot inside of a weather-proof box so I prefer the hard ways. Maybe an easy way is to try "all possible" addresses or just look at your own address when you connect to this 3G Android device. Say it's 192.168.1.3, then guess 192.168.1.2 for arduino smiley-wink


Sure, there are 2 ways;-

1. if router/hotspot support mac address mask, now you could mask out all other mac address except Arduino's. Arduino will take number one at the pool i.e. 192.168.1.2.

2. if router/hotspot support IP Address and MAC Address bind. now you glue them together.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 72
Posts: 7171
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sonnyyu,

Thanks for the comments. Until now I didn't know there is such thing as IP MAC bind. I'll look into this one more.
Logged


Pages: [1]   Go Up
Jump to: