Hi
I am facing a strange issue
Below is my sample code
iSerialFD = open("/dev/ttyGS0",O_RDWR | O_NONBLOCK);
if(iSerialFD < 0)
{
printf("\n Error! in Opening ttyGS0\n");
return 0;
}
else
printf("\n ttyGS0 Opened Successfully\n");
printf("I am here\n");
After performing open it is printing the ttyGS0 Opened successfully but it is not going after that statement. Kernel hangs up there.
Another strange issue is I can perform open read write of the same gadget serial port if I compile the serial program as a single C file. But when I link all the output files to single executable I am facing this problem.
Attached is the code.
Original Attachment has been moved to: SerialTesting.c.zip
Hi chandra
Looks like kernel hangs because USB gadget is not enable correctly, please make sure that your USBgadget is enable on your kernel config on Device Drivers --> USB support --> USB Gadget support --> [*] Function Filesystem (Function FS).
After reboot
# mount -t configfs none /sys/kernel/config
# cd /sys/kernel/config/
# ls usb_gadget
# cd usb_gadget
If USB Gadget configfs support is enabled we’ll have a usb_gadget subdirectory present. then try to make your tests again.
hope this helps