Ways to make a sever-client connection between desktop-phone? - python-3.x

Idea
I am tring to make two applications one on PC and one on android phones(maybe IOS). My desktop app is build on python and the phone app with .dart on flutter emul.
Basically the only thing I want is to pass a variable from my phone to a desktop and do something with it. Of course the 2 devices will be on the same home network.
Question
I have already tested HTTP requests and TCP connection and I got both of them to work. My problem is that I want this app to go online eventually and as things are the connection is made on my IPv4, that is different in every device.
How can I make the desktop server side to wait for a phone to connect on it and the phone to search and find the open IP and port and the name of the device?

Related

how to connect flutter app with nodejs locally with real device

I want to connect my flutter app to node server locally through my real device.I have seen many solution but still didn't get any clear picture.can anyone elaborate the steps to connect
you have two ways to do that:
1- if your mobile and computer - which contain (node.ja and database) - connected at same wifi, so, you should just go to CMD in your computer and type (ipconfig) and try to find the ipv4 for (wireless) or wifi, after that just in your mobile you can access the api by just replace (localhost) or (127.0.0.1) with your local ip which your found in cmd.....
or if you don't using wifi, you can just run your mobile hotspot, and connect your laptop with it by wifi, and also follow same steps as above...
Device must be able to connect to localhost:<port> but to make this happen connect your mobile to computer via usb or connect over same wifi connection.
After this hit chrome://inspect/#devices and port forward localhost: to so now you can easily connect to localhost:<port> on your mobile phone.
Refer to image below and for more details check out the insightful medium blog by Neeraj Moudgil
https://medium.com/#neerajmoudgil/how-to-test-localhost-node-apis-on-android-device-253fcdd32c18

Website timeout, but only on mobile devices - IIS

I am trying to test a website on mobile devices, but I keep getting timeouts on Android (using Chrome) and iOS tablets and smartphones (using Safari). My Windows tablet and a separate Windows PC (both using Chrome) work fine. Here is my network setup. It's a little convoluted, but blame COVID-19 and working remotely for that.
Web Application: DotNetNuke running on IIS using dedicated MSSQL database to store user account information and localization settings.
Web Server: Windows 10 running a local MSSQL web server database and IIS. Connected Wireless to my internal network. Using a VPN client to connect to the Rest API within my work network to access the core application server. The web server has a self-signed, untrusted certificate.
Windows PC: Windows 10 laptop connected via wire to the network. Certificate error is ignored by the user in Chrome and the webpage comes up.
Windows Tablet: HP tablet running Windows 10 connected wireless to my network. Certificate error is ignored by the user in Chrome and the webpage comes up.
Android Phone: Google Pixel 3 connected via WiFi to my network. Using Chrome, connection times out.
I've try a couple of Android devices and an iPhone, and neither connect. I'm not sure where to begin debugging this. I know it worked last week because I tested the configuration to prepare for testing this week. Any blaring issues to look at, other than perhaps a code change that broke the mobile rendering?
What is the way of your Windows Tablet connected the network? Is the wireless connected way the same to Android Phone? in other words, using WiFi too?
I doubt if your Wifi network works like before. Check your IP of the Android Phone, then Ping the IP on the webserver, and confirm whether the network with the target web server is unobstructed.
Alternatively, we Ping the gateway of the network on both an Android phone and the website.
About the Ping Tool in Android phone.
https://www.makeuseof.com/tag/android-networking-apps/
Feel free to let me know if there is anything I can help with.

Javascript SPA vuejs socket.io connection

I’m broadly new to vuejs and socket.io and nodejs.
I wrote an single page application to communicate between a nodejs server (running on an Raspberry pi) and a Siemens S7-1500 PLC. Those ones are connected over ethernet and the raspi is getting me an wifi access point for control the PLC with a smartphone, tablet or Desktop.
I’m almost done, but I struggled at that point. I am using socket.io to send events to the client an back. For that i need to know the ip address of my sever inside my vuejs application with is bundled with webpack.
As I get to the point as I was trying to deploy my App onto the Rapberry Pi I didn't found a way to set the IP address dynamically inside my application.
Perhaps some of you guys could open my eyes and give me a Tipp for the solution.
How it's possible to send the IP Address to the client? My Application is running locally and there is no need to do not so.
In my mind it should be possible to send the server ip to the client.
Thank you for your Answers :)
Greetings Denis
You can use linux ifconfig command in order to get your IP from command line of the host application is hosted on. IP is not sth that you set on application level, but ussually is automatically asigned for the given host. So it depends on how your network is set up.
Look for sth like "How to give your Raspberry Pi a Static IP Address".

route/redirect voip to landline with asterisk and Linksys SPA2102 or 3102

I have a landline and I would like to be able to route/redirect voip to and through landline.
I am a newbie to this subject but I read Using an Android Phone as an Asterisk extension which is basicaly what I would like to do but I would like to:
connect my landline to asterisk
use an android to connect to asterisk and reroute the call through the landline
I would like to be able to use CSIPSimple or some other VoIP app on my android phone to call from Android through landline.
What I miss is the way to connect my landline to asterisk. I have a a debian server running on a on old notebook and I don't have a way to put some PCI cards in it.
I found some cheap Linksys SPA2012 devices on ebay and I am not sure whether I can use this device for redirecting to landline. If not what would be a cheap solution for this?
Edit:
SPA3102 looks like a correct solution because it has phone and line-in port.
I think best option is get some virtual pbx(asterisk based) and setup your SPA to that pbx.
After that you will be able control forwarding using browser and get calls using any sip appliation on android.
I see no easy way get that done without pbx, except option give spa3012 public ip and control redirect on device web.
SPA2XXX have no FXO port, so can't be used for landline(PSTN)

J2ME access filesystem on network computer

I am trying to access files on a network computer via a J2ME MIDlet. This MIDlet runs on a device that is connected to the network via a WI-FI router. The MIDlet can see the other devices (that is, it has visibility to the other devices's IP on the network).
Has anyone done this successfully? If yes, what connection API have you used and if you could share some code?
I have tried using the FileConnection API, but passing the following results in connection error:
conn = (FileConnection)Connector.open("file://IP_OF_COMPUTER_ON_SAME_NETWORK/");
As per the FileConnection API, you should be able to connect to devices on the network as it allows hostname access.
I am unable to run a web server on the designated computer otherwise I would just write a simple web script (and run a web server).
Thanks in advance,
Vikram
AFAIK, you can not access File from remote Computer directly. And if you still want to do it , your mobile must be connected with the remote computer by WiFi or GPRS.
Install apache on the remote computer and set it up as a server (localhost). You can then view the file folders via the phone browser.

Resources