Re: Question re hiddev

Gene Heskett <[email protected]>
Newsgroups gmane.linux.usb.devel
Organization Organization? Not detectable
Message-ID <[email protected]>
On Saturday 10 March 2007, Jiri Kosina wrote:
>On Sat, 10 Mar 2007, Gene Heskett wrote:
>> >So these broken programs think that while talking to hiddev device,
>> > they are in fact receiving data from serial port, right?
>>
>> I believe that to be the case, this code is very old and moldy.
>
>That's quite sad. In fact, it would quite surprise me if that would work
> - i.e. I am not sure whether the data that the application will obtain
> from hiddev will have the same format that it is expecting to obtain
> from serial port of the UPS. Or do you think/experience different?
>
>> Its proprietary code, supplied by Belkin, either on their web page, or
>> on the cd that comes with it.  No src's available, but I am beating on
>> their tech support on a daily basis, but I'm not getting through to
>> anybody who can do a 2*2 and get 4.  The answers I'm getting seem to
>> indicate they are only getting 3, even for very large values of 2. :)
>>
>:)
>:
>> There is a rather huge case statement in hiddev.c.  Is it possible to
>> expand this even further so that these illegal ioctls are acked with a
>> return 0, making this old moldy code happy in thinking its talking to
>> a uart based serial port when it tries to set the baud rates and such?
>
>This looks very dirty to me, to be frank. I don't like the idea of
> writing mess into the ioctl() handler just because of one application
> being horribly broken.
>
>I think there is alternative for you that can be done completely in
>userland, without seeding mess into the kernel driver - do you think it
>would be feasible that you create a trivial and small library, that
> would return 0 for those braindamaged ioctl() calls that your userland
> application is ussing, and will call the standard ioctl() when it is
> valid? This can be achieved trivially by LD_PRELOADing this library to
> the application.
>
>It is not nice either, but at least avoids putting mess into the kernel.
>
>Please let me know,

I'm not up to writing a library. 15 years ago maybe, before the wet ram 
started to fade (I'm 72 now), I was pretty good with the 8 bit machines 
and wrote code & built boards in 1980 for an 1802 machine that was used 
till the later 90's, and repeated that in 1989 which we used till 2002, 
but linux is a whole new concept even if I have been running it since 
rh5.1 days.

Are you aware of something that might serve as a starting framework to be 
hacked into doing this? 

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Paul's Law:
	You can't fall off the floor.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.