Discussion:
[pyusb-users] Read Remote USB
Heilan Percio O M Cardoso
2015-11-16 17:42:40 UTC
Permalink
Hi Everyone

I have a ACS 122 U NFC reader connect in my computer and I need to read this device.The problem is : My application is running on a cloud. So I need to read USB ports remotely.
Is it possible to read a USB port remotely ? How can I do this?
Thanks in advance and sorry for my very poor english

Heilan Percio Cardoso



To Wander Lairson Costa :
Thank you for share this great code with us.Seu trabalho é incrivel. Meus parabens, cara.
chris clark
2015-11-16 22:28:06 UTC
Permalink
On Mon, Nov 16, 2015 at 9:42 AM, Heilan Percio O M Cardoso <
***@hotmail.com> wrote:

> I have a ACS 122 U NFC reader connect in my computer and I need to read
> this device.
> The problem is : My application is running on a cloud. So I need to read
> USB ports remotely.
>
> Is it possible to read a USB port remotely ? How can I do this?
>


Simple answer is no, this is an application issue and not related to pyUSB.
I'd recommend asking on a general Python mailing list. That being said, the
two options that I can think of off the top of my head are:

1) remote access to NFC reader from cloud (i.e. pull)
2) NFC reader machine contacts cloud application (i.e. push)

For #1 you would design a proxy server in your application OR use an off
the shelf generic option like RPyC https://pypi.python.org/pypi/rpyc. I've
used RPyC as a simple proxy solution for other libraries and it does what
it says it does.

Either way you will want to ensure the communication line is secured
somehow!
Heilan Percio O M Cardoso
2015-11-17 11:07:21 UTC
Permalink
Hi Chris
Thank you for answer.I asked that question because I found on the internet, the pyUSB code changed by CISCO. https://developer.cisco.com/site/eiot/documents/pyusb-dev-guide/?python#cisco-pyusb-hello-world-programRegistration is required to access the codeA key change was that the function find () has been modified to accept the mac address as a parameter instead of IdVendor. The code below was copied from the CISCO's site:
import usb.core
import usb.util

# find device with Mac address of the PoE to USB adapter
dev = usb.core.find(address=int("0022bdcf3600", 16))
I tried using this code but an "segmentation fault" error occurredI apologize for not being able to help. I am new to python and I thought someone might have integrated the Cisco modifications to the original pyUSB.I think it would be a good idea the possibility to read USB ports remotely.

Best regards,
Heilan Percio Cardoso

From: ***@gmail.com
Date: Mon, 16 Nov 2015 14:28:06 -0800
To: pyusb-***@lists.sourceforge.net
Subject: Re: [pyusb-users] Read Remote USB

On Mon, Nov 16, 2015 at 9:42 AM, Heilan Percio O M Cardoso <***@hotmail.com> wrote:



I have a ACS 122 U NFC reader connect in my computer and I need to read this device.The problem is : My application is running on a cloud. So I need to read USB ports remotely.
Is it possible to read a USB port remotely ? How can I do this?

Simple answer is no, this is an application issue and not related to pyUSB. I'd recommend asking on a general Python mailing list. That being said, the two options that I can think of off the top of my head are:
1) remote access to NFC reader from cloud (i.e. pull)2) NFC reader machine contacts cloud application (i.e. push)
For #1 you would design a proxy server in your application OR use an off the shelf generic option like RPyC https://pypi.python.org/pypi/rpyc. I've used RPyC as a simple proxy solution for other libraries and it does what it says it does.
Either way you will want to ensure the communication line is secured somehow!
Loading...