NXC communication through USB

518 Views Asked by At

How would you send data through the USB port and receive the data in my Linux machine?

task main ()
{
byte data[2] = {1,2};
while (1)
{
  Wait(1000);
  SetUSBOutputBuffer(0, 2, data);
}
}

Compiled it with:

nbc -d -Z2 usb.nxc  

dmesg:

usb 2-1.2: reset full-speed USB device number 6 using ehci_hcd

Now how do I get the "data" what was sent by the NXT?How would I write a Linux program in C that would read the USB buffer?

1

There are 1 best solutions below

0
On

The Fantom SDK doesn't support Linux. Instead, use libnxt. The one in the Debian repositories is still being maintained.