I want to read gyroscope and acceleration values from an Arduino Nano 33 BLE board by using Bleak on a Windows OS. The code to make the discovery is the default Bleak code (see here). On Arduino I use a code similar to this one, except that I work with the gyroscope and the accelerometer.
Using the Android nRF Connect application I can view the device and the characteristic. Using Bleak instead I can't see any device.
Is it possible to have a problem with permissions on Windows?
I tried to connect it via Bluetooth to the pc first, but Windows 10 says: try to connect your device again. But the Arduino sketch sees the connection attempt as a Central BLE device connecting, in fact he enters the while loop and starts sending data.
How to solve it?
Related
I'm working on an object detection project for IoT using a webcam and servo. In short, when the object detected by the webcam matches the data in the system, the servo will move. Can the webcam be connected to the laptop, and the servo on the Raspberry Pi? So the input is from the laptop and the output is on the Raspberry Pi using pi-gpio (Remote GPIO). How to? Thanks.
This link shows the GPIO Zero library being used with pigpio to allow remote control of the GPIO pins, from either another raspberry pi - or a PC. Once you configure GPIO Zero to use the pigpio library and connect, I believe you can just use the GPIO Zero libraries as per normal to control the Servo. (though I have not tried this myself!)
However I would probably use MQTT to decouple the two systems. If you run an MQTT broker on the Raspberry Pi (eg. Mosquitto) then the webcam software can publish a message to the MQTT broker, and the raspberry pi software can subscribe and act accordingly.
You can also run this with a cloud based MQTT system (eg. HiveMQ) so the Raspberry Pi and the PC with the Webcam don't even have to be in the same location.
A quick way is to use the Python socket library. Both devices need to be connected to the same network, and the sender needs to know the IP address of the receiver.
I am really frustrated and have no idea where to search for an answer.
Currently I am working on a project to detect drowsiness with an ECG device (Zephyr Bioharness 3). The device works but I can't find it with windows (For example like this). I tried several things:
Find the device with my Smartphone -> works
Find the device with an Ubuntu on the same Laptop -> works
Connect directly on Win7 via Bluetooth with this Python Script: Gist -> connects and sends data
Find other Bluetooth devices with my Laptop on Win7 -> Bluetooth radio is dound
COM port for (virtual) serial connection to a bluetooth device (device manager)
What I am trying, is getting this script to work: ZephyrApp. Beside some compatibility problems with QT and serial (which I was able to fix), the programm hangs here protocol.py. I suspect the problems of not finding the device relates to the problems with the program. I know this is very special case, but hope anyone has an idea, how to fix this.
Regards,
paul
EDIT: Another PC with Win7 can't detect the device as well, it seems it is a Windows problem.
The device can't be detected with Win7, but I found a way to connect via bluetooth directly: https://gist.github.com/darkopetrovic/2127217
We are testing networking devices to which test interaction is done using serial ports. Python 2.7 with Windows is used to achieve this using the PySerial module of Python.
The scripts are run using Robot framework.
We observe that the Robot logs do not contain the serial device interaction dialogues.
We tried checking on Robot framework forums and it is unlikely that such support exists at Robot framework level.
We need to implement this in Python.
How can the following be achieved:
I) Basic requirement: All script interaction with the (multiple) test devices on serial port needs to be captured into a log file
II) Advanced requirement: while the script is not actively interacting with the test device there has to be continuous background monitoring of the device under test over serial ports for any errors/crashes
Thanks!
I may be incorrect but perhaps you want to capture data sent/received between computer and device through serial port. If this is true then serial port sniffer will be required. Linux and mac os x does not support sniffing however you may use sniffing for windows.
I am trying to communicate with a Bluetooth COM port, via Python on a Windows 7 machine. Since this Computer has no built-in Bluetooth, I use a USB stick which works with BlueSoleil (https://en.wikipedia.org/wiki/BlueSoleil).
My problem seems to be, that BlueSoleil, after a successfull pairing to a COM port, Python cannot open it (access denied). When I define a serial port with PySerial and try to write to it without opening it explicitly, I have no success and a few minutes later the computer crashes with a bluescreen.
When using a terminal (Kitty), I can read and write from and to the port.
My suspicion is, that PySerial tries to 'block' the port, which conflicts with BlueSoleil, but I am not sure.
Any Ideas?
Alright, it seems, that the Problem is bad drivers of the no-name Bluetooth Dongle under Win 7.
I am now using a Raspberry Pi with Raspbian and after installing the needed Packages and loading the needed modules, I have no Problems to connect my Bluetooth device to a serial port.
I want to be able to read out information about connected Bluetooth Low Energy HID devices in Windows 8. My main application uses Qt, but I thought it could be much easier to get help from a Python script. Since Windows 8.1 supports Bluetooth Low Energy natively, I connect my mouse to it and tried using the pywinusb package, but it doesn't seem to be able to read out this wirelessly connected device, only connected HID devices.
How can I read out information about my BLE device with Python?