Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Local TCP
#1
Hi,

Is this feasible? I understand the the principle of TCP/IP is microsoft comms over the internet. I am hoping that there is a simple'ish way around.

Run a tcp/ip session within a network?

I have a very useful RF relay box, it has a TTL serial port (RS232) for configuration and ethernet or sim connection to remote server. It opens a session with the server, sends buffered payload of tag data (recieved via rf) in short hex strings, checks for messages, closes session. The server has to remember to close the session after too. It works very well as a private mini network.

Some applications, especially in other countries have no existing infrastructure so i want to build an offline version that can be solar powered and simply log the data through a decode/parsing routine. The pi sd can then be put in a samsung/other tablet and provide locations on a pre-downloaded map of the area, eg, gps locations of released animals for conservation.

I've been able to interrogate the modem using telit's AT cmd library and have been able to get a terminal on the pi (Serial to USB COM port) to output the tag ID and some signal strength data as it is sent. But, can't work offline as only works if there is data going through the GSM modem. Also, the extended packet data (the GPS locations) isn't available. So not an option at this stage.

Plan b is to run an internet of 2 devices, each with a separate tp link style usb router (hopefully low power with wan and lan) and external IP address. The relay box using ethernet opens a session with a tcp/ip handler running on the pi and, initially log all data, unparsed in a simple database. I can configure the dataserver address on the relay and assign a static IP address on both devices.

This may well be a hardware person oversimplifying networks and software. Python has been pretty versatile so far with libraries for anything (control of individual bits in i2c two way messaging most recently) so i thought i should ask. A crossover cable between relay and pi would be the best but i think that's maybe even more absurd.

Also, if the system is run within a conventional network (both devices connected to the LAN ports on the same router) you just get a load of 'hello' s.

Thanks for advice, can it be done?
Ben.
Reply


Messages In This Thread
Local TCP - by hackysack - Jun-14-2017, 09:29 PM
RE: Local TCP - by Larz60+ - Jun-14-2017, 11:20 PM
RE: Local TCP - by hackysack - Jun-15-2017, 10:30 AM
RE: Local TCP - by sparkz_alot - Jun-15-2017, 01:14 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020