Recently I updated (flashed) my Debian version from 2015-11-12 to Debian 2017-01-22. The hw rest unchanged: BBB, 4D systems display and a universal board only to interface a simple N8M GPS receiver. I have a very simple Python script to read UART2 connected to the GPS receiver and show some lines of NMEA. In the old Debian version this (and my other applications) work good. At first the display did not work either, but I found I had to uncomment a line in uEnv.txt. The gui apparently has been changed… So far so good. I also did: sudo apt-get update and installed Adafruit and pyserial, if necessary. Now my old script does not work anymore. It leaves me with error; Errno 2: could not open port /dev/ttyO2. No such file or directory. Do I miss something here? What else do I need to do?
Please advise.
Thanks in advance,
Harke
On Sun, 29 Jan 2017 03:17:51 -0800 (PST), Harke Smits
<yrrah53@gmail.com> declaimed the following:
pyserial, if necessary. Now my old script does not work anymore. It leaves
me with error; Errno 2: could not open port /dev/ttyO2. No such file or
directory. Do I miss something here? What else do I need to do?
Well, first thing: do you HAVE a ttyO2 in /dev? I don't -- using a
"Wheezy" image from last summer, I'll dig up the SD card with "Jessie" in a
moment... (apologies for the bad wrapping)
Interesting -- Jessie (from last fall) shows both ttyO0/1/2/4 AND
ttyS0/1/2/3/4/5
debian@beaglebone:~$ ls -l /dev/ttyO*
lrwxrwxrwx 1 root root 5 Dec 10 12:31 /dev/ttyO0 -> ttyS0
lrwxrwxrwx 1 root root 5 Jan 29 10:57 /dev/ttyO1 -> ttyS1
lrwxrwxrwx 1 root root 5 Jan 29 10:57 /dev/ttyO2 -> ttyS2
lrwxrwxrwx 1 root root 5 Jan 29 10:57 /dev/ttyO4 -> ttyS4
debian@beaglebone:~$ ls -l /dev/ttyS*
crw--w---- 1 root tty 4, 64 Dec 10 12:32 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 Jan 29 10:57 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 Jan 29 10:57 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 Dec 10 12:32 /dev/ttyS3
crw-rw---- 1 root dialout 4, 68 Jan 29 10:57 /dev/ttyS4
crw-rw---- 1 root dialout 4, 69 Dec 10 12:32 /dev/ttyS5
Though the ttyO* are just links to the ttyS*
Maybe in a month or so I'll have time to flash the eMMC up to Jessie,
and set the SD cards to newer releases. (I prefer to keep the eMMC on an
older working config)
That is a very relevant reaction! Thanks a lot! Now I have to find out what port is connected with UART 2 (and others I need…). I found ttyO0 and ttyO3 working, i.e. no errors reported. But also no idea to what UART they are connected. Definitely not UART2, I am using.
Apart from the fact that I cannot believe that someone deliberately messed up with the serial ports… Compatibility with earlier scripts is completely gone!
Can anyone supply me with the altest UART mapping? Or better yet: re-install the old mapping?
Cheers!
Harke
Thanks for your reaction. I understand /dev/ttyOx has been replaced by /dev/ttySx (x from 0-5). However the rest is far beyond my level of skill. I do not know what dt overlay I load. I just flashed the latest Debian version. And then updated all (sudo apt-get update). I do not understand C, just a bit of Python. I need to use the UARTs 2 and 4. and of course a number of I/O bits. I hope that is still the same? I can and are prepared to move to the latest versions, just need to know what to do…
Regards,
Harke
Now it works. I modified uEnv.txt at two places; one for the display to work end another for the UART’s to work.
Back to the application.
Regards,
Harke