Python 3 bluetooth connection ports - python

AFAIK bluetooth uses profiles to determine which type of device it should connect to.
Using Pyhton3 i can create a socket server to bind to a port, but where do the profiles go?
I am trying to connect to my phone using this app, but i cannot set a port there: https://play.google.com/store/apps/details?id=de.kai_morich.serial_bluetooth_terminal&hl=de&gl=US
I can't find any code in python managing the bluetooth profiles. AFAIK the app uses the serial profile, but is that what python sockets are?

Related

Tunnel serial com port windows 10

I'm currently developing a python automation which communicates and control FPGA platform via serial com port. The platform connected to a PC setup in the lab at my workplace. to connect to the FPGA with Python i'm using pyvisa as follows:
import pyvisa as visa
rm = visa.ResourceManager('#py')
self.inst = rm.open_resource('ASRL8::INSTR')
my problem:
To test my code I must pull the new code to the lab-PC.
Is there a way that i'll "tunnel" the serial com port so I can can connect to the FPGA from my PC over LAN ? or any other method that will enable me to connect to the FPGA platform using my development PC ?
*an additional hardware can be considered if needed...
'ASRL8::INSTR' --> 'TCPIP0::LABPC-IP::inst0::INSTR'
Yes, that is called Virtual Com Port, VCP, and can run both TCP and UDP.
Search for "Virtual Com Port TCP" for instance and you get a lot of software you can install to manage that.

Connect ZKTECO device from hosted django Site gives an error

I have created a site that connect ZKTECO K40 device. The connection Method is pretty simple:
from zk import ZK, const
zk = ZK('192.168.1.13', port=4370, timeout=5)
conn = zk.connect()
This makes a connection while running from a local host connecting in the same network.
But after hosting the site, the site is not able to ping to the device and cannot connect to the device.
How can I connect to the device connected on pc local network from a hosted django site? I have my site hosted on Cpanel.
From the server, a machine which is connected to some local network can not be connected. You have to use cams biometric api for communicating your biometric device from the remotely hosted application.
You can use https://www.zerotier.com/ - to expose the device over the internet and then connect it. It's not advisable. but thats one way.

How do I add Inbound Rules to Windows Defender Firewall from Python?

I wrote a Python client/server which I was able to test successfully between two devices on the same network; however, the client fails to connect to the server through the public IP. My hunch is that it's a port forwarding issue in that case. I don't want my users to have to manually port forward to use my program. Is there a pythonic way to add inbound rules to Windows Defender Firewall? Alternatively, is there some other simple example of a client/server in Python that works when connecting via public IP address?

How can I acces to my database in localhost from android - Kivy/Python

I'm working on a project using Kivy/Python and PostgreSql so I faced a problem I don't know how can I access to my database from android, (localhost) in laptop it works good but on android phone I don't know how can I access to localhost, I tried to deploy my app to my phone using USB cable. what I should please can someone give me an idea about it. Thanks
Localhost is used to access the network services that are running on the host via the loopback network interface. So no other devices can connect to it.
One solution for you to be able to access your database from your phone is by enabling the database to listen on all interfaces. This can be enabled by changing postgresql.conf listen_addresses in postgresql.conf which allows incoming connections on all available IP interfaces.
listen_addresses = '*'
Make sure you restart the postgres process after changing the configuration.
If your phone is on the same network then you can set the project setting to the computer IP address that is running postgres.

Can we communicate with Xbee from host programatically

I am trying to hook up a xbee on arduino and wish to run some algorithms on my linux machine and based on result of algorithmic output i ahve to communicate the commands to xbee connected to my arduino. I know we have API support to read/write xbee from Arduino platform. Does Xbee have a way to be programmed on host machine running Linux/OSx other than x-ctu software.
I wish to know if there is a way to programmatically communicate Xbee using USB dongle adapter from host machine, may be python api
I found this online http://serdmanczyk.github.io/XBeeAPI-PythonArduino-Tutorial/ and it pretty much addresses my need .

Categories

Resources