0

I have a basic understanding of network programming but i have never had anything to do with USB ports.

This is what i am trying to achieve

I need to write a program in Java, to communicate to a device which is connected to USB port and then later send commands.

I tried terminal as follows earlier but it didn't quite work

ls -l /dev/tty.*
screen /dev/tty.usbserrial-FTYRDSX7 9600

The above didn't work out.

So if someone can just guide with what Java classes i should be looking into and if there are any APIs that should help me get started

M_J
  • 61
  • 10
  • 1
    Possible duplicate of [How to access USB ports in java](http://stackoverflow.com/questions/2121508/how-to-access-usb-ports-in-java) – Scott Sosna Mar 09 '16 at 01:41

2 Answers2

0

Unless you're required to build it from the ground up, use a library such as usb4java (also here). Trying to manage it as a block device and interpreting whatever protocols etc., etc is not worth the effort unless there something very unique to your problem.

Scott Sosna
  • 1,443
  • 1
  • 8
  • 8
  • So the module is a part of a machine, and i want to run a series of test on it, thanks for the comment – M_J Mar 09 '16 at 04:08
0

So i ended up using jssc which is much easier to use with strait forward syntax and methods

M_J
  • 61
  • 10