Slashdot Mirror


Ubuntu Core Gets Support For Raspberry Pi 2 GPIO and I2C

An anonymous reader writes: Ubuntu Core is a tiny Ubuntu distribution aimed at the Internet of Things, using a new transactional packaging format called Snappy rather than the venerable Debian packaging format. It recently gained support for I2C and GPIO on the Raspberry Pi 2, and a quick demo is given here. Ubuntu's Core support site says that the support for Raspberry Pi 2 isn't yet official, but provides some handy tips for anyone who wants to try it out.

59 comments

  1. A page full of marketing buzz by Anonymous Coward · · Score: 0

    How does snappy work?

    1. Re:A page full of marketing buzz by fisted · · Score: 2

      It's webscale.

    2. Re:A page full of marketing buzz by Hognoxious · · Score: 2

      It's integrated into systemd.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    3. Re:A page full of marketing buzz by Anonymous Coward · · Score: 2, Informative

      Snappy core is a root filesystem image built from Ubuntu deb packages and with binary diff updates. Snappy packages are built the same way, and the core runs them in apparmor to provide sandboxing.

    4. Re: A page full of marketing buzz by Beacon11 · · Score: 3, Insightful

      Since when did I2C and GPIO become marketing buzz? Judging from the title of the post ("status update") I don't think it was meant to tell you everything about snappy. It linked to an older post with more information, but if you really want to learn about it, you'll need to do some work yourself.

  2. Beware of the broken i2c by stooo · · Score: 3, Informative

    The raspberry hardware i2c implementation is broken. Don't try to communicate with microcontrollers, it will fail due to the broken clock stretching....
    I had to do SW bitbang i2c, what a mess !!

    --
    aaaaaaa
    1. Re:Beware of the broken i2c by FranTaylor · · Score: 2

      SPI works great in raspbian, no problems.

    2. Re:Beware of the broken i2c by stooo · · Score: 1

      SPI does not have a handshake from slave (uC) to master (RasPi) to tell the master to hang on when sending data.

      --
      aaaaaaa
    3. Re:Beware of the broken i2c by pem · · Score: 1

      Looks like you misspelled your username -- should be "sloooo"

    4. Re:Beware of the broken i2c by Anonymous Coward · · Score: 0

      In some microcontrollers you can disable clock stretching. As long as you are fast enough it will work. Even with the Arduino, as long as you instantly clear the TWI flag in the interrupt it will also work.

      Of course no excuse for the crappy I2C implementation.

    5. Re:Beware of the broken i2c by FranTaylor · · Score: 1

      SPI does not have a handshake from slave (uC) to master (RasPi) to tell the master to hang on when sending data.

      who said that it does? nobody but you!

    6. Re:Beware of the broken i2c by stooo · · Score: 1

      Facts !

      --
      aaaaaaa
    7. Re:Beware of the broken i2c by jkflying · · Score: 1

      We ran into this on another vendor's hardware as well, and also ended up with a bitbanged solution (the wikipedia I2C page pseudocode, actually). I wonder if our vendor is also using Broadcom internally.

      --
      Help I am stuck in a signature factory!
    8. Re:Beware of the broken i2c by gweihir · · Score: 1

      And more indication that the RPi Team has no clue what they do hardware-wise....
      I bet the BananaPi does not have this problem either (in addition to a host of other problems of the RPi it does not have).

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    9. Re:Beware of the broken i2c by gweihir · · Score: 2

      I really think that Broadcom is designing hardware with cheaper than possible personnel. They have so much stupidity and brokeness in their chips, it is staggering.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    10. Re:Beware of the broken i2c by jkflying · · Score: 1

      You should see Atmel's bootloader process, and what a mess it is to make it work for a custom board with eg. a different type of RAM or flash. The only hardware vendor (in the embedded space) that I actually trust to make stuff that 'just works' these days is TI.

      --
      Help I am stuck in a signature factory!
    11. Re:Beware of the broken i2c by gweihir · · Score: 1

      Good to know.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  3. Does it have systemd? by Anonymous Coward · · Score: 1, Troll

    It's slow on my new 24-core Xeon servers. I can't imagine how bad it is on a Pi.

    At least with a Pi, you're not going to be running as many services, which systemd makes very difficult to troubleshoot since it swallows stederr, ignores exit statuses, and discards a lot of syslog messages.

    1. Re:Does it have systemd? by Anonymous Coward · · Score: 0

      > it swallows stederr, ignores exit statuses, and discards a lot of syslog messages.

      And, from the replies to the bug reports, it doesn't look like those things are ever going to get fixed. Poettering just doesn't give a damn about the people that have to use the code he writes.

    2. Re:Does it have systemd? by Anonymous Coward · · Score: 1

      Hurd doesn't use systemd. Just saying.....

  4. Why was this voted down? by Anonymous Coward · · Score: 0

    I was also wondering this.

    1. Re:Why was this voted down? by Anonymous Coward · · Score: 0

      Voted? Ah, I see, you're from Reddit.

  5. Windows Core by Anonymous Coward · · Score: 0

    Is Bad To The Bone.
    Bad.
    Bad.
    Bad To The Bone.

  6. "Internet of Thugs" by Required+Snark · · Score: 2

    At least that is what I saw the first time I glanced at the post.

    --
    Why is Snark Required?
    1. Re:"Internet of Thugs" by Anonymous Coward · · Score: 0

      Nice jeep ya got there. Be a shame if somebody was to take remote internet control of its CAN bus...

    2. Re:"Internet of Thugs" by gweihir · · Score: 1

      That is what will follow immediately. Just look at all the stupidity currently going on security-wise on mobile phones. Add all the state-sponsored and -employed thugs to that, and a big mess is sure to ensure.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  7. USB on Rpi by gTsiros · · Score: 1

    Unless they improved on the historically dodgy USB sw/hw, there's little to be done.

    I'll stick to my cubieboard2... which also has sata.

    --
    Looking for people to chat about multicopters, coding, music. skype: gtsiros
    1. Re:USB on Rpi by ArchieBunker · · Score: 2

      That was fixed long ago on the rev 1 boards.

      --
      Only the State obtains its revenue by coercion. - Murray Rothbard
    2. Re:USB on Rpi by Anonymous Coward · · Score: 0

      No, it was not. It's a hardware bug that's not fixed in the Rpi 2, because it uses the same broken USB core.

  8. The moderations here is a joke now by Anonymous Coward · · Score: 0

    I ask a simple question then get voted as a troll. Seriously, does it use systemd?

    1. Re:The moderations here is a joke now by Anonymous Coward · · Score: 0

      Yes.

    2. Re:The moderations here is a joke now by Anonymous Coward · · Score: 0

      If you are the original poster then you got voted troll due to your erroneous statements about systemd (ignoring exit codes, etc). "Facts" that have been shown to be false over and over a million times already but which people keep repeating anyway.

  9. First impressions..... by Anonymous Coward · · Score: 0

    I never saw the BIG announcement that they fixed the USB-Ethernet problem, so maybe you can find me the link.

    Then again, don't bother. I wasted half year trying to get the RPi working stably and never succeeded. In the mean time the RPi name has left a foul taste in my mouth and it still lingers. As gTsiros said: give me a Cubieboard any day of the week and twice on Sundays. Running my weather station 24/7 for the past two years without any problems.

    1. Re:First impressions..... by OolimPhon · · Score: 1

      Raspberry Pi TWO.

      USB and Ethernet no longer associated.

    2. Re:First impressions..... by FranTaylor · · Score: 1

      Raspberry Pi TWO.

      USB and Ethernet no longer associated.

      wrong, the ethernet IO is exactly the same as the first one, just two more USB ports

  10. ugh by Anonymous Coward · · Score: 0

    Whats GPIO, whats I2C and why should normal people care?

    1. Re:ugh by gweihir · · Score: 1

      If you do not know what they are, then you do not need to care.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:ugh by drinkypoo · · Score: 1

      Whats GPIO, whats I2C and why should normal people care?

      Slashdot is not for you, as it is for people who know things and care about things.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    3. Re:ugh by rthille · · Score: 1

      Or at least for people who know that other peoples' time is valuable and will try a google search before asking a question that's easily answered thereby...

      --
      Awesome furniture, accessories and cabinetry in Santa Rosa, CA: http://humanity-home.com/
  11. general purpose io, for motors and stuff by raymorris · · Score: 2

    If "normal people" means people who buy a computer at Best Buy and aren't sure what OS it runs, they don't care about the Raspberry Pi.

    GPIO means general purpose input/output - pins that you can turn on and off, or read, in order to connect motors, servos, lights, sensors, etc.

    I2C is how chips such as microcontrollers communicate. It's kind of like a lower-level USB. You'd use it to connect your Raspberry Pi to an Arduino, Picaxe, LCD display, or some advanced sensors like GPS modules, or perhaps a cell phone module.

    1. Re:general purpose io, for motors and stuff by geoskd · · Score: 1

      You'd use it to connect your Raspberry Pi to an Arduino

      The idea of connecting an RPI to an arduino is just bafflingly dumb. If you need raw pincount that bad, just use a beaglebone. The arduino simply adds another unnecessary layer of complexity. For almost every *normal* I2C use case, The RPI I2C works just fine. I2C was never intended for connecting two micro controllers together, so no one should be surprised when it doesn’t work well. Connecting two micro controllers together is going to be trouble whenever one is significantly faster than the other. SPI is better suited for that, but you'd better have DMA to handle the incoming data. The arduino just isn't going to cut it. At the end of the day if you're trying to do anything more complex than turning a light on and off, the arduino isn't the right tool for the job.

      If you really want pincount, get one of these They are vastly more capable than the arduino and can connect to the RPI by USB. These are fully featured micro-controllers with on board everything. They might even be fast enough for you to skip the PI...

      --
      I wish I had a good sig, but all the good ones are copyrighted
  12. Ubuntu Core has no place on the Raspberry by geek111 · · Score: 3, Insightful

    Snappy is Cannical's attempt to get rid of apt because it doesn't work for paid apps. They've abandoned the Ubuntu Software Center (and the developers there) and are now pushing this crap. Whatever claim they make about 'sandboxing' and 'security', the end goal is to monetize apps to phone and tablet users. This might not even be so bad if it worked. But Snappy is not ready for primetime. It is cumbersome and buggy.

    I also question the usefulness of an 'app-store' style package management system to a platform that is geared to education. The Raspberry Pi Platform's strength is in its openness and community support. It's gonna suck to see step 4 in EVERY pi project article be 'Go install Core on your pi, then buy my app'.

    So really who cares if Core/Snappy has GPIO. So does Windows 10 IOT. Having tried both images out, WIndows IOT might actually be more useful than Ubuntu Core on the Pi right now. (At least is runs Node.js)

    I'll take apt or pip (or mercurial or Github for that matter) over Snappy any day.

    1. Re:Ubuntu Core has no place on the Raspberry by Anonymous Coward · · Score: 0

      "Whatever claim they make about 'sandboxing' and 'security', "

      my favorite is when they run everything in a vm and claim it's for portability and security...

      looking at android... what utter bullshit. 99% of android devices out there run on the same architecture and android isn't any less or more secure compared to a desktop OS (which is really absurd if you think about it) but it is as bloated as one. The "firmware" for my phone is 1 GB and each app (with a fraction of the desktop version's functionality) is upwards of 30 MB.

      Jesus fuck who codes this crap???

    2. Re:Ubuntu Core has no place on the Raspberry by preflex · · Score: 1

      Snappy is Cannical's attempt to get rid of apt because it doesn't work for paid apps.

      It seemed to work fine on Maemo 5 Fremantle on my N900 almost six years ago. The Ovi Store used apt.

    3. Re:Ubuntu Core has no place on the Raspberry by Spugglefink · · Score: 1

      I guess it depends on how you define "work" in this context. Seeing the words "Maemo" and "Fremantle" and "N900" and "Ovi" still makes my blood boil. We wasted a lot of time and money betting on a horse with no legs. It was a damn fine app that was a pleasure to develop too, which is the hell of it. That stuff was great, but commercially successful? Not on your life!

    4. Re:Ubuntu Core has no place on the Raspberry by preflex · · Score: 1

      Was it apt that burned you, or Nokia? Was packaging really your biggest problem?

    5. Re:Ubuntu Core has no place on the Raspberry by Spugglefink · · Score: 1

      We never got far enough to deal with apt. Just as we were getting into the home stretch with our app, the Maemo universe exploded into chaos. Harmattan? MeeGo? Where is this going? We decided to wait and see, and it's just as well we did. That code wasn't going anywhere unless we rewrote both the frontend and the backend from scratch.

      That's what I meant by the whole ecosystem not working for paid apps. Maybe if we had made a desperate sprint to try to cash in on a sinking ship at the last minute.

  13. not about pin count. See pci, pci-e, isa by raymorris · · Score: 1

    > connecting two micro controllers together is going to be trouble whenever one is significantly faster than the other.

    The Pi is a Linux computer. Sometimes, it makes sense to connect peripherals or add-in cards to a computer. For example, a RS-485 card, or more specialized, a DMX controller.

    An Arduino makes a good DMX controller. If you want to run DMX under Linux, it makes sense to connect a DMX controller (Arduino) to your Linux system (Pi). It's not about pin count, it's about building and connecting components that each do something. Just like you'd use PCI to connect a board (with a micro) to a PC running Linux or Windows.

  14. Re:not about pin count. See pci, pci-e, isa by geoskd · · Score: 1

    An Arduino makes a good DMX controller. If you want to run DMX under Linux, it makes sense to connect a DMX controller (Arduino) to your Linux system (Pi). It's not about pin count, it's about building and connecting components that each do something. Just like you'd use PCI to connect a board (with a micro) to a PC running Linux or Windows.

    Its funny you should mention DMX, we use DMX extensively where I work, and we actually built an ethernet/wifi to DMX bridge. Its an RPI, a wipi and the associated connectors. no need for an arduino.

    There isn't any use case where a PI+arduino makes any sense. Even for the hobbyist, if its simple enough for an arduino, but you need the OS / USB / ethernet of the Pi, just skip the arduino and use a Pi by itself. No problem. If it is complicated enough to need more than the Pi alone can handle, then the arduino is most likely NOT what you want. You would be better served with one of the PSOCs I mentioned. its cheaper, and far more versatile. The arduinos day has come and gone. The Pi and beaglebone fill that need far better than the arduino ever did. If you need more, use the PSOC+ Pi / beaglebone.

    Trust me, I do this for a living. what the arduino brings in terms of simplicity is decimated when you have to connect it to a Pi. at that point, get a real embedded SOC, and at least you have the peace of mind that your system has the horsepower you will need for your project.

    --
    I wish I had a good sig, but all the good ones are copyrighted
  15. No thanks, don't need to keep rebuilding each tim by raymorris · · Score: 1

    I'm not sure why you think there would be something to gain from throwing away a perfectly good DMX controller, just to redesign a new one to run inside a Pi, which is already busy doing other things. Then keep doing that every time you want a different UI or function. I've got a real nice DMX controller, why exactly should I build a new one inside of every different computer I want to use DMX with, rather than simply connecting a controller that already works well? Or maybe you didn't get the point that the DMX controller is a separate thing from whichever computer happens to be using it at the moment.

    > if its simple enough for an arduino, but you need the OS / USB / ethernet of the Pi, just skip the arduino and use a Pi by itself.

    Which is the same as saying:

    > if one part simple enough for a microcontroller, but you need the OS / USB / ethernet of a computer, just skip the microcontroller and use a PC by itself.

    Which means no add-in cards or USB peripherals, ever. After all, your Core i5 COULD be used to bit-bang ethernet. Therefore it should, right - no use case for an ethernet controller.

    As another example, the Pi can connect directly to a wifi chip, so it would be stupid use a separate wifi module like the wipi, right? You'd never do that, because you COULD skip module and integrate everything onto one board.

    If you take the cover off of your computer, you'll see a buttload of microcontrollers. The CPU _COULD_ do all of those functions, just like the RPi could be a bunch of different things simultaneously. Everyone (but you, apparently) thinks it makes sense to have sound cards, RS-485 cards, SAS cards, an network cards as separate, interchangeable items, which can be used with different CPUs.

  16. Re:not about pin count. See pci, pci-e, isa by gl4ss · · Score: 1

    I got one use case.
    3d printers controlled by arduino derivatives.

    though, then you would probably just connect it with usb..

    (and why wouldn't you just drive the 4+ synced steppers from the raspi? RT is hard. nobody has gotten it to work well on it. you can do a concept printer but they're just that, concepts barely functioning(when compared to a friggin atmel ran bot). there's a kickstarter thats supposedly shipping now..)

    --
    world was created 5 seconds before this post as it is.
  17. Re:No thanks, don't need to keep rebuilding each t by geoskd · · Score: 1

    > if its simple enough for an arduino, but you need the OS / USB / ethernet of the Pi, just skip the arduino and use a Pi by itself. Which is the same as saying: > if one part simple enough for a microcontroller, but you need the OS / USB / ethernet of a computer, just skip the microcontroller and use a PC by itself.

    The two two are not identical. The difference is immediately obvious to a professional embedded system engineer. Cost. For an engineer, cost is the second and third most important factors. Second is unit cost, and third is development cost. Replacing a Pi with a PC fails the unit cost test, and using an arduino and Pi together when only one is necessary fails both tests. The key difference between an amateur designer and a professional engineer, is that typically the amateur is on a constrained budget which dictates that development cost is paramount. For an engineer, the equation is a lot more complex, which is why an engineer can justify spending $1,500 for an anual Orcad license, and an amateur can't.

    Which means no add-in cards or USB peripherals, ever. After all, your Core i5 COULD be used to bit-bang ethernet. Therefore it should, right - no use case for an ethernet controller.

    Full speed ethernet can't be bit-banged. There are too many timing related issues that would make a bit-banged solution unreliable. Audio on the other hand can and is done by bit banging with a little DMA. That is why CPU based "sound cards" are a thing. Ethernet and USB by contrast use different voltages from CPU core voltage requiring external hardware anyway. In modern PCs, this hardware also handles the protocol, so there is no cost advantage to using a phy only chipset and bit-banging USB.

    As another example, the Pi can connect directly to a wifi chip, so it would be stupid use a separate wifi module like the wipi, right? You'd never do that, because you COULD skip module and integrate everything onto one board.

    Depends on the unit cost vs engineering cost. If the total cost of development of the chip version is $X, and the unit cost difference $Y times the total estimated unit sales Z is less than $X, then there is no point in using the chip version, the USB wifi has the greater ROI, and should be selected.

    I could continue, but apparently /. doesn't like long posts anymore...

    --
    I wish I had a good sig, but all the good ones are copyrighted
  18. Re:not about pin count. See pci, pci-e, isa by geoskd · · Score: 1

    (and why wouldn't you just drive the 4+ synced steppers from the raspi? RT is hard. nobody has gotten it to work well on it. you can do a concept printer but they're just that, concepts barely functioning(when compared to a friggin atmel ran bot). there's a kickstarter thats supposedly shipping now..)

    I agree, a dedicated microcontroller is the right ticket for that application, but The arduino isn't it. The arduino system is not well suited to fine grained real time control. What you want is the PSOC I mentioned. It has built in hardware for precise control of the printer. Given the PSOCs capabilities, you can get faster 3D printer performance and better precision that the arduino will ever be capable of handling, and the PSOC costs less, communicating between the PSOC and the PI will be simpler, as the PSOC can do USB, or even ethernet (with the right PHY).

    --
    I wish I had a good sig, but all the good ones are copyrighted
  19. Re:No thanks, don't need to keep rebuilding each t by raymorris · · Score: 1

    > If the total cost of development of the chip version is $X, and the unit cost difference $Y times the total estimated unit sales Z is less than $X, then there is no point in using the chip version, the USB wifi has the greater ROI, and should be selected.

    And "I already have the Arduino DMX controller in the drawer" means the unit cost is zero. The development cost of doing real time on a Pi is quite a bit higher than zero. Therefore, it makes sense to use the zero cost option (attach the Arduino you already have) rather than the higher cost, higher complexity option (use the Pi as a DMX controller along with everything else it's doing).

    Btw, your calculation also missed the big point. If you don't want or need feature X in 99% of cases, it's probably stupid to include it. It should be implemented via a separate, optional attachment. That's why RPis, and PCs, don't have RS-485 built-in, because hardly anyone wants it. You use a separate component in that case, not build it in. Similarly when reliability and security are important- complex things that try to do a lot of different stuff at once tend to break. Simple components that do just one thing are more reliable.

  20. Re:No thanks, don't need to keep rebuilding each t by geoskd · · Score: 1

    And "I already have the Arduino DMX controller in the drawer" means the unit cost is zero. The development cost of doing real time on a Pi is quite a bit higher than zero. Therefore, it makes sense to use the zero cost option (attach the Arduino you already have) rather than the higher cost, higher complexity option (use the Pi as a DMX controller along with everything else it's doing).

    Unit cost doesn't mean what your post indicates you think it means.

    --
    I wish I had a good sig, but all the good ones are copyrighted
  21. Re:No thanks, don't need to keep rebuilding each t by geoskd · · Score: 1

    And "I already have the Arduino DMX controller in the drawer"

    That is the worst possible reason for selecting components unless you are a hobbyist with no real prospects for commercial application of your project. The proper way to select parts is to do a complete cost benefit analysis of a couple of different options to determine which one will have the overall best ROI. The company I work for has several products where the analysis was not done, and the engineer simply went with what they were familiar with in the face of overwhelming disadvantages. That one decision has cost our company over half a million dollars a year in excess unit costs. It is so large that we have hired two more engineers just to redo all of the designs that he had done. (When they found out how much money he had cost the company, he was let go).

    If you are trying to make a commercially viable product, and you don't do the analysis, it can mean the difference between life and death for a startup. I can understand the use of the arduino possibly, if time to market is critical and all you know is the arduino. Even then, it might be in your best interest to bring in someone who is capable to do your engineering work, as doing it yourself could very well ensure failure...

    --
    I wish I had a good sig, but all the good ones are copyrighted
  22. oh, you know thought RPi was designed as OEM part by raymorris · · Score: 1

    > That is the worst possible reason for selecting components unless you are a hobbyist with no real prospects for commercial application of your project. The proper way to select parts is to do a complete cost benefit analysis of a couple of different options to determine which one will have the overall best ROI.

    Are you under the impression that the Raspberry Pi and Arduino are designed as OEM parts to go into mass-market products? If so, you might want to glance at the project web pages and see what they ARE.

  23. Re:oh, you know thought RPi was designed as OEM pa by geoskd · · Score: 1

    Regardless of what they are intended to be, the Raspberry Pi and Beaglebone *are* commodity OEM parts and are being used in mass production systems. That is the entire impetus behind the compute module. The BBB is a better option as it is an open board. Our BBB supply house has 4 major customer who between them use more than 100K units per month, and they are just one supply house. Element14 is rumoured to be selling over 1M units per month now. Our designs are made to be flexible, and we can use either the Pi, the compute or the BBB. In the event that someone decides to stop making the RPI, we can switch to the BBB. The BBB already has 3rd party manufacturers who make the system specifically for the OEM market. Even the RPI guys *want* people to buy the RPIs for OEM use because they make money on them, and the more they sell, the better their margins get. Simply put, there is no compelling reason to spin your own processor board unless you need to fit mechanical constraints that the PI / BBB cant meet. Unless you are making 10M+ units per year, you wont be able to be cost competitive with those parts.

    --
    I wish I had a good sig, but all the good ones are copyrighted