Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

RS232 Cape on BBB not working

1,735 views
Skip to first unread message

eskimobob

unread,
May 23, 2013, 5:40:10 PM5/23/13
to beagl...@googlegroups.com
I have a BBB and both LCD3 and RS232 capes. I have set LCD3 cape to slot0 and RS232 caps to slot 1 with the DIP switches.
The LCD3 works perfectly but I cannot get anything from the RS232 cape.
They both seem to be found - if I look at dmesg I can see:

[ 0.271366] bone-capemgr bone_capemgr.9: slot #0: 'BeagleBone LCD3 CAPE,00A2,Beagleboardtoys,BB-BONE-LCD3-01'
[ 0.295560] bone-capemgr bone_capemgr.9: slot #1: 'BeagleBone RS232 CAPE,00A1,Beagleboardtoys,BB-BONE-SERL-03'
[ 0.325646] bone-capemgr bone_capemgr.9: slot #2: No cape found
[ 0.362754] bone-capemgr bone_capemgr.9: slot #3: No cape found
[ 0.369007] bone-capemgr bone_capemgr.9: slot #4: specific override
[ 0.369049] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 4
[ 0.369078] bone-capemgr bone_capemgr.9: slot #4: 'Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G'
[ 0.369209] bone-capemgr bone_capemgr.9: slot #5: specific override
[ 0.369245] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 5
[ 0.369273] bone-capemgr bone_capemgr.9: slot #5: 'Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI'
[ 0.369783] bone-capemgr bone_capemgr.9: loader: before slot-0 BB-BONE-LCD3-01:00A2 (prio 0)
[ 0.369811] bone-capemgr bone_capemgr.9: loader: check slot-0 BB-BONE-LCD3-01:00A2 (prio 0)
[ 0.369937] bone-capemgr bone_capemgr.9: loader: before slot-1 BB-BONE-SERL-03:00A1 (prio 0)
[ 0.369961] bone-capemgr bone_capemgr.9: loader: check slot-1 BB-BONE-SERL-03:00A1 (prio 0)
[ 0.370091] bone-capemgr bone_capemgr.9: loader: before slot-4 BB-BONE-EMMC-2G:00A0 (prio 1)
[ 0.370116] bone-capemgr bone_capemgr.9: loader: check slot-4 BB-BONE-EMMC-2G:00A0 (prio 1)
[ 0.370176] bone-capemgr bone_capemgr.9: initialized OK.

a bit further down I see:

[ 0.374590] bone-capemgr bone_capemgr.9: loader: after slot-1 BB-BONE-SERL-03:00A1 (prio 0)
[ 0.374626] bone-capemgr bone_capemgr.9: slot #1: Requesting part number/version based 'BB-BONE-SERL-03-00A1.dtbo
[ 0.374656] bone-capemgr bone_capemgr.9: slot #1: Requesting firmware 'BB-BONE-SERL-03-00A1.dtbo' for board-name 'BeagleBone RS232 CAPE', version '00A1'

I don't then see anything for quite a few lines before finding:

[ 3.605864] bone-capemgr bone_capemgr.9: failed to load firmware 'BB-BONE-SERL-03-00A1.dtbo'
[ 3.614780] bone-capemgr bone_capemgr.9: loader: done slot-1 BB-BONE-SERL-03:00A1 (prio 0)

so for some reason it can't find the firmware required.
I've checked in the compatibility list for capes and it says that rs232 cape is compatible.

I've also tried following this suggestion (Enable serial/UART/tty on BeagleBone Black) but that fails at the point marked "Then enable the overlay:".

I'm running:
Linux beaglebone 3.8.11 #1 SMP Wed May 8 07:34:27 CEST 2013 armv7l GNU/Linux

Does anyone know how I can get the RS232 cape working?

David Anders

unread,
May 23, 2013, 6:16:32 PM5/23/13
to beagl...@googlegroups.com

We are working on the software support for the rs-232 cape to be used with the BeagleBone Black. For cape compatibility please visit

