Forum: ARM programming with GCC/GNU tools programing to read USB-GPS for SBC2440-IV Single Board Computer

von Luu M. (Company: MEMSLAB) (kennyha85)

Rate this post
0 useful
not useful
I have an USB-GPS receiver (Haicom 204E) and a SBC2440-IV Single Board
Computer. I have written a C program to read my GPS receiver on Unbutu
8.10 for testing. It has worked well. On my PC, I have created a file
asserted for usb port by using command " $ sudo mknod /dev/ttyUSB0 c 188
0". so I"ve treated my device as a file named "/dev/ttyUSB0".

However, on SBC2440-IV Single Board Computer, when I plug the GPS 
in the USB host port1, I see a message on the terminal: 
usb 1-1: new full speed USB device using s3c2410-ohci and address 2". 
I create /dev/ttyUSB0 file by using command "$ mknod /dev/ttyUSB0 c 188
0". I see a file "ttyUSB0" in root/dev folder, but I can"t open it like 
way on Unbutu. It"s seem to be that /dev/ttyUSB0 is not asserted for the 
USB host1.

Could someone help me to read the GPS receiver on SBC2440-IV Single 
this is my C code to read the file.
int main(void)


int status,n;

char *port = "/dev/ttyUSB0";

printf("GPS receiver\n");

open_port (port);

pthread_create(&GPS_READ_ID, NULL, GPSreceiver, 0);
pthread_create(&GPS_SHOW_ID, NULL, GPSshow, 0);



/* close the device file */



void open_port(char *port)


/* open the serial port device file

* O_NDELAY - tells port to operate and ignore the DCD line

* O_NOCTTY - this process is not to become the controlling

* process for the port. The driver will not send

* this process signals due to keyboard aborts, etc.

* O_NONBLOCK- tells port to be nonblocking (read will return immediatly)


GPS_handle = open(port, O_RDWR | O_NDELAY | O_NOCTTY | O_NONBLOCK);

if (GPS_handle == -1)


perror("open_port: Unable to open");




tcgetattr(GPS_handle, &tio);

fcntl(GPS_handle, F_SETOWN, getpid());

fcntl(GPS_handle, F_SETFL, FASYNC);
USB GPS Haicom204E is a device which has USB output port; baud-rate 
NMEA108 standard.
My problem is that I don"t know how to make the file asserted for USB 
hostport1 of
SBC2440-IV Single Board Computer.


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.