On 28/01/16 08:16, Johan Ström wrote:
> On 27/01/16 23:42, Jan Kandziora wrote:
>> Am 27.01.2016 um 23:09 schrieb Johan Ström:
>>
>>
>> I'm against putting the listing/probing code into owserver. We have
>> small tools for everything and shouldn't start overloading tools with
>> functions now. Plus, putting it into owserver would concern users "that
>> stupid tool fiddles with my system". Given the amount of support
>> requests we have just because of broken default configurations, I think
>> we should rather strip options from owserver et al. than adding more.
>>
>> So, make a new tool and name it owftdiprobe or so. That tool then also
>> may disturb any FTDI adaptor connected (with the proper command line
>> switch) to find out where the DS2480 is connected.
> Sounds good. I'll see what I can come up with, my idea is to make it
> interactive based on the idea Stefano put forward ("Please remove all
> devices you which to discover", "Scanning...", "Found these new devices!
> *Possibly* use them like this: xxxx"). Possibly needs to be run as root,
> since the user has probably *not* added devd-rules to set the owner.
>
> I'd say actual probing may be added later, I'm still skeptical to that
> (even though the user would actively choose which devices to probe).

So, I now have a owusbprobe, commited in ftdi branch: 
http://sourceforge.net/p/owfs/code/ci/d043952b83570ca5860018413887960a29522496/
Looks like this:

-----
$ ./module/owshell/src/c/owusbprobe
NOTE: You are running as a non-root user. Unless permissions are already 
configured
you will probably not find any devices.

Please disconnect any USB devices you which to identify.
A bus scan will then be made to create a base-line of ignored devices.

Press Enter when you are ready to proceed

Scanning USB devices...
Found 0 devices
Please reconnect one of the device you which to identify.

When you are ready to proceed, wait a few seconds.
Then press Enter

Scanning USB devices...
Found 0 devices
No new devices detect.. Re-scanning in 2s...
Scanning USB devices...
Found 1 devices
Found device:
 > Vendor ID    : 0x0403               Product ID   : 0x6001
   Manufacturer : FTDI                 Description  : FT232R USB UART
   Serial       : A900xxxxxW        Bus: 5, Addr: 2

This device is identified as a generic FTDI adapter. To address it, use 
the following adressing:

   ftd:s:0x0403:0x6001:A900xxxxxW

This MAY be a LinkUSB device. If so, you may put the following in your 
owfs.conf:

   link = ftd:s:0x0403:0x6001:A900xxxxxW

Or, if running from command line:

   --link ftd:s:0x0403:0x6001:A900xxxxxW

If NOT a LinkUSB, you have to check the documentation on how to target 
your particular device type.
For any serial type device, you should be able to use the above addressing.
------------------------------------------------------------------


If running as root, a message is printed after a match: "NOTE: You are 
running as root. You may have to configure your OS to allow your user to 
access the device. Please see owfs documentation for details."
If running with --all parameter, a non-interactive mode is activated 
which just lists all found USB devices.
If the vid/pid matches any known FTDI chip, the above will be outputted. 
If it is an exact vid/pid match for the LinkUSB, those LinkUSB specific 
rows are outputted.
If the vid/pid matches the DS2490, a similar output is emitted.
If vid/pid does not match anything known, "This device is not a known 
compatible device" is emitted.

What do you think?

Regards
Johan






------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to