http://www.elinux.org/BeagleBone_Black_Capes

As soon as the support is ready it will be posted on BeagleBoardToys wiki.

eskimobob

unread,
May 24, 2013, 2:33:20 AM5/24/13
to beagl...@googlegroups.com
On Thursday, 23 May 2013 23:16:32 UTC+1, David Anders wrote:

We are working on the software support for the rs-232 cape to be used with the BeagleBone Black. For cape compatibility please visit


Ah thank you David, I misunderstood before and thought it was already compatible - got it now.   What a shame :(
Is there anything I can do to help?

eskimobob

unread,
May 24, 2013, 2:02:38 PM5/24/13
to beagl...@googlegroups.com
Not wishing to sit on my hands and just wait, I've gone back to the instructions found here (Enable serial/UART/tty on BeagleBone Black) and tried again realising my previous mistake was using a lower case "o" instead of a zero in one of the command lines.  I've had more success and think I am almost there.

I started by creating the file BB-BONE-SERL.dts (see instructions above) but changed from uart5 to uart1 where required in the code.
I then compiled to a .dtbo file using:

dtc -O dtb -o BB-BONE-SERL-03-00A1.dtbo -b 0 -@ BB-BONE-SERL.dts

Notice the 00A1 rather than the 00A0 as specified in the instructions. The reason for this is that my RS232 cape has 00A1 specified in the EEPROM so it looks for firmware to suit that.

then after copying to the firmware directory with

cp BB-BONE-SERL-03-00A1.dtbo /lib/firmware/

I rebooted and since the cape is auto detected, the cape manager can find and load the new firmware.
So now after boot, dmesg shows it is loaded:

[ 3.317911] bone-capemgr bone_capemgr.9: slot #1: dtbo 'BB-BONE-SERL-03-00A1.dtbo' loaded; converting to live tree
[ 3.318113] bone-capemgr bone_capemgr.9: slot #1: #3 overlays
[ 3.318922] bone-capemgr bone_capemgr.9: slot #1: Applied #3 overlays.
[ 3.318943] bone-capemgr bone_capemgr.9: loader: done slot-1 BB-BONE-SERL-03:00A1 (prio 0)

and if I do
cat /sys/devices/bone_capemgr.9/slots
I get

0: 54:P---L BeagleBone LCD3 CAPE,00A2,Beagleboardtoys,BB-BONE-LCD3-01
1: 55:P---L BeagleBone RS232 CAPE,00A1,Beagleboardtoys,BB-BONE-SERL-03
2: 56:PF---
3: 57:PF---
4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI

Which confirms it is in slot 1

and if I then do:

cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pingroups

I get:

group: pinctrl_uart1_pins
pin 96 (44e10980)
pin 97 (44e10984)

Which as far as I can tell is correct.

I moved the jumpers on the cape to UART1 position and checked that /dev/ttyO0 exists but when I write to ttyO0 I get no serial output:

echo hello > /dev/ttyO0

and when I read from ttyO0, I see nothing despite sending chars in from the PC

cat /dev/ttyO0

So I have not got something quite right - if anyone can offer any pointers as to where I am going wrong, that would be very much appreciated :-)

Micka

unread,
May 24, 2013, 7:43:26 PM5/24/13
to beagl...@googlegroups.com
Hey,

I've the same problem as u,

I looked at the dmesg log :


