home bbs files messages ]

Just a sample of the Echomail archive

<< oldest | < older | list | newer > | newest >> ]

 Message 21619 
 Theo to All 
 Re: Javascript restriction in Trixie 
 09 Dec 25 11:21:24 
 
MSGID: <4bm*ngGtA@news.chiark.greenend.org.uk> f2e2c7c5
REPLY: <6bm*d+FtA@news.chiark.greenend.org.uk> c06f328e
PID: PyGate 1.5.2
TID: PyGate/Linux 1.5.2
CHRS: ASCII 1
TZUTC: 0000
REPLYADDR theom+news@chiark.greenend.org.uk
REPLYTO 3:633/10 UUCP
Theo  wrote:
> bp@www.zefox.net wrote:
> > [apologies for the wide lines]
> > 
> > Theo  wrote:
> > > 
> > > Depending on what kind of device it appears as (serial, keyboard, mass
> > > storage, network, ...) see if you can work out what other app might have
> > > grabbed it.  ('sudo lsof' is handy here, if it appears as a device node
that
> > > you can grep for)
> > 
> > Sudo lsof is loquatious, but not obviously informative. These tests were
> > on a Pi5 running up-to-date Bookworm, but the behavior is outwardly the
> > same as Trixie on Pi2.
> 
> What I'm looking for is something having grabbed the USB device. This is
> hard to specify without knowing how the OWON does its USB, but for example
> if it was serial I'd 'lsof | grep /dev/tty' and look for things using the
> /dev/ttyUSB0 or /devttyACM0 device the OWON probably uses.
> 
> Since the OWON app has failed to grab the USB you're looking for other apps
> that have grabbed it, ie not at the OWON app.

Another debugging trick is to run your app under strace:

strace -ft -o strace.log 

That outputs a huge logfile which takes a bit of picking through.  What
you're looking for is when it tries to access the USB nodes and fails. 
Maybe that gives some clues as to where the error is coming from.

eg 
strace -ft -o strace.log picocom /dev/ttyUSB0

has a lot of stuff but it says:

15875 11:16:22 openat(AT_FDCWD, "/dev/ttyUSB0", O_RDWR|O_NOCTTY|O_NONBLOCK)
= -1 ENOENT (No such file or directory)
15875 11:16:22 write(2, "\r\nFATAL: ", 9) = 9
15875 11:16:22 write(2, "cannot open /dev/ttyUSB0: No suc"..., 51) = 51
15875 11:16:22 write(2, "\r\n", 2)      = 2
15875 11:16:22 exit_group(1)            = ?
15875 11:16:22 +++ exited with 1 +++

which tells me it couldn't open the /dev/ttyUSB0 device because it doesn't
exist, and then puts a FATAL message on the console.  This error is correct
because I have no USB serial devices plugged into this machine.

Theo

--- PyGate Linux v1.5.2
 * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
SEEN-BY: 105/81 106/201 128/187 129/14 305 153/7715 154/110 218/700
SEEN-BY: 226/30 227/114 229/110 112 134 200 206 275 300 317 400 426
SEEN-BY: 229/428 470 616 664 700 705 266/512 291/111 292/854 320/219
SEEN-BY: 322/757 342/200 396/45 460/58 633/10 280 414 418 420 422
SEEN-BY: 633/509 2744 712/848 770/1 902/26 2320/105 5020/400 5075/35
PATH: 633/10 280 229/426


<< oldest | < older | list | newer > | newest >> ]

(c) 1994,  bbs@darkrealms.ca