Ok, so I implemented a FileChannel based on OioByteChannel, and it seems to 
work reasonably well.

My only problem is that I am required to read and write in chunks of 64 
bytes from the device, and I cannot see how to influence the size of the 
ByteBuf used when reading or writing, passed to 
OioByteChannel.doReadBytes(ByteBuf) and 
OioByteChannel.doWriteBytes(ByteBuf).

Any more hints?

Thanks!

Rogan


On Monday, January 16, 2017 at 10:34:39 AM UTC+2, Rogan Dawes wrote:
>
> Hi Norman,
>
> So, I'm not really using a serial port, but rather a HID Gadget. I used 
> the serial port as an example that may be more familiar to folks, but I can 
> see I may have confused issues more than helped.
>
> My HID Gadget reads and writes 64-byte reports to the USB host on the 
> other end of the cable, and it is this that I am trying to accomplish using 
> Netty.
>
> Looking at the RXTX implementation, it seems like I need to implement a 
> new FileChannel or similar, that can read a file, and fire appropriate 
> events when the read succeeds, and similarly for writes.
>
> Thanks for the pointer!
>
> Rogan
>
>
>
>
> On Mon, Jan 16, 2017 at 10:24 AM 'Norman Maurer' via Netty discussions <
> [email protected] <javascript:>> wrote:
>
>> Not sure what exactly you are asking about but netty supports serial 
>> ports:
>>
>>
>>
>> https://github.com/netty/netty/blob/4.1/transport-rxtx/src/main/java/io/netty/channel/rxtx/package-info.java
>>
>> Bye,
>> Norman
>>
>> On 15 Jan 2017, at 05:52, Rogan Dawes <[email protected] <javascript:>> 
>> wrote:
>>
>> Hi folks,
>>
>> I'm thinking of using netty to multiplex traffic from network sockets 
>> over a character device, like a serial port. Does netty support file access 
>> in this way?
>>
>> Regards
>>
>> Rogan
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Netty discussions" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/netty/CAOYdKdg2-JdtcEmQrGwza8Ys5EE5xS3%2BH1VZAAO1WyppoyLoBA%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/netty/CAOYdKdg2-JdtcEmQrGwza8Ys5EE5xS3%2BH1VZAAO1WyppoyLoBA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Netty discussions" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/netty/50F4CDDC-D592-40FC-B6B9-056702E3275E%40googlemail.com
>>  
>> <https://groups.google.com/d/msgid/netty/50F4CDDC-D592-40FC-B6B9-056702E3275E%40googlemail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/0c4e72a8-631d-4fbb-b3c6-d838d0054ec2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to