[41854.512676] bone-capemgr bone_capemgr.8: part_number 'enable-uart5', version 'N/A'
[41854.512844] bone-capemgr bone_capemgr.8: slot #6: generic override
[41854.512893] bone-capemgr bone_capemgr.8: bone: Using override eeprom data at slot 6
[41854.512944] bone-capemgr bone_capemgr.8: slot #6: 'Override Board Name,00A0,Override Manuf,enable-uart5'
[41854.513244] bone-capemgr bone_capemgr.8: slot #6: Requesting part number/version based 'enable-uart5-00A0.dtbo
[41854.513297] bone-capemgr bone_capemgr.8: slot #6: Requesting firmware 'enable-uart5-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[41854.518086] bone-capemgr bone_capemgr.8: slot #6: dtbo 'enable-uart5-00A0.dtbo' loaded; converting to live tree
[41854.518545] bone-capemgr bone_capemgr.8: slot #6: #3 overlays
[41854.522759] omap_uart 481a8000.serial: did not get pins for uart4 error: -19
[41854.526040] 481a8000.serial: ttyO4 at MMIO 0x481a8000 (irq = 61) is a OMAP UART4
[41854.531592] bone-capemgr bone_capemgr.8: slot #6: Applied #3 overlays.


Maybe it explains, why it doesn't works .....


Mick,


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

KurtE

unread,
May 24, 2013, 9:08:58 PM5/24/13
to beagl...@googlegroups.com


On Friday, May 24, 2013 11:02:38 AM UTC-7, eskimobob wrote:

cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pingroups

I get:

group: pinctrl_uart1_pins
pin 96 (44e10980)
pin 97 (44e10984)

Which as far as I can tell is correct.

I moved the jumpers on the cape to UART1 position and checked that /dev/ttyO0 exists but when I write to ttyO0 I get no serial output:

echo hello > /dev/ttyO0

and when I read from ttyO0, I see nothing despite sending chars in from the PC

cat /dev/ttyO0

So I have not got something quite right - if anyone can offer any pointers as to where I am going wrong, that would be very much appreciated :-)
From what I learned on a different thread, I was able to setup virtual capes that allowed me to hook up an XBee and a Roboclaw to two of the Uarts that are exposed on the expansion cables.  Looking at the above, the pins that were exposed are used to create /dev/ttyO1.  I believe /dev/ttyO0 is used for the console and have the pins that connect up to an FTDI 3.3v cable.

Warning I am not a Linux expert... Just learning as I go.
Kurt

eskimobob

unread,
May 25, 2013, 3:04:04 AM5/25/13
to beagl...@googlegroups.com
On Saturday, 25 May 2013 00:43:26 UTC+1, Mickae1 wrote:
I've the same problem as u,
[41854.522759] omap_uart 481a8000.serial: did not get pins for uart4 error: -19
[Maybe it explains, why it doesn't works .....

Hi Mick,
Your problem is slightly different - I do not get that message. Originally when I followed the instructions I got something like that but guessed that the pins for uart4 were already allocated therefore I decided instead to use uart1 and when I did that, I no longer received that message. Have a go yourself and see if you find the same.

I did realise late last night that I had got the MODEs wrong for using uart1.  The instructions are written for using uart4 and they set the MODE for the pins to MODE6 which for those pins selects (uart4_rxd_mux2) and (uart4_txd_mux2) therefore I changed the MODEs to be 0x20 and 0x00 (i.e. MODE0) which for uart1 means it selects (uart1_rxd) and (uart1_txd) respectively.  Sadly even with the correct MODEs, it still refuses to work.

On Saturday, 25 May 2013 02:08:58 UTC+1, KurtE wrote:
From what I learned on a different thread, I was able to setup virtual capes that allowed me to hook up an XBee and a Roboclaw to two of the Uarts that are exposed on the expansion cables.  Looking at the above, the pins that were exposed are used to create /dev/ttyO1.  I believe /dev/ttyO0 is used for the console and have the pins that connect up to an FTDI 3.3v cable

Thanks Kurt, I was under the impression that the serial device which is created is numbered according to the uart number being used but is zero based - i.e. for uart5, you get ttyO4 hence my reason for using ttyO0 since I am using uart1.  I certainly only see ttyO0 created, not ttyO1.  I think that the console is actually on tty0 (notice no O) but happy to learn otherwise if that is wrong.

Thanks for the suggestions though, keep 'em comming ;-)

eskimobob

unread,
May 25, 2013, 3:38:54 AM5/25/13
to beagl...@googlegroups.com
<jumping for joy>    It's working!   </jumping for joy>

Following up on Kurt's suggestion, I changed the overlay fragment so that it forces it to create ttyO1 instead and with that change and the right mode selection, the RS232 cape is now working!     I'll write up and post my full code and instructions shortly - got to get a coffee first :-)

