GPS demo error

Hello, I was trying the GPS DEMO on my ConnectPort X8.
After some seconds after I started it with
#> py, it complains an error about the serial port:

OSError: [Errno 16] Device or resource busy: ‘/COM/0’

and exits.
Note that nothing is attached to the serial port, and it has no profile assigned. What makes the port busy ?

The first debugging technique for serial contention is to execute the “who” command on the command line (there is a Web UI equivalent, but it is clear that the CLI is a reasonable choice in your case).

You should find an “owner” of the serial port there.

I suspect that the “owner” is the serial console (terminal) functionality. If so, use the “set term state=off” command to disable the default console behavior. That service will not reclaim the serial port after a reboot.

Most of the time, you can issue a “kill” command with the connection identifier from the “who” listing to force a “terminal” application to release the serial port (so long as the “set term” state is off), if you want to try a test without rebooting.

Thank you, I killed the “serial 1” # 1 thread that was running, with the command
#> kill 1
and then I started successfully the GPS demo.
It is all ok … also I stopped the app by accessing port 8081 with my browser:
a useful technique !

I am pleased that you can continue in your efforts.

Be aware that the CLI “kill” command and its analogue in the webUI are not magic bullets. The operating system does not provide the flexibility to allow any task to be interrupted at an arbitrary moment. That’s the reason that I mentioned the possible need to reboot.

The only foolproof method is “disable service, reboot”, of course.