Internet relay using XBee modules - ip

I'd like to use two Xbee modules for a point-to-point Internet relay.
Something like this:
eth0(host1) <-> Xbee(1) <-> ... <-> Xbee(2) <-> eth0(host2)
Setting up a serial connection with Xbee is simple (I'm using two Arduino boards).
But how do I get TCP/IP to Serial? So I guess my main problem is this here:
TCP/IP <-> Serial <-> ... <-> Serial <-> TCP/IP
How can I do this?
I guess I have to setup PPP or SLIP for that - but have no clue how to do that.

Related

HC-05 Module sending data problem (Mater + Slave)

I've been working with a Siemens PLC to send data using RS232. The communication itself is working perfectly, I can monitor it if I connect the PLC to my PC (via a serial comm port).
Now, I wanted to make this communication wireless. I found out about the HC-05 modules and decided to get a few. I set 2 of them up with my arduino (one as master, one as slave, both paired and using the UART 9600,1,0 which is the same that my PLC uses).
I made the following connections:
PC Connection (with a serial comm adapter)
PLC Connection
Let's say I want to send this string:
<SoH>1RZ<CR>
If I check my serial monitor, I get weird stuff. Like:
##NULL©#NUL
The weird thing is that if I just remove the bluetooth modules and connect the PLC's Rx and Tx to the PC's Tx and Rx, respectively, the data is sent flawlessly. So I know that I have everything sorted out on the PLC/PC side.
Has anyone been through this, or does anyone have a suggestion that I can try?
RS232 typically uses ±12V. Negative voltages between -3V and -15V is logic high and positive voltages +3V till +15V is logic low.
Your bluetooth module on the other hand uses TTL logic. With a voltage range of 0-5V.
0-0.8V is low, 2-5V is high.
So
a) you cannot create the necessary voltage levels
b) you risk to destroy your 5V hardware by connecting it to ±12V.
c) you might run into problems as RS232 also has optional mechanisms for flow control. So Rx and Tx might not be enough.
You'll at least need a TTL-> RS232 level shifter for the PLC side and a USB to TTL serial adapter for the PC

How to interface ethernet with STM32 Microcontroller?

The project uses an ethernet loop which is connected through the STM32 Microcontroller. I have to use ethernet switch IC(4 port). What are the topics that I have to know so that I can use the ethernet in the project? Also how to interface the ethernet switch IC, transceiver with the MCU? How to read and transfer data (integer data) through the ethernet.
It does not matter what you want to send over ethernet and how many ports your switch has. You need to know what protocol your other devices use. At the moment you most of them use TCP/IP and you need to implement it in your app. CubeMX has support for LWIP stack.
You can also use external chips with built in TCP/IP stack like Wiznet W5100, 55000 or other chips.
How to read and transfer data (integer data) through the ethernet.
You will need to read about TCP, UDP, ports, sockets etc. It a too wide topic to be answered in the forum post

how to connect coordinator running over zigbee with end device (Xbee, S1)

How can i connect Xbee s1(having zigbee) as end device to a board running as zigbee co-ordinator?
As i am unable to connect one Xbee device (s1) to coordinator (zigbee) running over board.
I think XBee S1 does not have ZigBee protocol (as far as I know). XBee S1 uses 802.15.4 protocol to communicate with other device (module) and can not talk to other ZigBee device(s). But, anyway, to connect to other XBee S1 and doing simple sending and receiving data, you can configure them with XCTU.
Series 1 xbee's can't load the Zigbee firmware as mentioned. You need to go into XCTU and load either 802.15.4 or Digimesh. I recommend Digimesh. Then just set them to broadcast and it should work. Otherwise for unicast communication you have to set the destination address of the transmitting xbee to the serial number of the receiving xbee (which is on the back of the xbee or you can read it from XCTU after pressing the 'read' button while having the xbee attached.

UART Over IP - How to?

For a student project we have a device with a serial port (UART) wich communicate with a computer by wire.
As we want to make this system wireless (Device can be far far away from the computer), we had the idea to make the device communicate over IP ;
:
Device Serial port ==> UART/RJ45 converter ? ====> Router ===>Modem
Our question is mainly on the UART RJ45 converter. Does such device exist ? we saw some like this :
http://www.ecnmag.com/product-releases/2008/12/embedded-lan-module-connects-10/100baset-lans
But then how to adress the remote computer ? we would like to copy all traffic from the device and send it back to a specified port on our computer.
We also thought about changing the firmware of the router to OpenWRT to achieve this
Thanks in advance
... You could just get a raspberry Pi, which runs Linux and gives you low level access to a set of IO pins. Or use an Arduino with the Ethernet module. All of which are readily available and easy to procure. The Arduino and Ethernet modules are for sale at just about every Radio Shack these days.
Unless you have a need to communicate at speeds greater than around 100kbps, the above solutions should work fine.
Edit:
Note that there are Serial libraries available for the Pi:
https://projects.drogon.net/raspberry-pi/wiringpi/serial-library/
Finally I found a good solution thanks to you guys.
I ordered an Rasperry Pi which have IO pins as Wing Tang Wong said, including a set of Rx Tx pin functionning at 3,3v.
Our device work at 5v, so we are going to use a logical converter.
On the RPi we are going to use the ser2net package wich translate a serial input to a TCP/IP network signal ;)
Job done !
Thanks again

Cisco switch and router programming using Arduino?

So, this topic is very similar to this Cisco Switch/Router programming using Arduino?.
I have an Arduino ATmega2560 and Ethernet Shield plus a Cisco 1751 router. I want to configure the router via the console or AUX port using Arduino.
Fast search gave the following results: you could connect to the router using RJ45 to Serial or RJ45 to RJ45 connectors; the protocol is very similar to Telnet (actually works like serial port with text-based commands).
So the main question is - am I able to control the router via a console or AUX port using Ethernet Shield (and an Ethernet library) or do I have to use a serial port connection using something like RS-232?
Update: I've noticed one thing - the DB9 port is just an option for easy communicating with a PC so it seems that my idea is not so bad:) See Cabling and Adapter Setups that Work.
As you have pointed out the console and aux ports on Cisco devices are serial ports not network ports so you need to connect to them using RS232, this is an entirely different type of interface from Ethernet.

Resources