im wanting to figure out how to make a raw serial bridge (ttl levels because its going to talk to microcontrollers only)
so i guess it would be a ethernet-ttl bridge and if someone wanted serial they would just need a level converter (for longer distance runs)
i have a netduino plus and have been expirimenting with neonmika but i want something like a raw serial tcp connection
something that i could connect to with hw vsp (hw virtual serial port) http://www.hw-group....p/index_en.html
they have developer info available and some source code
i have used this before to connect to other devices and i like the implementation (freeware)
it basically makes a new serial port on the pc and directs all data to/from that port using an ip address and port
i have a number of devices that i could communicate with using this from anywhere
basic setup would be internet-netduinoplus-arduinomega-sensors
then i could startup hwvsp from anywhere and connect to the correct forewarded port on my wan ip and be connected to the remote serial port
then i would basically be able to monitor serial data from my adruino mega or any other serial device from any internet connected location
the reason being for a large number of simple sensors using the arduino as a dedicated sensor data log / parser
makes more sense (free's up the netduino to do other things)
as follows
remote serial port connection established using hw vsp
serially encoded sensor status request is transmitted to netduino+ over ip
netduino+ sends from ip:port all raw serial data to an enumerated ttl level serial port
arduino detects serially encoded sensor status request on its own enumerated serial port
arduino transmits serial encoded sensor data string
netduino+ sends to ip:port all serially encoded data
by enumerating the serial port it allows for the netduino's role to be limited and within its scope reliably
because the processing is done before and after the netduino
ideally a way to ignore all other packets would be an added stability measure
im going to setup a hw vsp connection between my phone and my pc later and i will log the packets for the serial data while simultaneously using a serial port monitor to catch the corresponding serial port data so i can decipher how hw vsp formats packets and how the header data is formatted i will post back after i have learned more
im posting here cause i have searched and searched for any related code and have not found anything yet
any and all input/links/ideas is wanted and appreciated
the netduino's role would basically be that of a serial-over-ip solution but with more customization possibility
and to clarify i dont want to connect to the internal serial port that you get when you connect to the computer with usb i want to connect to an external facing enumerated serial port on the netduino so that it can provide for communication with a ttl serial device (my arduino)
and my second question is would spi or i2c be better for this purpose ?
or would there be a way to emulate a arduino ethernet shield on a netduino+
the arduino code required would be minimal because the interface can be configured/ stack managed automatically by the nd+
i know there are hardware solutions available but i think this could be an interesting useful addition to the netduino+ platform
as a library that could be used by others to allow for subservient tasks to be automated by another controller transparently using the netduino+ as a communication medium while it still performs other tasks
![Photo](http://www.gravatar.com/avatar/c03e6af9eed7abb351533c69625aba39?s=100&d=http%3A%2F%2Fforums.netduino.com%2Fpublic%2Fstyle_images%2Fmaster%2Fprofile%2Fdefault_large.png)
serial <> ethernet bridge
Started by dudeman420, Jul 12 2012 04:18 PM
2 replies to this topic
#1
Posted 12 July 2012 - 04:18 PM
#2
Posted 23 July 2012 - 11:58 AM
Hello,
Im not 100% certain, but i think it would be wiser to use the netduino+ to decode the TCP/IP packets and then send on simpler commands to the arduino to read sensors and parse back data.. I would suggest using the Sockets in C# to communicate to the driver, using the API and the debugging in VS to let you look into the data being sent, you can then write a decoder class for the netduino, and then use serial or I2C or SPI for communication.. Serial is probably the slowest of the three, but the simplest to get working at first..
If you are using the serial in the neduino, just use eventhandlers on serial and the TCP/IP connections to ensure rapid response.
#3
Posted 03 August 2012 - 06:16 AM
Hi there,
I am working something similar. I hope to have something done by monday. Regards
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users