in reply to Re^4: r/w attached infrared head on /dev/ttyUSB0
in thread r/w attached infrared head on /dev/ttyUSB0

Thanks for the update - it's strange, and unfortunately I'm running out of ideas at the moment... I use the IO::Termios+IO::Stty combination on a Raspberry Pi myself, running a stock Raspbian, to read multiple FTDI chips and other dataloggers at once, and it works fine. Did you compare the strace results of the shell and the Perl scripts to make sure the same thing gets sent? Are you certain there are no other processes on the system trying to open/read the port? For example, did you make sure to kill all the cat processes you backgrounded, and check for other daemons? For example, I once had trouble with gpsd trying to get to the serial port when I was trying to use it as well, or that website mentions a vzlogger process that is included as part of the image.

Replies are listed 'Best First'.
Re^6: r/w attached infrared head on /dev/ttyUSB0
by stoerti (Novice) on May 26, 2019 at 14:38 UTC
    I tried now a complete other raspberry with an older installation of raspbian.
    It is exactly the same situation.

    So I can be sure, there are no other running processes or something other what kills my script.


    I now it can be working.
    Some years ago I had this thing working, but after some years the SD card was crashed.
    And I have a backup - problem is, I don't know where...
    What I remember, I had the same problems but I made it working.

      Sorry I can't be of more assistance, other than all the debugging tips and trying to find the difference between cat+stty and Perl, I'm still out of ideas at the moment. It could possibly be related to whatever kernel driver or USB module this is - in the node I linked to, I mentioned that I discovered that I needed to set -echo for some of the adapters I was working with (specifically, an FTDI USB-COM485-PLUS4 module with a FT4232H chip). Unfortunately, the way I discovered this was with lots of experimenting and banging my head against the wall. I recall using cat+stty, minicom, and screen to talk to the virtual port until I figured out the issue with the -echo option. I can only suspect that the issue with the module you're working with might be similar, some combination of options needed to make it work. Good luck, and let us know if you have more questions or you do figure it out :-)

      Do you remember a vaguely familiar looking guy asking you about it?


      holli

      You can lead your users to water, but alas, you cannot drown them.
        no