beagle bone / linux (unbuntu 12.04) noobie requesting help

This is a new install of 12.04 as of about 10 days ago. I set it up as a dual boot to avoid any issues with running in a VM. I’m guessing that at this point the first hurtle to overcome is that the SD card complains about being readonly, no matter what I try with it. gparted, for example, won’t touch it. I don’t know Linux will enough yet to know what my alternatives are to get the card back to square one.

The card does have a rootfs and a boot partition on it, in which I can view the contents. It might even work if I knew what I was doing… I just don’t know how to confirm that and connect. And of course I would like to be able to repeat the process as required.

The card reader is a Kingston USB stand-alone device that accepts several types of cards. No model # but “Part #FCR-HS219/1”, for whatever that’s worth.

In the next 30 minutes or so I’ll be going away from this equipment until Monday - don’t think I don’t appreciate your help if I don’t respond before then!

Thanks

This is a new install of 12.04 as of about 10 days ago. I set it up as a
dual boot to avoid any issues with running in a VM. I'm guessing that at
this point the first hurtle to overcome is that the SD card complains about
being readonly, no matter what I try with it. gparted, for example, won't
touch it. I don't know Linux will enough yet to know what my alternatives
are to get the card back to square one.

Any chance do you have another usb reader around? Something from a
different manufacture...

The card does have a rootfs and a boot partition on it, in which I can view
the contents. It might even work if I knew what I was doing... I just don't
know how to confirm that and connect. And of course I would like to be able
to repeat the process as required.

It might have some of the stuff, the script does dump quite a few
different files to the sd card... Easiest is just to power up the
Bone, plug in the usb and see if the serial log appears while
booting..

Regards,

Some progress this morning. I had been using the micro SD card in an adapter to use it in a slot sized for a full size SD card. When I used it in the true micro SD card slot of the reader it was no longer seen as read-only and I was able to use gparted to clear out the existing partitions. I was then able to re-partition and reformat the SD card using the prodecure here:

http://elinux.org/BeagleBoardBeginners#Formatting_the_SD_card_via_fdisk_.22Expert_mode.22

The only quirk was that where this procedure indicated that fdisk reports cylinders, I see sectors. I adjusted for this, hopefully correctly.

I then tried to run setup_sdcard.sh, but got what appear to be the same errors as previously. It may be that these can be ignored, but I’m not sure how to connect to confirm that I have a working image.

just to power up the
Bone, plug in the usb and see if the serial log appears while
booting…

Sorry for being at the early stages of the learning curve, here, but I’m afraid I need a bit more of a step by step.

  • As I mentioned, I can connect via Ethernet (to the angstrom image) without serious problems, but this is not really good as an on-going solution.
  • for either image - is there usb->tty that I need to set up?
  • there does not seem to be any /dev/ttyUSBn, but I do see /dev/usbmon0 through usbmon4. Is this what I am looking for, and what do a need to do to connect this way?
  • it’s also not clear to me whether I should be using the micro-usb (w/ jtag) port, or the full size usb-A connector.

Thanks again

Hi,

The errors when running setup_sdcard.sh might be the root of the problem. Personally, when I have an SD card that I’m going to re-image, I follow the instructions here (steps 1 -10 – the remaining steps are to install Angstrom Linux): http://circuitco.com/support/index.php?title=BeagleBone#Creating_a_SD_Card. After step 10, you are ready to run setup_sdcard.sh.

To answer your questions:

  1. You need to use the mini-USB connector on the Beaglebone when connecting it to a PC. The larger USB connector is a USB Host for connecting things like a USB disk or keyboard to the Beaglebone.
  2. The problem with the tty/USBxx port not being assigned by Ubuntu on you PC might be solved by running the modprobe command documented in the “What If” section on this page: http://www.angstrom-distribution.org/demo/beaglebone/. Other than that modprobe command, you don’t have to do any other configuration on either the PC or Beaglebone end. Just a garden variety micro-USB cable is all you need.

Dan.

Ah, "setup_sdcard.sh" assumes the worst case, so it really doesn't
matter what you do before hand, it's going to blow away the whole
partition table and start completely from scratch, so doing above
would be a waste of time.. "setup_sdcard.sh" just uses,
fdisk/parted/mkfs.*/etc for building the sd card... (and a bunch of
other logic added in over time, so support multiple devices..)

To me, it looks like a sd card adapter failure... Once the kernel
set's the device as "RO" there's not the script can do anymore..

Regards,

I got around the R/O problem, which apparently did have to do with the card reader, as mentioned earlier. However, even when the script could write to the card I was still getting the pop up messages mentioned in one of my first posts.

Worse, now I can’t read either the card I tried to image or the original angstrom card!? Can’t ping, can’t ssh, screen /dev/ttyUSB1 gets me a ‘no such file or directory’.

I have done nothing with the original angstrom card other than remove it so that I could try the hopefully-correctly-burned Ubuntu card, then replace it.

When re-starting either card the leds flash in the same pattern, which appears to be the same as when the original card was working. I suppose I should now try to re-burn my backup card with an angstrom image, and see if I can at least connect with the BB at all.

Any other suggestions will be appreciated.

Thanks

Dan,

When I do a manual modprobe, I get this;

WARNING: All config files need .conf: /etc/modprobe.d/ftdi_sio, it will be ignored in a future release.

I have no idea what this implies, but still /dev/ttyUSB* no such file or directory.

I did not want to assume that I could connect to a Ubuntu image the same way as to an angstrom image. root@beagle.local vs ubuntu@omap, same ip address(?) etc. I have not seen it spelled out, so I have no reason to think that anything is the same between these two flavors.

Thanks

I got around the R/O problem, which apparently did have to do with the card
reader, as mentioned earlier. However, even when the script could write to
the card I was still getting the pop up messages mentioned in one of my
first posts.

Does this popup have any details of what it was or is? Everything in
the script is command line, it shouldn't be using any gui's... The
only thing that might be happening, your gui might be trying to
automount the card, which would cause a 'popup' which can get in the
way.. There's no global way to disable this across the board, so the
script doesn't try to do anything to disable that...

Worse, now I can't read either the card I tried to image or the original
angstrom card!? Can't ping, can't ssh, screen /dev/ttyUSB1 gets me a 'no
such file or directory'.

I have done nothing with the original angstrom card other than remove it so
that I could try the hopefully-correctly-burned Ubuntu card, then replace
it.

When re-starting either card the leds flash in the same pattern, which
appears to be the same as when the original card was working. I suppose I
should now try to re-burn my backup card with an angstrom image, and see if
I can at least connect with the BB at all.

If it's flashing, you should be able to access /dev/ttyUSB1... (use
dmesg | tail incase it's called something else..)

Regards,

Yes.. "same ip addess" the kernel pic's the MAC address from internal
EEPROM on the BeagleBone... So if you have a sane router, then both
images would have the same address..

Regards,

Mickey,

I’m not too knowledgeable about Linux myself, so I’m not sure what the warning means either. However, it seems to be a pretty common warning when running modprobe, and it shouldn’t prevent the modprobe from successfully loading the module, so I think you can safely ignore it.

You mentioned that the LEDs flash when boot from the SD cards: is it a “heartbeat” flashing pattern (i.e. 2 flashes, pause, 2 flashes, pause, etc.)? If so, then you’ve likely got a good SD card image – Linux successfully booted on the Beaglebone anyway.

If you have a Windows PC, I’d suggest you try connecting the Beaglebone to a USB port to see if it works that way. If everything is working correctly, the Windows PC will a) recognize the FAT32 (boot) partition and assign it a drive letter and b) assign a new COM port. At that point, you can run Putty http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html to connect to the COM port: settings are 115200 N81, no hardware flow control. Connect to the COM port, press the Enter key, and you should see the Linux login prompt.

Dan.

First, let me say thank you both, Robert and Dan, for the time you’ve taken.

This started out as a list to myself of “this is what I have tried so far and the results”, each step leading me tho the next thing to try. As you see at the end I did finally have enough success that I can proceed, although I do still have some unresolved questions.

Much of what I see on the Internet on the BeagleBone (for whatever distribution) says “just watch the serial port” as if the BB is magically and automatically is discovered and connected correctly to some default display. This does not seem to be the case for me!

  1. I am able to connect to the original card (angstrom) again this morning, but still not the Ubuntu card. I can ssh to angstrom when connected with an ethernet cable, but am unable to connect in any way with only with the USB cable.

Perhaps this is the basic issue I should be looking at - I really just want to just connect to a terminal without involving the local network. Perhaps if I can successfully do that with angstrom it will them work with Ubuntu?

  1. Windows (xp) only reports “usb device not recognized”, “…has malfunctioned…”. Same with either the original SD card or the ubuntu card.

  2. yes, I have a heartbeat on the Ubuntu card. A pattern of two quick flashes about every second.

  3. /dev/ttyUSB* gets me only “No such file or directory”

  4. dmesg | tail

What should I be looking for here? I see no reference to any tty other than the physical ports on this pc, and nothing that suggests a ttyUSB.

  1. “modprobe ftdi_sio vendor=0x0403 product=0xa6d0” gets me the message mentioned previously “…will be ignored in a future release.”

  2. “ssh ubuntu@omap” returns:
    ssh: Could not resolve hostname omap: Name or service not known

  3. You can see the popup messages here: http://thesweetoasis.com/misc_photos/pop_ups.png
    As suggested, these may be from the desktop attempting to auto-mount. The question is are they harmless or could this attempt be confusing things somehow?

  4. I can’t ping 192.168.7.any_low_number. If I put in the angstrom card and boot, log on as root@beaglebone.local, I see that the BB has been apparently assigned an address on our lan 192.168.20.x, not the 192.168.7.n that I somehow imagined was hardcoded into it. I can then ping this from another terminal. If I boot (angstrom) with no connection to our lan, then try ifconfig, I consistently see 169.254.103.13, which I can ping from another terminal. But if I then boot from the Ubuntu sd card I can’t ping this address.

If I boot from the ubuntu sd while connected to the network I can then ping 192.168.20.3, If I try to ssh ubuntu@192.168.20.3, I get WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

Not knowing the correct way to get around this, I deleted my known_hosts file and can now ssh ubuntu@192.168.20.3 Hooray!

So the good news is that I have a bootable image that I can connect to.

I would still very much like to be able to do this without involving the lan, and would like to understand what didn’t work, and why.

Now I just need to get my Linux knowledge up to the point that I can set up nsf between the BB and my desktop, find the package repositories for the things I need if they exist (mono being the first), etc. Do you know if there is a package for mono/beagle, or will I need to compile from source?

Thanks again.

Mickey,

Sorry, when I suggested using a Windows PC, I should have mentioned that Windows requires a driver in order to recognize the Beaglebone as a serial port. You can find the download link for the driver in this page: http://beagleboard.org/static/beaglebone/latest/README.htm.

Although I’m a .Net developer myself, I’ve never used Mono, and I wonder if it might be too resource hungry for the Beaglebone. However, the package does exist for Angstrom (http://www.angstrom-distribution.org/repo/?pkgname=mono) and I’d be surprised if it isn’t available for Ubuntu too.

You might find a blog post of mine helpful for getting started with Linux on the Beaglebone, especially if decide to use Angstrom: http://www.gigamegablog.com/2012/01/29/beaglebone-linux-101-configuring-angstrom-linux/ If you’re planning to use the Beaglebone as a microcontroller platform for things like analog input, PWM and SPI, I’d suggest you give Angstrom a try, since some features aren’t currently available in the Ubuntu kernel.

Dan.

I’ve just installed mono on the Ubuntu BB, but have not tried to build and run anything with it yet. I will try the Windows driver for the serial port connection, but I’d prefer to do development on Desktop Ubuntu rather than Windows. I have moved some .NET code to mono on desktop, but not yet the bb. My thinking is that getting it running on the same os and distribution on a desktop machine will avoid possible issues with developing it on either Windows .NET or mono on a different Linux. Since I’m getting up to speed on Linux I didn’t want to have to think about subtle differences between distros complicating what’s already promising to be an adventure.

I don’t anticipate requiring low level microcontroller access, but would like to be able to re-use .NET code to the extent possible. If BB proves to be to resource-constrained for mono, we’ll deal with that if it proves to be an issue, and meanwhile hope for the best.

I did see one of your previous blog posts while trying to get this far - I’ll read the others - Thanks!

Mickey