This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Using mobile phone gps to notify location for panic button
#4
(02-11-2025, 07:01 PM)kencottrell Wrote: If I can't use the web editor to generate the config the uploaded <network> block, what  is the alternative approach? 
You need to edit the source itself for now, unfortunately.

Quote:I have tried to to use this command to upload a /phyphox command from a local web server, but how can I do this if the GPS experiment is already running? 

I assume I have to insert the config file before I start the GPS experiment, otherwise how can it listen on port 80?

    phone_url = myphone-ip-address/control?cmd=load&url=mylaptop-ip-address:8000/myfile.phyphox"
    try:
        response = requests.get(phone_url)
        print(response.status_code, response.text)
    except Exception as e:
        print(f"Failed to load config file: {e}")
First, you need to activate the “remote access” in the three dots menu. An ip address will show up then in the footer and that's just what you need as source address, so something like
Code:
phone_url = footer-ip-address:optional-port/get?…
(see https://phyphox.org/wiki/index.php/Remot...munication or search the forum for quite some examples)

The response is in JSON format.
Reply


Messages In This Thread
RE: Using mobile phone gps to notify location for panic button - by Jens Noriʇzsɔɥ - 02-17-2025, 10:46 PM

Forum Jump: