How do I serially send commands (telnet) to device directly hooked up to a network? - telnet

I have a device that typically is set up to be communicated with via telnet with a serial device server and the port it is hooked up to.
However now it is connected to a different switch, directly connecting it to the network. Is there a way to serially communicate with the device using just the IP?

Related

Is there a way to uniquely identify a specific usb port on a host device?

This question may be very broad but I'm trying to keep it platform agnostic.
If I connect a device to a USB port on a computer, is there a way for that device to uniquely identify the port it's connected to?
e.g. I have a PC with 10 USB ports. I have a smart phone that's programmed to run Function A if it's connected to Port 1 and Function B if it's connected to Port 2, etc...
Is there a way that the smartphone (the peripheral in this case) can identify the specific port on the host?
Is there a way it can identify the host device as a whole?
Basically, does the peripheral know anything about the host?
Is there a way that the smartphone (the peripheral in this case) can identify the specific port on the host?
No, only the host knows which port a device is connected to. They all look the same from the phones point of view.
Is there a way it can identify the host device as a whole?
Basically, does the peripheral know anything about the host?
Not with USB per se, but you could implement some identification in a higher protocol.
Look at later implementations of the android debugging protocol for example: The host sends an ID to the device, and unless it matches in the device database the user will be asked: "Do you want PC (ID) to be able to debug this device?"

How to intercept messages between usb device and host controller?

I have to write a usb over ethernet application. Using vhci - (http://sourceforge.net/projects/usb-vhci/?source=typ_redirect) I am able to create a virtual usb device. Now I need to intercept communication between actual device and server and redirect it over ip to the virtual device created on the client. I need help regarding this interception part.

What is the best way to send data to PC from "MCU + Wifi Module"?

I don't know anything about wireless protocols. With this quick setup i want to get inside. I just want to write a windows desktop application which receives only a couple of bytes of data from a mcu+wifi module "NodeMCU" which is connected to the same router. I can write a simple desktop app with visual studio. But sending data over ip has many methods as far as i read.
What is the simplest way to achieve? (I'm experienced in STM32 mcu's and electronics except internet protocols.)
You can send the data from the embedded board (with the mcu) to a TTL-To-WiFi module. Then from your PC application you should open a socket and connect to the module IP to listen in the correct port the data from your board.. There are a lot of module in the market used as "bridge" or converter: you have only to setup in it the local IP address, the destination IP (your PC) and the TCP port where you want to send data. From point of view of the board you use a standard USART and the message is sent to the destination IP. In your PC application you should be able to create a socket and connect it to the wi-fi module.

Can I duplicate the behavior of one tty on another tty device

I am currently developing an application that connects to a device via USB but due to project modifications I have to move it to a target device whose only serial communication is via RS-232 DE-9 port.
To communicate with the device I use a proprietary API. Using strace I know that it scans all devices in /dev/bus/usb and after finding the right one the API connects to it.
I wanted to know if I could some how emulate my device in /dev/ttyS0 to an unused usb device in /dev/bus/usb/ to connect to it

If possible, how to connect iPhone to an external device and a router programmatically, both WiFi

I would like to create an application that connects to the internet by using WiFi. That's easy, but i also want to connect the iOS device to a standalone WiFi device. (Device is classified)
So basically i want to connect programmatically to two devices at once using a single WiFi chip
Is this even possible (couldn't find anything that proves so on internet). And if possible, how do i do it?
iOS device can't be connected to two different wireless networks at the same time.
Even more: you can't programmatically switch between the two networks - user has
to do it trough the settings application.
So: if the device is on the same wireless network as your router (gateway to internet) then you'll have no problems connecting iOS to internet and to your classified device.
However: if classified device is on a seperate (possibly AdHoc) network then user will have to switch between connection to internet and connection to classified devices's wireless network.
If you're the designer of classified device it would be best if you can manage the connection trough wireless access point. This would be the only way to connect iOS device to your classified device and internet at the same time.