LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-12-2021, 03:57 PM   #1
ifoundreverse
LQ Newbie
 
Registered: Aug 2021
Posts: 1

Rep: Reputation: Disabled
Serial Snatcher


Hi,

I was using bCNC today (but has also happened before whilst using UGS) when my CNC machine froze, so did bCNC. It happened a few times, all at different places in the gcode execution, so I ran bCNC from a terminal, after it froze again and eventually returned output (I didn't copy it, but will next time) it looked like the python script erred out because it lost its handle to the serial device it was using (/dev/usb0). On restarting after a crash, the handle to the device is still there and another device had been used, and so on until after a restart.


- How do I track down what else may be taking over the serial device?
- What logs should I be looking at?

- Do I remember something about being able to assign a priority when starting an application, if so how?

... I'm currently using a Fedora 32 desktop for this task...


Many thanks
 
Old 08-14-2021, 02:15 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,511

Rep: Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377
Hello, ifoundreverse, & welcome to LQ.

I gather something of yours uses CNC - not much more. Have a read of this:How_To_Ask_a_Question

Post again, give us details of everything. Is this an old Industrial PC or some usb-serial conversion? If a program doesn't exit, it doesn't release the serial port. It may still be running and hogging resources. But I can't see what you have, and I don't know what it is. You have to tell me
 
Old 08-14-2021, 02:51 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,813

Rep: Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003
Quote:
Originally Posted by ifoundreverse View Post
Hi,
I was using bCNC today (but has also happened before whilst using UGS) when my CNC machine froze, so did bCNC. It happened a few times, all at different places in the gcode execution, so I ran bCNC from a terminal, after it froze again and eventually returned output (I didn't copy it, but will next time) it looked like the python script erred out because it lost its handle to the serial device it was using (/dev/usb0). On restarting after a crash, the handle to the device is still there and another device had been used, and so on until after a restart.

- How do I track down what else may be taking over the serial device?
- What logs should I be looking at?
- Do I remember something about being able to assign a priority when starting an application, if so how?

... I'm currently using a Fedora 32 desktop for this task...
I would start with looking at the system logs for Fedora when this problem occurs. Running "journalctl -xe" may give you something, but as business_kid says, without an actual error message it's hard to say anything useful. If you suspect something else is grabbing the serial device, you can install and run minicom, and leave that terminal window open for a while, and see if it drops. Is there any pattern to this? Does it happen after xxx minutes every time, or a certain number of instructions?

You also say /dev/usb0....are you using a USB to serial device? If so, check for (and use if present), the /dev/ttyUSB0 device instead. The direct USB device may be getting confused if the USB bus refreshes (new device plugged in? Device removed?), and the USB-to-Serial driver may be more solid.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi serial card, setserial cannot set serial hua Linux - Hardware 1 06-11-2008 04:59 AM
Using USB<->Serial and serial gender changer to transmit data between computers JoeyAdams Linux - Hardware 4 04-17-2008 05:15 AM
RH doesn't detect my Serial modem connected to a PCI Serial card ricky_ds Linux - Hardware 1 08-17-2006 02:37 PM
USB to Serial Converter on Serial Modem bongski55 Linux - General 3 08-29-2005 10:04 AM
zoom external serial with usb to serial adapter foustware Linux - Hardware 1 12-07-2003 02:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration