Have you looked at the ‘socket’ python library ?
François
> On Mar 27, 2015, at 3:05 PM, bobdxcool <[hidden email]> wrote:
>
> I am new to TCP socket programming. I have a django based server
> communicating with a microcontroller. Now, I want to implement TCP based
> socket on the server side in order to communicate with the TCP socket on the
> microcontroller. Can anyone give me an idea on how to do this ? What
> libraries should I use on my django server The microprocessor basically
> opens the socket every 5 seconds and sends a notification to the server. I
> on the server side should be able to read this and pump data back to the
> microprocessor using this socket which was opened by the microprocessor.
>
>
>
> --
> View this message in context: http://python.6.x6.nabble.com/Django-TCP-Socket-Communication-tp5090792.html
> Sent from the django-users mailing list archive at Nabble.com.
>
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1427483125637-5090792.post%40n6.nabble.com.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/DAE16363-2EEE-4E0F-A230-A31BB270E2F9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
If you reply to this email, your message will be added to the discussion below:http://python.6.x6.nabble.com/Django-TCP-Socket-Communication-tp5090792p5090799.html
Hello,
it's a bit hard to understand what you exactly want to achieve. How can you communicate with the microcontroller? Do you connect to one of its TCP ports, and send it data, I assume. Is it done with a well-known protocol, like HTTP, or some custom one?
You say that it opens a port every 5 seconds to a server. Where is that server? Is it on the same machine as you Django based application? How does the microcontroller and the server communicate with each other?
There are so many architectural questions here before you get to a web application, and I'm afraid you original question cannot be answered before we see the whole picture.
Best,
Gergely
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGpTunuCPXJZo82m1nefz_tvbQJ9Y3-S3en1GZj3aFHsMx7fHg%40mail.gmail.com.
it's a bit hard to understand what you exactly want to achieve. How can you communicate with the microcontroller? Do you connect to one of its TCP ports, and send it data, I assume. Is it done with a well-known protocol, like HTTP, or some custom one?
Yes, one of the TCP port on the micro-controller is connected to and data is sent via this to the server.
You say that it opens a port every 5 seconds to a server. Where is that server? Is it on the same machine as you Django based application? How does the microcontroller and the server communicate with each other?
The server is django based one. I still need to implement the communication part on the server side. Need suggestion on how to do this using TCP sockets.
Hello,
it's a bit hard to understand what you exactly want to achieve. How can you communicate with the microcontroller? Do you connect to one of its TCP ports, and send it data, I assume. Is it done with a well-known protocol, like HTTP, or some custom one?
You say that it opens a port every 5 seconds to a server. Where is that server? Is it on the same machine as you Django based application? How does the microcontroller and the server communicate with each other?
There are so many architectural questions here before you get to a web application, and I'm afraid you original question cannot be answered before we see the whole picture.
Best,
Gergely
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGpTunuCPXJZo82m1nefz_tvbQJ9Y3-S3en1GZj3aFHsMx7fHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACczBUKgmHjkucnSM4yE2apmFFZOPV6-YdA_R1EgVQybRsvusA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
If you reply to this email, your message will be added to the discussion below:
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGpTuntzqwVFUfouUT%2BEvxL1AFvap25KNocQrL5o0xK1EBcJWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Hi,
I made a TCP Server Socket programming in python, it's nicely communicating with micro controller, and also i can store latitude ,longitude values in MySqldb from GPS output. Now I want develop a web application for vechile tracking. How can i do this stuff in django. I would be thankful for all the help i can get!
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c37c35fd-d238-4e8e-a6de-7cb3ea31536f%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/57628F8C.5030102%40gmail.com.
But there is no easy way to push arbitrary data through TCP socket to Django server directly - Django is mainly build around HTTP request - response cycle.
-- Regards, Clifford Ilkay + 1 647-778-8696
Simple script receives data from GPS tracker and stores data into database. Django has geodjango application for plotting point at the map.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f673b082-013d-46da-ad91-cf59b75dd229%40googlegroups.com.