BeagleBone Black UART not working

I have a BeagleBone Black running Debian 9.9 2019-08-03 4GB SD IoT (https://beagleboard.org/latest-images). I want to integrate it with Sim900a GSM module. But I can’t get the UART working. I’ve connected the pins P9.24 (UART1 TX) to RX of the module, P9.26 (UART1 RX) to TX of the module, and P9.2 (DGND) to Gnd of the module. Also I’ve configured the pins to work as UART by using sudo config-pin P9.24 uart

I’ve tried other UARTs also but no luck. Any help please ?

Let's see what's going on, please run and share the output of:

sudo /opt/scripts/tools/version.sh

Regards,

Well... I suspect my first step would be to put an oscilloscope (or, if
low enough baud rate, just some LED) on the Tx lead to see if anything is
going out. Or even just a loop-back (jumper Tx to Rx, send some short
string and see if the same string is received; I say "short" as you may
need to ensure the reads interleave before any buffer overflows).

  Second concern... Based upon
https://www.instructables.com/id/GSM-SIM900A-With-Arduino/ the module
operates on 5V. The BBB is 3.3V device! If the module is putting out a 5V
swing on its Tx you've a good chance of damaging the BBB Rx inputs (and
conversely, the module may not be seeing any changes on its Rx). NOTE: if
the module uses a pull-up to 5V on its Rx, you could be damaging the BBB Tx
lines.
  HOWEVER, further down (Step 3 of the link) they mention "3VR, 3VT, 5Vr,
5VT, VCC and GND". That may indicate the module has both 5V and 3V pins.
You MUST use the 3V pins with the BBB.

  What power supply are you providing to the module. You still need a 5V
supply to the module.

You also have to config-pin P9.26 uart. If not that, could be you swapped tx and rx, common serial problem.

J

Hi Robert,
The response of the command is as follows:

git:/opt/scripts/:[109f74fb87e6034ae1a8971a244064a8d5e090a5]
eeprom:[A335BNLT00C00319BBBK18F4]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Image 2019-08-03]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2019.04-00002-gbb4af0f50f]:[location: dd MBR]
kernel:[4.14.108-ti-r113]
nodejs:[v6.17.0]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade ]
pkg:[bb-cape-overlays]:[4.4.20190801.0-0rcnee0~stretch+20190801]
pkg:[bb-wl18xx-firmware]:[1.20190227.1-0rcnee0~stretch+20190227]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[librobotcontrol]:[1.0.4-git20190227.1-0rcnee0~stretch+20190327]
pkg:[firmware-ti-connectivity]:[20180825+dfsg-1rcnee1~stretch+20181217]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal i2c bluetooth netdev gpio pwm eqep remoteproc admin spi tisdk weston-launch xenomai cloud9ide]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 rng_core.default_quality=100 quiet]
dmesg | grep remote
[ 1.256859] remoteproc remoteproc0: wkup_m3 is available
[ 1.473060] remoteproc remoteproc0: powering up wkup_m3
[ 1.473175] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217168
[ 1.477372] remoteproc remoteproc0: remote processor wkup_m3 is now up
[ 9.959628] remoteproc remoteproc1: 4a334000.pru is available
[ 9.963666] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pru
[ 9.930787] pruss 4a300000.pruss: creating PRU cores and other child platform devices
[ 9.959628] remoteproc remoteproc1: 4a334000.pru is available
[ 9.959755] pru-rproc 4a334000.pru: PRU rproc node /ocp/pruss_soc_bus@4a326004/pruss@0/pru@34000 probed successfully
[ 9.963666] remoteproc remoteproc2: 4a338000.pru is available
[ 9.963786] pru-rproc 4a338000.pru: PRU rproc node /ocp/pruss_soc_bus@4a326004/pruss@0/pru@38000 probed successfully
dmesg | grep pinctrl-single
[ 0.943274] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[ 0.955294] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END

Can you check on pc terminal by sending sigle charater from beagle bone UART using serial to usb converter. That will help you to check uart testing.

In your version.sh output I don’t see the UART 1 enabled. Add the BB-UART1-00A0.dtbo to the uEnv.txt as shown below to enable it.

uboot_overlay_addr0=/lib/firmware/BB-UART1-00A0.dtbo

Then reset the device and should work. To test it, hook up a scope and send some characters via the terminal as shown here.

"using serial to usb converter"… better make sure that is a TTL serial
to USB converter.

If you plug the business end of a RS-232 to USB converter in to your
BeagleBoard, you will release magic smoke.

Can you check on pc terminal by sending sigle charater from beagle bone UART using serial to usb converter.

"using serial to usb converter"… better make sure that is a TTL serial
to USB converter.

  That may not be sufficient... It needs to be 3.3V vs 5V

If you plug the business end of a RS-232 to USB converter in to your
BeagleBoard, you will release magic smoke.

  Yeah... No promises for +/- 12V

I didn’t have to do this on the 9.9 2019-08-03 image or the 9.11 2019-11-02 image. I enabled the TX and RX pins for UART 1 with:

config-pin P9.24 uart

config-pin P9.26 uart

I was able to send to and receive from an RS232 device using a MAX232 module, using screen and regular file output redirection.

Screen Shot 2019-11-10 at 2.51.52 AM.png