Getting ttyO1 and UART2 to work

So I am trying to use a BeagleBone Black to communicate with an Arduino via UART. Ultimately I want pySerial to use ttyO1 (and eventually the other UARTs).

I put ubuntu-raring-13.04-armhf-3.8.13-bone20 on a microSD card, apt-get installed a bunch of crap (including device-tree-compiler).

I tried to follow the steps in http://blog.pignology.net/2013/05/getting-uart2-devttyo1-working-on.html

but I get

Error: uart2pinmux.dts:9.2-8 syntax error
FATAL ERROR: Unable to parse input tree

when I try to compile uart2pinmux.dts (I tried it using test helper and without, following the guidance in the comment at the bottom). Not to mention, -@ doesn’t work in dtc, which apparently means I have to do something with the bootloader but I don’t know enough of what I’m doing to figure out what.

So is there a step I am missing? Or better yet, is there an easier way to turn on the tty’s and UARTs so I can start using pySerial?

Hi Eric,

You should checkout the comments on the page. Justin Smith pointed out the patch you need you apply.

Regards,
Bai Shi

Yes, I had the same problems 3 hours ago, I fixed it with the patch.

Somehow I totally missed the comments section, but I just tried to git and then patch dtc.
This is what happened when I download the patch into the dtc folder and try to apply it with git:

dtc-Dynamic-symbols-fixup-support.patch:751: space before tab in indent.
namesz += strlen(fe->prop->name) + 1;
error: patch failed: dtc.c:96
error: dtc.c: patch does not apply

Any ideas what is wrong? Did the dtc version I’m getting via git change?

I bastardized the stuff on:
http://protofusion.org/wordpress/2013/06/beaglebone-black-and-dtc/

basically pulled the full git, reset it to f8cb5dd94903a5cfa1609695328b8f1d5557367f
then used dynamic-symbols.patch
instead of the dtc-Dynamic…patch

I tried to reset the git to a commit from 26APR (before you wrote the comment on pignology) and then use the patch you mentioned, but it was still giving me errors.

Thanks for all the help though, and next time I will try and read the comments a lot more carefully.

Hi Eric,

I’m not very sure about the latest version. I’ll try it out tomorrow when I reach office. FYI my version worked pretty well was 4e76ec796c90d44d417f82d9db2d67cfe575f8ed. Maybe you want to give it a try.

Regards,
Bai Shi

I have created a patch to dtc Dynamic patch. It should fix it for the time being. The patch failure was due to some change to the help message of usage().

I tried to compile and it passed. Though not 100% the other changes in the repository won’t cause any problem.

Regards,
Bai Shi

a1ee6f.patch (2.94 KB)

I renamed the patch dtc-Dynamic-symbols-fixup-support-a1ee6f.patch because

error: dtc-Dynamic-symbols-fixup-support-a1ee6f.patch: patch does not apply

but it didn’t work either. Also rolled it back to the commit you mentioned, and the patch didn’t work. Didn’t try the original dtc-Dynamic-symbols-fixup-support.patch with that commit yet.

Hi Eric,

How did you apply my patch? If you are using git apply then it may not work as I didn’t extract the patch using git.

I tested my patch using “patch dtc-Dynamic-symbols-fixup-support.patch < a1ee6f.patch” it works.

As my patch’s name suggest, it works against current master a1ee6f, if you want to patch the 4e76ec revision, you’ll need the original dtc-Dynamic-symbols-fixup-support.patch.

Hope it clarifies.

Regards,
Bai Shi