Retrieving bolt ipaddress of bolt device using php


#1

How to retrieve bolt ipaddress through php (curl)?


#2

Hi @bikkumallanageshwarr

I am not sure why do you need the Bolt IP address (if you have Bolt version2). If you want to find out Bolt IP in an easy way then you can just use Advanced IP scanner(Windows), LanScan (Mac), FingApp(Android Phones).

Or You can write a shell script for getting the list of IP address in your network and by using the Hostname you can identify the Bolt device and you can redirect this output to file and your php script can read the IP from that file.
Refer this link https://stackoverflow.com/questions/13669585/how-to-get-a-list-of-all-valid-ip-addresses-in-a-local-network
In case you don’t want to use the shell script at all then you can use the php wrapper for nmap https://github.com/willdurand/nmap

Do let me know in case you need further assistance.


#3

Let us assume that there are 50 bolt devices across a city and all are sensing temperature around their location and I need to monitor the data hour to hour and if it exceeds or if there is any sudden rise or fall in temperature then I should send notification to my professor. So, in order to get the location of the bolt device, I need ipaddress through which I can get details like street name, city name and state name!


#4

Hi @bikkumallanageshwarr:

Sorry for the delayed reply.

Since you mentioned location tracking, I thought I would give you a better idea than trying to find the ip address to figure out the position of the Bolt unit.

If you are placing the Bolt units throughout the city, all you have to do is note down the ID of the Bolt along with the Latitude and Longitude of the location where you placed the Bolt.

In your own cloud monitoring app, you will upload this list. So when your cloud monitoring app checks for temperature and the temperature exceeds the limits, all it has to do is cross-reference the ID of the Bolt against the list you put in the app. The app can then send an alert with the latitude and longitude without having to do any complex IP searching.