eskimobob

unread,
May 25, 2013, 10:18:36 AM5/25/13
to beagl...@googlegroups.com
Ok, in case anyone wants the summarised details of how I got it working, I've put them on my blog - here.

David Anders

unread,
May 30, 2013, 6:51:28 PM5/30/13
to beagl...@googlegroups.com
eskimobob,

great write up!

any chance you would create a copy of it on the elinux.org wiki pages?

please note that two of the gpio control pins for the RS-485 are used by the onboard virtual capes. these will need to be changed before you can use it...

http://www.elinux.org/BeagleBone_Black_Capes

Dave

Micka

unread,
May 30, 2013, 6:57:37 PM5/30/13
to beagl...@googlegroups.com

Hey,

What do u mean by "please note that two of the gpio control pins for the RS-485 are used by the onboard virtual capes."

Thx

--

David Anders

unread,
May 30, 2013, 7:11:17 PM5/30/13
to beagl...@googlegroups.com
Mickae1,

the RS-485 cape utilizes two GPIOs as control lines for the RS-485 transceiver. the two GPIOs that it uses are already used on the BeagleBone Black for the onboard eMMC. you can see a list of which signals on the expansion headers are using by the virtual capes, along with a complete description of all the status of the capes here:

http://www.elinux.org/BeagleBone_Black_Capes

Dave

eskimobob

unread,
May 31, 2013, 4:39:10 AM5/31/13
to beagl...@googlegroups.com
On Thursday, 30 May 2013 23:51:28 UTC+1, David Anders wrote:
any chance you would create a copy of it on the elinux.org wiki pages?

Yes, happy to contribute something however small.  I've applied for an account.  May need to ask advice about where to put it on the wiki but shall have a look first.
 
please note that two of the gpio control pins for the RS-485 are used by the onboard virtual capes. these will need to be changed before you can use it...

Yes, thanks, spotted that after posting - will update my post to clarify :-)

chayan sharma

unread,
Jun 14, 2013, 11:19:02 AM6/14/13
to beagl...@googlegroups.com
Hi,
I'm also trying the same but for UART2 and while checking dmesg log it gives same error as yours omap_uart 481a8000.serial: did not get pins for uart2 error: -19
Did u figure out how to solve it ????

Thanks

eskimobob

unread,
Jun 15, 2013, 11:38:16 AM6/15/13
to beagl...@googlegroups.com
The UART2 pins are not used by eMMC or HDMI virtual capes so you should be free to use those. Can you list what capes you have installed in the slots?
cat /sys/devices/bone_capemgr.*/slots

duarte...@gmail.com

unread,
Jul 25, 2013, 2:05:06 PM7/25/13
to beagl...@googlegroups.com
Hi Guys,

I've been reading your posts and i'm experiencing not the same problem but similar. When i try to load my cape (not RS232) from EEPROM it doesn't work but when i do it manually it loads correctly.

I added to my uEnv.txt file the line "optargs=quiet capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN" and according with my log the cape is recognized and correctly read from EEPROM, also my dtbo file is in lib/firmware but i get a message on log saying that "failed to load firmware" and i don't understand why.

Can anyone give me some tips for what could be the problem?

Thanks.
Duarte Carona

Yiqing Liang

unread,
Nov 25, 2013, 7:31:21 AM11/25/13
to beagl...@googlegroups.com, duarte...@gmail.com
Hi,

 Did you solve the problem. I am experience the same.. The uEnv.txt does not make any diffferent, I could not even disable HDMI in boot time.
Reply all
Reply to author
Forward
0 new messages