phyphox / phyphox-android

Physical Phone Experiments
GNU General Public License v3.0
319 stars 42 forks source link

Feature request: configurable web port number, for remote access #19

Closed jer194 closed 2 years ago

jer194 commented 3 years ago

Hello, first of all: thanks for this wonderful app!

I have a device running Android 11 (willow, crDroid), and port 8080 is blocked on that device, by a system process. Thus, it would be great if the web port could be made configurable.

Thanks a lot!

Staacks commented 3 years ago

Out of curiosity: What system service would permanently open the alternative HTTP port? Does not sound like a good idea on a mobile device...

In any case, I see that there are a few scenarios in which you might want to change the port. The problem is that this is nothing that should be relevant in typical teaching scenarios, so it is one of a few items that I would not want to place in plain sight where it would confuse students. I will put it on my list for a "hidden" menu of advances settings. (Not really hidden, but in a place a student would not trip over this setting by accident.)

jer194 commented 3 years ago

It is 'cnss-daemon', as 'system', not sure what it is:

@willow:

ss -an | grep 8080 udp UNCONN 0 0 0.0.0.0:8080 0.0.0.0:*

lsof | grep :8080 cnss-daemon 1020 system 12u IPv4 0t0 21144 UDP :8080->:0

ps -ef | grep 1020 system 1020 1 0 11:35:18 ? 00:00:00 cnss-daemon -n -l

I understand the focus of the app is on teaching scenarios, still, it is quite useful for other purposes as well :-)

Btw, the S8 has an infrared sensor (5 colors), maybe it could be added? And for the temperature, battery always has a temperature sensor (to reduce charging if hot), which could be useful and is quite reliable, if device is left alone, for long term measurements (also voltage and charge level is there).

Thanks!

Staacks commented 3 years ago

If I found the right sensor for the S8, it looks like this sensor is not supported by the generic Android sensor API, but only by Samsung's "Galaxy Sensor Extension SDK". The problem with this is that we do not want to include a large number of third-party SDKs that are specific to few devices as it is usually not worth the hassle. And indeed, this particular SDK has already been marked as deprecated by Samsung.

jer194 commented 3 years ago

Ok, fair enough! (Alternatively, I can get it via termux-api ...)

For port 8080 I found this: https://review.lineageos.org/c/LineageOS/android_device_leeco_msm8996-common/+/271393

msm8996-common: drop cnss-daemon

"FYI on sdm660 the daemon is responsible for downloading wlan calibration db from modem partition, and wlan performance degraded (but still works) w/o it."

Staacks commented 2 years ago

Will be in next release. (commit 72fa975)