BeagleBone Black TTY over USB / FTDI

Hi,

I have a BBB (BeagleBone Black) based device which i want to run ResinOS on. Is there any way to enable the FTDI Serial over USB that is active on a BBB factory Image?

I tried flashing the image on a BeagleBone Black, when i connect the BBB to a LAN Interface everything shows up working. But i can not connect to the Serial that is exposed over USB on a factory BBB Image. Is there any way to get this interface up and working on a ResinOS Image.

regards

Hi, for clarity, are you trying to connect and use the USB serial from the user application container, or to connect to the underlying host OS? Which serial line you’d like to use (there are up to 6 on BeagleBone devices)?

If you’d want to debug the host OS, then the USB serial TTY interface should be default enabled on the .dev images (that is intended for testing. If you’d like to use it with the user application, then some more info is needed of what are you trying to do (would likely involve enabling the relevant UART with capemgr, as mentioned in the docs, where the relevant serial capes are BB-UARTx, where x is I think the integer index of the serial line you’d llike to use).

I try to connect to the HostOS.

I would like to use the serial port that you can access over the USB Connector on a BBB (The same USB connector you power the BBB with). When connected to a PC the BBB provides a SerialPort over the USB Connection (using a FTDI chip as far as i know).

I use the dev Image but can not see any serial ports when i connect to the BBB.

EDIT For clarification: I want start a tty Session over the mentioned Serial Port. so i can log into the BBB and Test/Debug the changes i want to make to the resinOs Image (Custom dtb / modem manager) etc.

For the .dev image, the serial port used for tty is UART0 (that is the J1 connector), which can be connected to with a USB-Serial cable. I think currently you would need to use that. Not sure if the power USB port can be used for this at all, will have to check with our device team.
The hardware side of the current setup is as it is mentioned in this wiki, for example.

Thank you for the Information.

I think the UART0 / J1 connector is not accessible on our device. We use this Board http://beaglecore.com/ with some custom pereferie.

Thanks for checking! Let me know if and how this is possible.

I see, so you are using the “BeagleBone” device type but with the BeagleCore board?

The product page seems to say that there’s 1x UART connector available, any idea which UART might that be?

I’ve also added that board to our board support request list to keep track of that (feel free to “thumbs-up” the issue so we can gauge the interest in the different boards that we receive requests for)

We Plan to use a BeagleCore. But for testing purposes we use a BeagleBone Black.
The USB Client is not recognized as SerialPort on Both devices. So the Problem can be repoduced with a Simple BeagleBone Black

Thanks for that i did up vote the Issue.

Can you give a bit more details of what are you doing exactly that is reproduced? Which serial port are you trying to connect, and what are your running exactly? That would help us reproduce the issue that you are experiencing.

Okay lets take a step back and forget about the BeagleCore Board for the moment.

I have a BeagleBone Black on which i have a factory image running (debian). Now i connect the mini USB connector to the BeagleBoard and the USB A connector on the other side of the cable to my notebook. Now the BBB gets powered by my notebook over the USB Cable.

When i open the Explorer on my Notebook I can now see the BeagleBoard as a removable Device, If i check the available network Adapters I can see a Virtual Ethernet, and If i check the Device Manager there is a Serial Interface “COM3” available - Everything over one single USB cable (I did not attach anything else to the BBB).

If i do now flash a ResinOS Dev version and leave everything else of the setup untouched. there is no removable device, no virtual Ethernet and (most important for me) there is no Serial Interface “COMx” available.

That is what i meant with reproducable on a BBB.

Now back to our BeagleCore - The problem here is that I can not open a Terminal Session to Search / Debug the Device. And we do not have any other Serial Port available at our Custom Layout. There is only the mini USB Connector which i can attach to.

I hope i could clarify the Problem.

Hi @Console

I have been having a read of the BBB system reference manual which states on page 28 that there is “No Serial port by default.” and that instead you should use the “Debug Serial Header”.

This leaves me a bit confused as you say that there is a serial port on the micro-usb connector? Can you double check that you definitely have a BeagleBone Black please.

Thanks

Hi @joe

Quality is not super awesome but i think it is clear what device and what connector i Use.

At the backside of the BeagleBone Black i Insert an SD Card containing the following IMG:
Debian 8.7 2017-03-19 4GB SD IoT and boot the BBB from the SD Card using the button.

Now i can connect to it with Putty over a serial interface ‘COM11’:

I guess what it is doing is putting the serial port into device/OTG mode and using the USB serial gadget driver. I think you should be able to accomplish this with two steps:

  1. Load the g_serial kernel module
  2. Start a getty on ttyGS0

ResinOS doesn’t do this by default however.

1 Like

@willn Thank you for that. Can i modify the resinOS image to already contain that?

Yes, right now this would involve making a custom build of the OS: https://resinos.io/docs/custombuild/

@willn after some trial and error i got the resin-image-flasher build running on my Virtual Machine, but i am not an expert in linux kernel modules nor in yocto / resinOs. Where can i start, or what is a good point to start my research.

Hello,

Not 100% sure but you can try the following.
Once you’ve cloned https://github.com/resin-os/resin-beaglebone and initialized its submodules, you can add a line similar to https://github.com/agherzan/meta-raspberrypi/blob/1b589998f4e96a0d1576de42f1927d69482c9cb4/recipes-kernel/linux/linux-raspberrypi.inc#L31 in layers/meta-resin-beaglebone/recipes-kernel/linux/linux-beagleboard_4.9.bb.
Something like

KERNEL_MODULE_AUTOLOAD += "g_serial"

And then run BARYS again.

@zvin Thank you, I added KERNEL_MODULE_AUTOLOAD += "g_serial" into the
layers/meta-resin-beaglebone/recipes-kernel/linux/linux-beagleboard_4.9.bb File.

And then i changed the layers/meta-ti/conf/machine/beaglebone.conf

# SERIAL_CONSOLE = "115200 ttyS0"
SERIAL_CONSOLES = "115200;ttyS0 115200;ttyGS0"

Now i can access the HostOs over the USB OTG.

You’re welcome.


resin.io