element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum What's Your Pi Plan??
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 248 replies
  • Subscribers 692 subscribers
  • Views 16909 views
  • Users 0 members are here
  • video
  • hdmi
  • single_board_computer
  • single_board_computers
  • media
  • xbmc
Related

What's Your Pi Plan??

Former Member
Former Member over 13 years ago

Hi!

 

Just curious about what people were planning on using their Raspberry Pi's for once they started getting them!??

 

Current plan- SFF Media PC / NAS etc mounted onto the VESA on the back of my TV

 

Later plan- Replace car stereo etc with RPi

 

Probably not the most origional use there but still, godda start somewhere!

  • Sign in to reply
  • Cancel
Parents
  • morgaine
    morgaine over 13 years ago

    All my Pi plans bit the dust owing to the broken USB.  On the positive side, it's not a lot of money lost, and helping to diagnose the hardware faults was at least interesting for a few weeks.  I'd never come across such a horribly broken USB system before, so it was eye-opening and slightly amusing.  It wouldn't have been amusing if the board had cost more though.  It would have been RMA time.

     

    I'll try the Model A when it comes out, since it is possible that without the LAN9512's integrated hub, the BCM2835's USB limits won't be hit so rapidly.  It will have a better chance of working within its hardware limitations.  We'll see.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fustini
    fustini over 13 years ago in reply to morgaine

    Since this is a thread about what about folks have or are planning to do with Pi, I thought it might be helpful to point out that there is a challenge right now to post about your Pi project on the group blog here:

     

    http://www.element14.com/community/groups/raspberry-pi/blog/2012/10/17/raspberry-pi-model-b-512mb-challenge

     

    Prize is an Anrdoid tablet.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • morgaine
    morgaine over 13 years ago in reply to fustini

    Drew, your mention of the challenge made me daydream a bit about what might make a really useful project, especially for those who have hit hardware limits of the Pi's USB implementation.  One way of dealing with the problem is simply to avoid it, and that is clearly what most successful Pi projects have done.

     

    But there is another way too, albeit much more ambitious and requiring much more work, and that is to extend the USB system beyond the reach of the hardware limits of the SoC.  Let me explain.  I'll use a sort of analogy.

     

    Many people will have heard of the concept of TCP offload engine, which appears in many high-end networking cards as a way of accelerating performance of TCP/IP networking.  The general idea is to implement part or all of the network stack in dedicated hardware instead of using the CPU, so that the "NIC" actually becomes a lot more than just an Ethernet interface card.  Its level of abstraction is raised significantly, and it delivers a full TCP/IP networking service to the CPU instead of just handing it raw frames of data.  The NIC's dedicated hardware has nothing else to do so network responsiveness and throughput are greatly improved, and the host CPU doesn't have to deal with the intensive demands of low-level protocols so it has more time to run user programs, and so everyone is happy.

     

    Well consider if something similar were done with USB instead of with networking layers --- not exactly equivalent, but nevertheless a form of functionality offload.  Imagine if the existing USB host port on both Model B and the forthcoming Model A were used exclusively to link to a cheap external microcontroller board, for example the Freescale Freedom KL25Z or the ST STM32F4-Discovery , both of which cost around a tenner or less.  ARM Cortex-M microcontrollers like on these boards (M0+ and M4F respectively) tend to have very polished USB stacks with good performance, including totally open source ones.  There would be no shortage of resources from which to create a complete USB Offload Engine, by analogy with the TCP one, possibly running under one of the open source realtime operating systems like FreeRTOS or ChibiOS.

     

    The above would deal with the low-level half of the problem on the microcontroller board, but the high-level part back on the Pi would still remain to be done.  In essence a new Linux driver would have to be written which communicates with the USB Offload Engine using the Pi's own USB as a simple messaging conduit.  Note that the intention would not be to treat the remote engine as part of the Pi's USB device tree, because that would just succumb to the Pi's existing USB controller limitations.  Instead, the goal would be to create a new virtual USB device in the Pi's kernel, with communications to that device's actual hardware being carried by the Pi's existing USB system.  The latter won't need to know about any USB devices attached to the microcontroller board, and therefore operation would always remain within the BCM2835's capabilities regardless of what USB devices you attach.

     

    Anyway, it's just daydreaming, but the potential for such a high-powered solution is there, and it would be very cheap and provide high USB performance without taxing the Pi's CPU.  The tradeoff of course is that it would require a huge amount of work to create this.  A fine project!

     

    (It's also worth mentioning that the Pi's other hardware interfacing would be expanded enormously as well.)

     

    Something to think about on cold winter afternoons. image

     

    Morgaine.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • johnbeetem
    johnbeetem over 13 years ago in reply to morgaine

    Morgaine Dinova wrote:

     

    ... USB Offload Engine....

     

    That's a nice extension of Wheeler's Law to hardware: "All problems in Computer Science can be solved by another level of indirection... Except for the problem of too many layers of indirection".  Datacom often adapts Wheeler's Law by encapsulating one protocol within another protocol, and that same thing could certainly be done here.  The USB traffic between RasPi and the USB Offload Engine can be larger packets with an extra header for device endpoint information.

     

    As you say, a big job.  Probably lots of kernel-fu.  I suspect most people who have the skill and knowledge to do it would rather work on something else, but it only takes one fanatical masochist to accomplish it image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • morgaine
    morgaine over 13 years ago in reply to johnbeetem

    John Beetem wrote:.

     

    As you say, a big job.  Probably lots of kernel-fu.

     

    Not necessarily complex in the Linux kernel, because after all this would be a virtual USB device, and typically most driver nasties stem from having to interface with ugly physical hardware.  Here we would be able to invent whatever elegant messaging protocol we like for talking to the offload engine because we control both ends.

     

    It's worth noting that this driver wouldn't have to be Pi-specific at all, and possibly not even ARM-specific  because the USB conduit could be coded to work over any generic USB infrastructure.

     

    A USB offload engine for use on any machine with a Linux kernel would be more than cool. image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • morgaine
    morgaine over 13 years ago in reply to morgaine

    Note also that the ARM-to-microcontroller offload conduit doesn't have to be USB, it could be anything you like, and one very obvious candidate is of course to use raw Ethernet.  You would then have a USB offload engine that is not only usable to a far greater distance from the host than native USB, but is also galvanically isolated.

     

    And beyond that, USB-over-IP is also possible if you don't mind a drop in performance in exchange for arbitrary distance.  (That actually exists as a commercial product, although these "USB network servers" typically work only in the Windows world, don't use open protocols, and lack open source drivers.)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • rew
    rew over 13 years ago in reply to morgaine

    Got the USB-over ethernet working once. Extension to rdesktop IIRC. May have been that the client had a licence for a commercial product under Linux.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • morgaine
    morgaine over 13 years ago in reply to rew

    I have an unbranded Chinese gadget sitting on the shelf that seems to be identical to this one --- http://www.neostar.com.tw/p_4port_usb_gigabit_server.html . Lacking a Windows box I haven't been able to test it and generate some useful network traffic to analyse, yet.  I knew it was going to be a shot in the dark when I bought it, but it was heavily discounted so no huge loss.

     

    I have no idea yet whether the above gadget creates a new virtual USB device as I've been proposing, or whether it extends an existing USB device tree using software sleight of hand.  It's academic for our Pi purposes anyway, since the manufacturer's software is Windows-only.

     

    The concept of USB over IP is certainly a very useful one, assuming open standard protocols of course.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • gdstew
    gdstew over 13 years ago in reply to morgaine

    Morgaine,

     

    Since this is Raspberry Pi forum these are of course specific to it:

     

    1) Please explain the elegant protocol you plan to use to push a 480Mb/s USB one way bandwidth guaranteed data stream through a 100Mb/s one way Ethernet interface.

    2) Please explain how you intend to do guaranteed latency and bandwidth without using the process scheduling only available at the kernel level.

    3) Neither of the "inexpensive" microcontrollers you mention implement the full USB 2 communications specification and as such would not be usable for your offload

         engine. They both implement the "light" version called USB OTG. Light because it is intended to be used when the processing power, memory, and memory

         bandwidth is not available to implement the full USB 2 specification. Neither of the processors have the required (see #1) 1Gb/s Ethernet interfaces either so that

         tenner just went up a few notches. And of course even with 1 Gb/s Ethenet it would not fix the 100 Mb/s limitation of the Raspberry Pi.

    4) You do understand that the only connection between the BCM2835 and the Ethernet interface is through the BCM2835 USB hardware and driver? Please explain

         how you plan to bypass the bad BCM2835 USB hardware and drivers (paraphrasing your descriptions) and the awful 9512 (again paraphrasing your descriptions)

         using the very same hardware and drivers.

    5) As I have explained to you twice before, if you want to use raw Ethernet you will have to write a kernel driver to do it because that is where the MAC protocol layer

         resides and I explained in those posts most of what that would entail. I will now add that in order to use it you will ether have disable the normal Ethernet stack

         above the MAC layer, or write the driver so that it multiplexes your "special" driver interface with the data link protocol layer of the normal Ethernet stack that resides

         in kernel space. So I fail to see how this leads to the reduced complexity you said you wanted. And because of #4 I'm not sure this is even possible or that you would

         gain much from doing it.

     

    Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • gdstew
    gdstew over 13 years ago in reply to morgaine

    Morgaine,

     

    Since this is Raspberry Pi forum these are of course specific to it:

     

    1) Please explain the elegant protocol you plan to use to push a 480Mb/s USB one way bandwidth guaranteed data stream through a 100Mb/s one way Ethernet interface.

    2) Please explain how you intend to do guaranteed latency and bandwidth without using the process scheduling only available at the kernel level.

    3) Neither of the "inexpensive" microcontrollers you mention implement the full USB 2 communications specification and as such would not be usable for your offload

         engine. They both implement the "light" version called USB OTG. Light because it is intended to be used when the processing power, memory, and memory

         bandwidth is not available to implement the full USB 2 specification. Neither of the processors have the required (see #1) 1Gb/s Ethernet interfaces either so that

         tenner just went up a few notches. And of course even with 1 Gb/s Ethenet it would not fix the 100 Mb/s limitation of the Raspberry Pi.

    4) You do understand that the only connection between the BCM2835 and the Ethernet interface is through the BCM2835 USB hardware and driver? Please explain

         how you plan to bypass the bad BCM2835 USB hardware and drivers (paraphrasing your descriptions) and the awful 9512 (again paraphrasing your descriptions)

         using the very same hardware and drivers.

    5) As I have explained to you twice before, if you want to use raw Ethernet you will have to write a kernel driver to do it because that is where the MAC protocol layer

         resides and I explained in those posts most of what that would entail. I will now add that in order to use it you will ether have disable the normal Ethernet stack

         above the MAC layer, or write the driver so that it multiplexes your "special" driver interface with the data link protocol layer of the normal Ethernet stack that resides

         in kernel space. So I fail to see how this leads to the reduced complexity you said you wanted. And because of #4 I'm not sure this is even possible or that you would

         gain much from doing it.

     

    Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Former Member
    Former Member over 13 years ago in reply to gdstew

    Gary Stewart wrote:

     

    5) As I have explained to you twice before, if you want to use raw Ethernet you will have to write a kernel driver to do it because that is where the MAC protocol layer

         resides and I explained in those posts most of what that would entail. I will now add that in order to use it you will ether have disable the normal Ethernet stack

         above the MAC layer, or write the driver so that it multiplexes your "special" driver interface with the data link protocol layer of the normal Ethernet stack that resides

         in kernel space. So I fail to see how this leads to the reduced complexity you said you wanted. And because of #4 I'm not sure this is even possible or that you would

         gain much from doing it.

    Gary,

     

    Can I suggest "man 7 packet", taking a look at libpcap, or something like this:

    http://www.microhowto.info/howto/send_an_arbitrary_ethernet_frame_using_an_af_packet_socket_in_c.html

     

    AF_PACKET sockets that allow you to send and receive arbitary frames have been around for a long time, there's no need to go writing a new driver or disabling anything.

     

    They're used by things like wireshark, nmap & 'magic packet' wake-on-lan utils to capture and create raw ethernet frames and work quite happily alongside normal higher layer protocols

     

    Here's the kernel's description:

    config PACKET

            tristate "Packet socket"

            ---help---

              The Packet protocol is used by applications which communicate

              directly with network devices without an intermediate network

              protocol implemented in the kernel, e.g. tcpdump.  If you want them

              to work, choose Y.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • gdstew
    gdstew over 13 years ago in reply to Former Member

    Thanks selsinork, that is definitely useful information.

     

     

    Note: edited for spelling

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube