Shop OBEX P1 Docs P2 Docs Learn Events
Multiple Spinnerets Connected To A Hub — Parallax Forums

Multiple Spinnerets Connected To A Hub

idbruceidbruce Posts: 6,197
edited 2012-10-02 14:24 in Accessories
Hello Everyone

I don't know if this is possible or if it has been done before, but I would like to be able to connect multiple Spinnerets to a hub and access the contents of the microSD card of each Spinneret from a PC. Is this even feasible?

If so, could someone point me in the direction of applicable threads?

Bruce

Comments

  • Mike GMike G Posts: 2,702
    edited 2012-10-02 06:45
    I don't know if this is possible or if it has been done before, but I would like to be able to connect multiple Spinnerets to a hub and access the contents of the microSD card of each Spinneret from a PC. Is this even feasible?
    Yes, you have just described the basic function of a Spinneret web server. A network IP and MAC address is assigned to the Spinneret just like your PC. I use Kye's SD Card driver to read and write to the SD Card.

    Web server tutorial The tutorial is running form the Spinneret and serving pages from an SD card. I've been messing with the timeout so if the style sheet does not load, please refresh the page.


    Source Code
  • Mike GMike G Posts: 2,702
    edited 2012-10-02 07:43
    Oh, and here is an example of controlling remote LEDs.
    http://www.agaverobotics.com/spinneret/controlpanel.htm
  • idbruceidbruce Posts: 6,197
    edited 2012-10-02 07:48
    That is very cool Mike :)

    However, let's assume that I had five spinnerets with four pushbuttons each. How could I get the inputs from the spinnerets to the pc?

    Bruce
  • Mike GMike G Posts: 2,702
    edited 2012-10-02 07:58
    However, let's assume that I had five spinnerets with four pushbuttons each. How could I get the inputs from the spinnerets to the pc?
    Simply send a message to the PC when a button is pressed. It's exactly like clicking a link in a web browser - that is if you use the HTTP protocol.

    In a nut shell, the PC must be listening for the message on some port. The listener can be many things, Telnet, UPD server, web application, custom socket listener...

    The tutorial shows how to use the Spinneret as a client.
  • idbruceidbruce Posts: 6,197
    edited 2012-10-02 08:10
    Mike
    Simply send a message to the PC when a button is pressed.

    Yea, I understand, but what about interfacing multiple Spinnerets to the same PC. There has to be some type of hardware with multile ports to plug in the data cables, and from there how is it interfaced with the pc?

    I would imagine that interfacing 1 spinneret is quite easy, but I also imagine that interfacing 50 spinnerets to 1 pc would be quite difficult.

    Bruce
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-10-02 08:30
    Each device has a unique IP address on the network. You just see the message coming in from an IP address. The PC may need to know which is which or it could just reply to the IP address that sent the message. Until you've used all 256 addresses in the subnet you are on, there really aren't any issues to worry about (actually it's some handful less than 256 depending on your network)

    Or, of course the devices could be scattered across the world....a lot like the Internet!! :lol:
  • idbruceidbruce Posts: 6,197
    edited 2012-10-02 08:36
    Each device has a unique IP address on the network.

    Okay, but how does the device connect to the network?
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-10-02 08:45
    Cat-5 cable from the RJ45 connector on the Spinneret or PC to the RJ45 connector on you hub/router/switch.

    50,000 ft view:
    At some point you need to build an IP network. If you are connected to the Internet, you have some sort of network already. You may need to add switches (preferred) or hubs to accommodate all your device connections. Each device has a unique MAC address and IP address on the local network. These are used to route on the local network. If you want traffic to leave your network, then you will go through your router and whatever connects it to the Internet (it could be a DSL Modem/Router or a Cable Modem/Router or various other hardware combinations at this point. Now you are into the world of the Internet and possibly have many more things to consider in your connectivity configuration.
  • idbruceidbruce Posts: 6,197
    edited 2012-10-02 08:59
    Thanks Rick

    Now we are getting somewhere. So in other words, I could access 23 Spinnerets and 1 PC with hardware similar to this, and by assigning each spinneret a unique IP?

    http://homestore.cisco.com/Cisco-Small-Business-SRW224G4-K9-NA-SF-300-24-24-port-10-100-Managed-Switch-with-Gigabit-Uplinks_stcVVproductId149516712VVviewprod.htm

    Bruce
  • Mike GMike G Posts: 2,702
    edited 2012-10-02 09:52
    Yea, I understand, but what about interfacing multiple Spinnerets to the same PC. There has to be some type of hardware with multile ports to plug in the data cables, and from there how is it interfaced with the pc?
    Since you mentioned HUB in the title, I assumed you understood a network cable was required to connect the Spinnerets to the network.
    Now we are getting somewhere. So in other words, I could access 23 Spinnerets and 1 PC with hardware similar to this, and by assigning each spinneret a unique IP?
    Correct, each Spinneret requires a unique IP and MAC on the network. You could even have mixture of WiFi routers and switches connected to many Spinnerets. There could be 23 Spinnerets in remote locations all over the world as long as they have internet access.
  • idbruceidbruce Posts: 6,197
    edited 2012-10-02 10:04
    Mike
    Since you mentioned HUB in the title, I assumed you understood a network cable was required to connect the Spinnerets to the network.

    I understood to a certain extent, but not completely. I was under the assumption that the spinneret simply connected to an ethernet card. I have always been pretty knowledgable about computers, except for the subject of networks, setting up the IP addresses, and such. I did not know if anyone had experimented with setting up a complete network of spinnerets. I have heard that a home PC can be used as a web server, but I never took the time to find out how or if it could actually be done.

    Bruce

    Either way, thanks Mike and Rick
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-10-02 10:26
    I have 2 Spinnerets and have them both connected to my network at the same time with various other devices. Does that constitute a complete network?? A number of us have Spinnerets connected to the Internet at a time. Does that constitute a complete network. :lol:

    I don't mean to be flippant but the Spinneret is a device with an Ethernet interface and a TCP/IP stack. As such, it falls under the category of a bazillion other devices that are inter-networked with TCP/IP over Ethernet. If you can find the Application layer software to run on the Spinneret (or any of these other devices), it can act as an HTTP (web) server/client (thanks to the FANTASTIC work by Mike G), a PropForth based Telnet server or HTTP server, a network time client and possibly server (NTP - Beau Schwabe?), I believe an SMTP client (email), I believe a DHCP client (dynamic IP address fetching), and possibly/probably others. Jeff (OBC) has a Tweeting Propeller but that is with the MIcrochip ENCJ...whatever chip

    I don't think any one has code for DNS resolution yet - the ability for the Spinneret to use something like twitter.com in an HTTP request and resolve it to 199.59.150.7 - this is a big chunk of code. So for now, everything uses hard coded IP addresses - not a big deal on a private or small network of Spinners. HOST file support would be kind of cool.

    So basically, once you have the Ethernet connection and can talk to the TCP/IP stack, you can do bunches!! Like everything else then, it just becomes a matter of time, money and interest!! :lol:
  • Mike GMike G Posts: 2,702
    edited 2012-10-02 14:21
    I don't think any one has code for DNS resolution yet - the ability for the Spinneret to use something like twitter.com in an HTTP request and resolve it to 199.59.150.7 - this is a big chunk of code.
    I built a DNS library, among other things, for the W5200. One of these days I'm hoping to model the Spinneret libraries after my W5200 work.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-10-02 14:24
    Cool, Mike!

    I missed (or forgot) the DNS library in that thread!

    You da man!! (again!)
Sign In or Register to comment.