I've searched past content and I've been unable to find a complete answer on how to handle a "Device is busy" error message on an Analog Discover 2's.
Setup:
Raspberry Pi 4B 8GB RAM
Raspberry Pi OS 32-bit (full version -- not headless, but without monitor)
128 GB fast SD-Card
AD2 with USB connection to Raspberry Pi USB port (USB 3)
AD2 powered separately
There are three of these setups (Pi+AD2+Power+Network) operating remotely on the same network, with all communicating back to a central monitoring PC
Hardware runs 24 hours/day, 7 days a week.
AD2 is being used for:
Waveform generation for an RF emitter
ADC for incoming signals.Real-time operation.
Real-time operation
100% Python3 script running AD2, network, and processing tasks
Autostart (.desktop) launches script on bootup (due to chmod -x)
The remote locations will occasionally and unexpectedly power cycle. There is no graceful closing of software or any devices when this happens. When this occurs, the application script will autostart when power is restored and the program tries to reconnect to all devices. (This includes re-establishing network connection back at the central command station PC.) The AD2 gives the device is busy error message on all 3 setups every time -- without exception. The script that launches the AD2 is the only script initiated at startup.
I tried the attached script segment to capture errors and to attempt to timeout the condition. But it doesn't work. It will just keep looping and supply a continuous device is busy message. My patience only permitted me to watch this for 5 minutes, but I would assume it will be indefinite. You can see that much of this code comes straight out of the sample scripts that comes with installation of of the Waveform API.
Currently the fix is to just restart the program. Doing so will automatically free up the device and the script will run properly Having the customer to kill the application and restart it is not ideal. Is there a solution for this?
I suspect that perhaps this might be a previous state that is somehow stored or that the device is busy still booting itself while the script is launched. Unsure as to what may actually be happening, can someone help me? My apologizes for the novella, but I wanted to supply as much detail as possible.
Question
eradarhughes
I've searched past content and I've been unable to find a complete answer on how to handle a "Device is busy" error message on an Analog Discover 2's.
Setup:
The remote locations will occasionally and unexpectedly power cycle. There is no graceful closing of software or any devices when this happens. When this occurs, the application script will autostart when power is restored and the program tries to reconnect to all devices. (This includes re-establishing network connection back at the central command station PC.) The AD2 gives the device is busy error message on all 3 setups every time -- without exception. The script that launches the AD2 is the only script initiated at startup.
I tried the attached script segment to capture errors and to attempt to timeout the condition. But it doesn't work. It will just keep looping and supply a continuous device is busy message. My patience only permitted me to watch this for 5 minutes, but I would assume it will be indefinite. You can see that much of this code comes straight out of the sample scripts that comes with installation of of the Waveform API.
Currently the fix is to just restart the program. Doing so will automatically free up the device and the script will run properly Having the customer to kill the application and restart it is not ideal. Is there a solution for this?
I suspect that perhaps this might be a previous state that is somehow stored or that the device is busy still booting itself while the script is launched. Unsure as to what may actually be happening, can someone help me? My apologizes for the novella, but I wanted to supply as much detail as possible.
AD2 Startup Python Script
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now