Some basic questions on the Spinneret
T Chap
Posts: 4,223
I need to add ethernet/LAN connedtivity to one or more Prop based systems. The idea is to do something similar to what I can do with RS485 or with a Wifly (wifi/uart) interface. With RS485, I can daisy chain numerous systems together, assign an ID to each, and communicate to any or all devices from a master device. In this configuration, all devices can only respond to a request from the master. In the case of the Wifly wifi device, it gets set up with it's own IP, it can autoconnect to the LAN after setting its parameters, and it connects to the Prop device via UART. What I am looking to do is come up with an optional ethernet based method to connect one or more Prop devices, so that on the LAN, a device can be connected to a router and communicated with from a master device on the LAN.
What I would like to find out is, can I connect the Spinneret with a simple rx/tx connection to main Prop, so that the Spinneret can be configured by the main Prop device. The most basic thing to configure in the Spinneret from the main Prop device would be the IP that the Spinneret uses on the LAN. The main Prop can tell the Spinneret to use IP 192.168.1.1 for example. Then when the Spinneret appears on the LAN, any other device can send a packet to the device, the Spinneret sends the packet to the main Prop, which parses the packet, performs checksum, acts on the Opcode etc. There is no memory left to add code for an onboard Wiznet add on, there are only 2 pins available for rx/tx, so an external option is required.
I will order one of these and test it out, but was hoping someone could confirm that it will accomplish the goal which is to replicate the RS485 and Wifly.
Thanks, for any comments.
What I would like to find out is, can I connect the Spinneret with a simple rx/tx connection to main Prop, so that the Spinneret can be configured by the main Prop device. The most basic thing to configure in the Spinneret from the main Prop device would be the IP that the Spinneret uses on the LAN. The main Prop can tell the Spinneret to use IP 192.168.1.1 for example. Then when the Spinneret appears on the LAN, any other device can send a packet to the device, the Spinneret sends the packet to the main Prop, which parses the packet, performs checksum, acts on the Opcode etc. There is no memory left to add code for an onboard Wiznet add on, there are only 2 pins available for rx/tx, so an external option is required.
I will order one of these and test it out, but was hoping someone could confirm that it will accomplish the goal which is to replicate the RS485 and Wifly.
Thanks, for any comments.
Comments
I disagree, a basic TCP device takes less than 2,500 longs of memory. That include the W5100 driver, serial port driver, and logic for 4 concurrent port requests.
There's no reason to use HTTP for your project. You could go with basic socket programming; open a socket, send some data, process the data, and send a response. Everything you need is in the HTTPServer or the Indirect driver. Essentially, just remove all the HTTP protocol stuff. It's similar to processing buffered serial data. You will have to find a way to get the packets to the server - custom client code.
Don't hold me to it... Kinda' have a few irons in the fire right now.
I have a gadget that already has code to parse RS485 packets. I am adding the Wifly wifi module and Spinneret to allow ethernet and wifi access, which will use the same packet parsing protocol once the data is in the Prop. The Spinneret and Wifly will operate either as an HTTP server, or as simple connection between devices on the local network that can send packets between each other via TCP/IP. I like your code that will allow the variables to be sent to the server from a remote PC in the /00/00/00/00/00/00 manner, this will work great for the server mode.
Here is a video that shows the concept of non-server type use of wifi, when I get the Spinneret the ethernet option will be just one of 3 methods to send packets or allow access remotely via HTTP. I'll post a demo of the Spinneret also when it is running.
https://www.youtube.com/watch?v=sSMNqzlnagk