Can't make UART work with Python and AdaFruitBBB

I follow instructions here

https://github.com/adafruit/adafruit-beaglebone-io-python

and here

https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/uart

but can’t make any communication goes through UART1 .
Instead of using /dev/tty01 I use /dev/tty1 which were on my system.

Is there something missing in that post?

What more can I do ?

I tried easiest installation on Angstrom.
I use UART1 with loop back
I use a osciloscope to check signals in pin P9-24

This is the python programa I use to test port

I follow instructions here

GitHub - adafruit/adafruit-beaglebone-io-python: Adafruit's BeagleBone IO Python Library

and here

UART | Setting up IO Python Library on BeagleBone Black | Adafruit Learning System

but can't make any communication goes through UART1 .
Instead of using /dev/tty01 I use /dev/tty1 which were on my system.

/dev/tty1 is a virtual terminal (ctrl-alt-f1) will switch you to it.

Is there something missing in that post?
What more can I do ?

Load the uart1 overlay

Regards,

/dev/tty1 is a console device *NOT* a serial device.

Mike

Well,
that was one problem.

After searching in this forum I discover that I could use /dev/ttyO1

So I use

dmesg |grep serial

and

cat /proc/tty/driver/OMAP-SERIAL

to confirm that.

cat /proc/tty/driver/OMAP-SERIAL

serinfo:1.0 driver revision:
0: uart:OMAP UART0 mmio:0x44E09000 irq:88 tx:558 rx:0 RTS|CTS|DTR|DSR
1: uart:OMAP UART1 mmio:0x48022000 irq:89 tx:75 rx:37 brk:1 CTS|DSR|CD|RI

dmesg |grep serial

[ 0.210444] omap_uart 44e09000.serial: did not get pins for uart0 error: -19
[ 0.210719] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 88) is a OMAP UART0
[ 5.035048] gserial_setup: registered 1 ttyGS* device
[ 1763.473407] 48022000.serial: ttyO1 at MMIO 0x48022000 (irq = 89) is a OMAP UART1

But now I have other doubts.

Why there are only 2 serials ?
How can we access other if they aren’t mapped /dev/tty??

[]'s

because you only loaded two..

Add this to your u-boot bootargs and you'll get a few more:

capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART4

(depending on factory v3.8.x kernel)

Regards,

Thanks Robert !!!

Hi Again

I try this configuration on /boot/uEnv.txt
optargs=capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART4

but it doesn’t work.

The only way I could do this, is by using this command

echo BB-UART2 > /sys/devices/bone_capemgr.*/slots

Can someone explain me why ?

probally the wrong "uEnv.txt"

dmesg | grep console

would prove that

Regards,

You are right.

root@beaglebone1:~# dmesg |grep console
[ 0.000000] Kernel command line: console=ttyO0,115200n8 quiet drm.debug=7 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait
[ 0.222807] console [ttyO0] enabled

but I can’t found another uEnv.txt in Angstrom system.
So I probably will have to generate one that’s correct ?

These are the things people had to do when they will use UART in their systems?
I believe that we could have a more “prepared” system for development :wink:

Anyway I’ll try to look what can i do here

Thank you all you help Robert

Cláudio B.

I don’t understand your complaint.

If you’re using the Adafruit BBIO library, it creates the necessary UART devices in the device tree on the fly (by placing its own ADAFRUIT-UART files in /lib/firmware and writing to /sys/devices/bone_capmgr.*/slots).

So it really is pretty easy to use – it’s designed for non-tech types to get maker projects running on the BBB. Surprised you asked over here rather than in the more-relevant Adafruit forum on BBIO.

Hi Michael,

This is my first time developing with beaglebone black.
Even though I knew python, I never used ADAFruit library.

So I ask here because of lack of understanding on both things.

I’ll try again when have more time,
but so far, I need to use this hacks to enable UART
because I’ll use them with JAVA, and the python code I used was just a test to check UART hardware.

I have GPRS modem for PIC microcontroller. Can I used same gprs modem for BBB?

@palaniyappan

You can if you use the same protocol developed in BBB.

Thank you sir… I have WiFi dongle used to my computer.Can I used same wifi usb dongle for BBB? Because of I tried But It did not connect. How to connect WIFI usb for my BBB?

palaniyappan.R

If that WIFI USB dongle have a driver for BBB , yes.

Otherwise you’ll have to search for driver.
Once you found it, try load with # modprobe

I didn’t use this, but in this forum has a lot of info on that.

regards,

Thank you for your answer sir…
I have been developing IoT home automation using beaglebone black with controlling by using android app. I have been using python and I got library file such as PWM,ADC,GPIO,UART,EMAIL but I didn’t get android app library… How to include android app ? Could you help me?

I’m not that skilled on Android.

But if I understand what you said, you can’t put an Android APP to run inside BBB, at most you could use HTTP communications with it.

You are running a BBB with Linux or Android ?

I have been running BBB with linux

you can’t run a Android App on Linux directly.

You’ll have to find another way

BBB could be a “server” for you Android App.