I attempted the command below:
v4l2-ctl -d 0 --get-standard
But I get the error
VIDIOC_G_STD: failed: Inappropriate ioctl for device
The below command however works completely fine.
v4l2-ctl -d 0 --all
Any help would be appreciated. In my program when resetting the controls for my camera I am getting the Inappropriate ioctl for device.
v4l2-compliance
The above command fails four tests. I showed some of the failed tests below. I definitely need VIDIOC_QUERYCTRL to work.
Driver name : uvcvideo
Card type : HD Web Camera
Bus info : usb-3610000.xhci-4.1
Driver version: 4.9.140
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Compliance test for device /dev/video0 (not using libv4l2):
Test input 0:
Control ioctls:
fail: v4l2-test-controls.cpp(202): invalid query_ext_ctrl return code (5)
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL
fail: v4l2-test-controls.cpp(312): invalid queryctrl return code (5)
test VIDIOC_QUERYCTRL: FAIL
V4L2_CAP_TIMEPERFRAME
fail: v4l2-test-formats.cpp(1140): node->has_frmintervals && !cap->capability
test VIDIOC_G/S_PARM: FAIL
test VIDIOC_G_FMT: FAIL
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
fail: v4l2-test-buffers.cpp(574): VIDIOC_EXPBUF is supported, but the V4L2_MEMORY_MMAP support is missing, probably due to earlier failing format tests.
Test input 0:
I am using the PyBluez library to try to connect my computer to a bluetooth speaker. I am running windows 10.
When I use the discover_devices function, my speaker shows up just fine:
import bluetooth as bt
devices = bt.discover_devices(10, flush_cache=True, lookup_names=True, lookup_class=True)
for d in devices:
print d
output:
('BB:B8:6D:D2:C1:6C', u'OontZ Angle 3 16C', 2360324) // this is my speaker
However, when I try to get information such as the port needed to connect to the device, it doesn't return anything at all:
devices = bt.discover_devices(10, flush_cache=True, lookup_names=True, lookup_class=True)
for d in devices:
print d
addr = d[0]
print bt.find_service(address=addr) // this function returns info such as port, protocol, etc about devices
Output:
('BB:B8:6D:D2:C1:6C', u'OontZ Angle 3 16C', 2360324) // this is a speaker
[] // this should be a list of information about the device
Does anyone know what would cause this to happen? Here's some more information:
If I just do a general bt.find_service() without specifying the mac address, the same thing happens
Based on another post I saw, I am running pybluez-win10 instead of default pybluez. When running on the base version of pybluez, the code above gave the following error and stack trace:
File "C:\Python27\lib\site-packages\bluetooth\msbt.py", line 243, in find_service
dresults = bt.find_service (addr, uuidstr)
IOError: A
This error has never showed up with pybluez-win10, but instead the output of the function is, as mentioned, empty.
Thank you.
you might need to install another version of Python, 3.5.4, and then download the wheel file specifically for this version of python.
wheel file URL and then use pip to install it: pip install PyBluez‑0.22‑cp35‑none‑win_amd64.whl
I'm attempting to use the diagnostic sub functions from the pyModbus library but I'm getting errors when decoding the response. This is handled by the pyModbus library and not my code so its hard to figure out where my problem is occurring.
I referenced the documentation and tried the examples given here:
https://pymodbus.readthedocs.io/en/latest/source/example/synchronous_client_ext.html
The example below uses the function to get the NAK counts but I've tried it with multiple functions in the diag_messages library, including DiagnosticStatusSimpleRequest and ReturnQueryDataResponse.
from pymodbus.client.sync import ModbusTcpClient, ModbusSerialClient
from pymodbus import diag_message
ip = '10.130.14.176'
with ModbusTcpClient(host=ip) as client:
testRequest = client.read_holding_registers(3000, 1, unit=1) # test request to make sure the connection is working and the device is communicating.
print(testRequest.registers) # returns expected value
rq = diag_message.ReturnSlaveNAKCountRequest(unit=1)
rr = client.execute(rq)
print(rr.isError) # get "Unable to decode request" error
I trying to get the link of stream with one channel (not a pack of channels which gives me mpt stream) to paste it string to opencv VideoCapure. Because if I paste it mpt stream link to VideoCapture it give me the random (one of this channels in pack) program.
For example I have link : udp://#255.1.1.7:1234 and it have pack of programs (nikelodion, blablatv, brazzerstv and etc.).
I can visualize necessary channel via vlc like that:
vlc -vv -d udp://#225.1.1.7:1234 --program=24919
Where --program - it's id of necessary channel.
I can make stream via vlc:
vlc --ttl 12 udp://#225.1.1.7:1234 --program=24919 --sout '#std{access=udp, mux=ts, dst=192.168.40.73:1235}'
but it's giving me errors. I can videocapture that stream via opencv. But it also random channels on it
Errors that happened when I ran the second command:
ts demux error: libdvbpsi error (EIT decoder): 'last_section_number' differs whereas no discontinuity has occured
main decoder error: buffer deadlock prevented
I am trying to read the voltage from one of the analog input ports and my code is throwing an error. The error happens when calling ADC.setup() (Adafruit_BBIO). The error is as follows:
Traceback (most recent call last):
File "print_voltage", line 3, in
ADC.setup()
RuntimeError: Unable to set up ADC system. Possible causes are:
- A cape with a conflicting pin mapping is loaded
- A device tree object is loaded that uses the same name for a fragment: helper
I have tried reinstalling Adafruit_BBIO as mentioned here: Error using python Adafruit_BBIO GPIO and ADC and BeagleBone Black in ubuntu 14.04
Here is my code for the program.
import Adafruit_BBIO.ADC as ADC
from time import sleep
ADC.setup()
while i in range(0,100):
scale = ADC.read("P9_40")
print(scale*1.8)
sleep(.1)