HELP : pocketbeagle UART issue using node js

what is it that i need to do differently in pocketbeagle. This same code
works for my pocket beagle. i have also ensured that my ttyO4 is enabled.

  Please clarify "pocketbeagle" vs "pocket beagle"? I suspect you mean
one of the beaglebone black series...

My code is as below. any help would be highly appreciable. Thanks

  A Google search reports a BBB showing the same message -- on
StackOverflow, three years ago -- with no answers.

  No confirmed answers here either
https://groups.google.com/g/beagleboard/c/kBfn3JW2Kao
though I would suggest verifying the /boot/uEnv.txt files on the two
systems you mention, along with checking kernel version, bonescript and
node.js versions.

  The message itself appears to be produced at line 462 of
https://github.com/jadonk/bonescript/blob/master/src/my.js but as I don't
"do" node.js I can't really follow that logic.

I tried suppressing the error produced by line 462 by bruteforce (putting is_capemgr as True). and got rid of this error.
however, got stuck with the error in 468 (Device Tree overlay fragment BB-UART4 not loaded).
which means that load_dt fails to fetch the port. i am trying to find out location of load_dt function. hopeful to solve this issue with community help. thanks

what version of the OS are you using?

you can load the overlay for that com port in Uenv.txt

load_dt is a relic from kernel overlays.. Just make sure you loaded
the BB-UART4 u-boot overlays and nuke your "var b =
require('bonescript');" as it's not supported/needed/required
anymore..

Regards,

sorry for my ignorance, but i am quite new to LINUX platform. can you elaborate on how to add overlay for that com port(ttyO4).

@ Robert

I am not a linux person. can you elaborate on how to load BB-UART4 u-boot overlay in slightly simpler words if possible.

Hi Robert

i did this for adding u-boot overlay.

uboot_overlay_addr4=/lib/firmware/BB-UART4-00A0.dtbo

you said that i can get rid of require(‘bonescript’). what is the alternate method in that case

Help is deeply appreciated

regards