Unable to get error reasons in CUPS API while printing via USB - libusb

I am using CUPS 1.6.3 for printing. The printer is connected via USB. The problem is while trying to print the job failed to print. I am able to see a reason for the failure 'Waiting for printer to become available' on CUPS interface. But I am not able to get the reason string through CUPS API. However when the printer is connected via network I am able to get the reason using cupsGetOption("printer-state-reasons"...). Someone please help me to get the error reason while connecting via USB.

Unplug your printer cable from your PC and plug it again on another USB port.

Related

How to block USB storage device using EndPoint Security?

I am working on EndPoint Security. I was trying to control and block the USB storage device using the same. I used the event ES_EVENT_TYPE_AUTH_IOKIT_OPEN.
How can I get info about the device? for instance: Name Vendor Type etc...
Also when I just tried to block all the devices in the IOkit by just returning ES_AUTH_RESULT_DENY, still I was able to access the USB storage device after running the code in terminal. Could anyone guide and tell me what am I missing or where am I getting wrong?

Use IP camera with OPEN CV without internet connection (direct connection to pc)

I am sorry, this might not be the correct platform to ask this kind of question but I couldn't think of any other place .
I for one of my project I need to capture some video footage from an outdoor camera using open cv. Actually, its a part of a bigger project where another signal triggers the camera. Since the camera will be located outside, I am looking for weather proof night vision enabled USB cameras that I can easily control via OPENCV. However I cannot find any descent USB camera and most of the websites show IP cameras. My problem is that the installation will be at a site where there is no internet so I cannot use internet. Can anybody please suggest if and how these IP cameras can be connected to the PC and be controlled via OPEN CV or else suggest some websites where I can get descent outdoor USB IR cameras.
I have also tried the NOIR Raspi camera but the quality is not very good and I think the range will also not be very good. Moreover running OPEN CV on RpI is very slow even for simple video recording.
Please refer to that thread for how to use IP cameras with open CV. I didn't try it personally, but a simple google search got me that. http://answers.opencv.org/question/133/how-do-i-access-an-ip-camera/
To access an IP camera is very simple, you just need this line:
cv2.VideoCapture("rstp://ipaddress:port/blahbla")
Now, if you dont have internet the IP camera as the PI should be on the same network, you can have a wireless router with no internet.
If you dont have a wireless router you can create a hotspot on your PI so you can connect the Camera directly to the PI, alot of IP cameras support hotspot so you can connect your pi to them.

Application loader is waiting and network connection was lost

When I click the send button for sending my app in Application Loader, it is waiting for a response (sent API usage to iTunes Connect, waiting for response) and waiting without error. I am getting a message "the network connection was lost" after a couple minutes. I tried another network connection but the issue was not resolved. Could the issue be on iTunes network?
It should just work if you quit Application Loader, then re-open it.
To submit an application to iTunes Connect, your Mac always need to be up to date, or you will be able to get errors. To do this click on Apple's logo > Software Update. I was having the same problem, and it solved for me. Cheers =)
I had to force quit and the re-open to make it work.
A normal restart did not work, nor did a restart of my Mac. Very weird.
Make sure your iTunes Connect user has admin privileges. I had it set at Technician and everything looked like it was working but it would hang on the "Sending API Usage to iTunes".
None of the above suggestions work for me. Likely the real cause is physical and related how Application Loader is using the internet. I have ADSL connection with a Netgear modem/router assigning each device at home a fixed IP address according to the mac address of the network interface of each device. I had noticed that when Application Loader is uploading, my Windows PC could not connect to the internet. However, if in Mac mini I use Safari doing various things like watching video, my Windows PC can access internet.
Even stranger, when Application Loader is uploading, the modem/router could easily lost connection to the internet, as I could see from the LED lights of the modem. The connection is lost randomly at any progress of uploading the 20 MB file.
So I had turned off Windows PCs, iPads, iPhones and Android device at home, so Mac mini is the only device using the Internet, the Application Loading has finally been able to upload the app successfully in one go.
My guess is, my home phone line has some noise, and Application Loader is using the internet aggressively particularly the up link, so stressing out the modem, then causing other devices like my Windows PC lost connection, not even able to resolve host.
So my working solution is to make Mac be the only device using the Internet, given that the internet connection is already in poor condition with noise, near the edge of losing connection.

What files pc send to usb device

I would like to know if there is a program for analyzing traffic through USB. For example, I would like to know what files are transmitted from the computer to the device at the moment, what he does with the device. I need it to debug device, not driver! Is there such a program?
I think you can use this site as a starting point and inspect the different methods in detail on your own.
wireshark wiki

How to detect that Symbian phone is being used as a modem?

I have a Nokia Symbian Series 60 3rd edition phone. I can use it as a GPRS / 3G modem either using Bluetooth, USB or IR.
Is there a way to programmatically detect when the phone is being used as a modem?
Please note I don't want to detect when a GPRS / 3G connection comes up (such as when you use the phone browser), but when a GPRS / 3G connection comes up that is the result of the phone being used as tethered modem via BT / IR / USB.
So the user has set up a dial up networking connection on their laptop, for instance, which uses the modem in the phone. They then launch that connection because they want to make a 3G wireless internet connection from their laptop via the phone. That's what I'd like to be able to detect from the phone.
I don't believe there's any public interface that you could use for this. You could probably use internal APIs to check what is creating the data connection, or more crudely check which processes are running when a data connection is created - probably quite easy to fool this method, depends why you want to know?
I can see network operators wanting to do this to block and/or charge extra for tethering usage. Easiest way to do that would be network side though, checking the browser UA header (also possible to fool, but not without harming your browsing experience a bit on the laptop).