i'm currently trying to connect with my Thorlabs PM100USB Powermeter via pymeasure.
I'm using Win10 und pymeasure is installed via anaconda.
I found an old python script of my lab in an archive which connected to the powermeter via:
adapter = 'USB0::0x1313::0x8078::P0025186::INSTR'
power_meter = thorlabspm100usb.ThorlabsPM100USB(adapter)
But at this point I'm completly lost.
How do I get this address?
And yes, I have read the chapter on connecting to a device in the pymeasure documentation, but I can't figure it out either.
If I try to run the the code above the following error is raised:
VisaIOError: VI_ERROR_RSRC_NFOUND (-1073807343): Insufficient location information or the requested device or resource is not present in the system.
May anyone help me? Thanks a lot!
Related
I'm trying to use the Adafruit_CircuitPython_BLE_iBBQ python library (see https://github.com/adafruit/Adafruit_CircuitPython_BLE_iBBQ) to connect to the INKBIRD Smart Wireless BBQ Thermometer. I have used conda and the circuitpython docs to successfully create a circuit python environment. I'm running the sample code at https://docs.circuitpython.org/projects/ble_ibbq/en/latest/examples.html.
It correctly finds the iBBQ advertisement but then throws
bleak.exc.BleakError: Device with address FC:45:C3:38:76:03 was not found.
Does anyone know how this might be addressed?
Thank you!
I have installed the dask extension utility for my jupyter lab sessions following the instructions here. The installation, on my university linux cluster, went through smoothly.
When I launch a client in the Jupyter notebook, the dashboard shows a link: http://127.0.0.1:8787/status. Clicking on the link should open up the dask diagnostics in a separate tab. That link, however, does not work for me and gives an "unable to connect" message. I checked with an administrator managing the cluster that port 8787 (in the link) is indeed open to regular users like myself. So, something else seems to be the problem.
Any help is much appreciated.
Are you forwarding the port 8787 to localhost on the machine you are working on, e.g. using an ssh session if you are on linux, or puTTy on windows?
I'm developping a smartphone bluetooth simulator for my company, in python 2.7 with bluez 5.48 on Ubuntu 18.04, and 5.37 on Ubuntu 16.04. Everything is up-to-date, and I already corvered all the adapter/device/agent-api from the bluez doc, through dbus. It works well without any problem (settings, pairing, connection...).
Now I'm trying to add a PBAP service (PBAP PSE) to share the phonebook, that sync with a car system (PBAP PCE), with the obex-api.
As far as I understand, I first call:
CreateSession()
with Target = pbap, but it returns:
"Unable to find service record"
And that's the blocking point, I have no idea why, nor what a service record means.
I tried to start profile with sdptool, but it doesn't seem to change anything.
The tests in bluez repo give me the same error.
I tried a lot of different config, profile, bluetooth adapters etc... no success.
Thanks for your help!
bluez doc : https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc
I've been following this tutorial: https://circuitdigest.com/microcontroller-projects/arduino-python-tutorial
import pyserial didn't return any errors, but when I run my python code, I get the following error:
SerialException: could not open port 'com18': WindowsError(2, 'The system cannot find the file specified.')
Anyone know how to fix this?
I copy what you can read in the tutorial:
ArduinoSerial = serial.Serial('com18',9600)
Note: It is very important to mention the correct COM port name. It can found by using the Device manager on your computer.
When you have plugged your arduino, windows has chosen another COM number.
The port can be found directly in arduino IDE. It detects all devices connected on USB; but the IDE do not know which one is your arduino. In the menu tools / port you will see the list of COM on your computer.
If no COM is proposed, then you miss a driver for your card under windows --> google for it.
I am using Python 2.7 and wifi library (https://wifi.readthedocs.org/en/latest/) on a Raspberry Pi. I have managed to install wifi library using:
sudo pip install wifi
on the terminal. The library seems to work but I can't figure out the way to connect to a wifi using a password. The documentation on the website is a bit difficult to understand, especially if you are a Python noob like me. I used this:
>>> from wifi import Cell, Scheme
>>> Cell.all('wlan0')
and I got all the wifi networks available and also the one I want to connect to called test1. So I am sure that the library works. I followed the steps on the website but got a permission denied error at:
>>> scheme.save()
Also, before that there was this command:
>>> scheme = Scheme.for_cell('wlan0', 'home', cell)
Does anyone know what that 'home' refer to? Is it the SSID name? Can anyone help me connect to a wifi called test1 whose password is passwordtest1? Is there any easier way to connect to wifi through terminal so as not to use Python?. Thanks in advance.
After some research, I didn't find a way to connect easily to a wifi using Python on a Raspberry Pi. So I solved my problem by using the wifi command on the Terminal:
sudo wifi connect --ad-hoc SSID_Name
Which automatically asks me for an input: passkey> .Where you can actually type the password, press enter and after that it automatically connects to the wifi. After that I can run my Python script which needs a connection to the internet in order to run. The wifi command is preferable to other terminal commands when it comes to my problem cause it needs less time to connect to a wifi manually. For example it is preferable to the process which uses this terminal command:
sudo nano /etc/network/interfaces
I hope this helps everyone who has the same problem.