How to use twisted pair as console to manage Cisco devices? - cisco

Is this possible to use a normal twisted pair cable or roll over to manage Cisco devices through console port? (without any converter to USB) I tested before a roll over and connected it to Cisco switch but it didn't worked. is there any kind of software to virtually convert a twisted pair to console?

If line vty is activated you Connect your device to a computer via ethernet cable and use telnet or ssh to do that

Related

Can a USB 3 Host machine be programmed as a USB 3 Peripheral (or a HID keyboard)?

What I want to do:
An AI program on a host machine, reading inputs from a camera sensing the screen of the target machine and outputting controls to the target machine via USB connection--programming the host machine's USB host as a USB peripheral connected to the target machine.
What I want to do step by step: (is it possible to implement the steps below?)
Have a host machine A and a target machine B.
Connect A and B with a USB 3.0 Type-A male-male cable.
The USB connection shows up as an HID keyboard device on B.
Write code to simulate key presses on A that sends to B.
(Eg. calling press('F') on a program running on A would type F to B's input)
It shouldn't require any program installed on B.
What I already searched:
USB 3.0 Host to host connection is possible:
https://superuser.com/questions/795053/how-do-i-connect-two-computers-using-usb-3-0
USB 2.0 Host to host connection is impossible:
https://superuser.com/questions/99274/how-to-connect-two-computers-with-usb
Similar questions asked without the assumption that USB 3.0 Host to Host connection is possible:
https://superuser.com/questions/1128365/simulate-usb-keyboard-from-machine
Setting up a computer to act as an HID device connected to another computer via ps/2,usb or another wired connection
https://superuser.com/questions/507921/computer-to-act-as-keyboard?rq=1
Suggestions in ascending order of feasibility:
USB Gadgets
You are using linux, so the default way would be to create/configure/load a gadget driver. Have a look at this tutorial, though for a raspberry, should work on your PC too. However, I could not find any information regarding the use of USB3 - the tutorial assumes your host is using one of it's OTG ports, which your PC most likely does not have. So whether this works with your USB3.1 Type-A-to-Type-A connection you'll need to test.
USBIP
The idea of sharing USB devices (not just keyboards) is not really new. With USBIP you can "export" any local USB device to the network, and your client will need the client-side USBIP driver to access the keyboard.
Dont bother with USB at all, just use Ethernet
I'd simply write two userland scripts/programs that send/receive+execute the keystrokes. Very easy to implement, you're probably familiar with python anyway.
If you absolutely cant have software installed on the client-PC and your Type-C-to-Type-C connection doesnt support USB Gadgets, there's another way. It basically involves the use of two USB-to-serial adapters (~15$) and a serial cable. While this wont be enumerated as a keyboard, but rather as serial port, it's the lowest-effort solution to transfer data without additional software on the client. Both computers will just do file I/O. If your computers still have COM-ports, you can even omit the serial converters!

beaglebone black wireless bluetooth AVRCP

I am working on a project with the beagle bone black wireless, where I need to be able to send music control commands to a phone. Note, I don't want to stream music to my beaglebone. I have spent about a week looking online, and found very little about this.
The OS for the beaglebone is Debian Jessie. I can get things like hci0tool, Bluetoothctl, hciconfig to work. I can detect and pair to a device. It seems though that my connection only lasts for the pairing process, and fails every time afterwards.
My current process is executing:
sudo su
bluetoothctl
power on
agent on
default-agent
scan on
I get the mac address
scan off
pair <MAC Address>
trust <MAC Address>
connect <MAC Address>
As of now pairing and trust succeed, though the connection ends after pairing finishes. And I have no idea of where to start for sending a command to a phone.
Connect call on Device1 interface will tries to connect all the profiles supported between the device and adapter. This happens by negotiating or exchanging the supported profiles.
Connection may not be possible when Adapter doesn't support the minimal requirement of profiles which is needed by the Device. In this case, you may need A2DP provider in adapter end to get connection successful. Yes, this is contradictory to this statement.
If you don't want to connect with all the profiles between Device and Adapter, then you can use ConnectProfile method in Device1 interface.
But bluetoothctl doesn't provide commands to achieve neither ConnectProfile nor you AVRCP commands.
You need to use D-Bus calls to get the communication with Bluetoothd. If your application is command line/shell based, you can use dbus-send/gdbus commands to address the D-Bus interface.
Although bluez-tools implements media control AVRCP commands, it doesn't provide any utility which uses it. Either you can compile bluez-tools as library and develop application using the media control API or use dbus-send/gdbus.
I have started with some samples using GDBUS, but not yet for AVRCP controls. See here : https://gist.github.com/parthitce
and Documentation here: https://www.linumiz.com/category/blog/

Linux USB modem SMS alerts

Trying to develop application using USB modem on Linux. Using Huawei E220 with CNMI=1,1,0,1,0 setup (also tried other CNMI settings none worked) and getting New Message Indications on received message to serial also on received Status delivery message. Is there any other way how to configure the device to enable received SMS alerts ? thanks Under windows machine it is working with no problems. The only problem is linux. Thank you
After a lot of testing and trying to install many linux Mobile Partner drivers finally I came up with an idea to try communication with the modem on different serial port. Linux mounts 3 different serial devices when modem is connected and as i was comparing the modem behaviour on linux to windows i had to connect to the third mounted serial port. I absolutely do not understand why the modem is accessible on two different serial ports but i found out that only one of them can write triggers to serial console. So in case somebody would have the same problem as i had the solution is to test all available serial ports in my case it was /dev/ttyUSB2.

Use a Linux Computer as a USB Coupler

I am on debian and:
I have a USB controller hooked up to a USB port on my PC (Device 1).
I have a male to male USB cord hooked up to another port on the PC that connects to Device 2. (it is a "bridging" usb cord, and has the chip for it)
I want to make them connect to each other as if they were one cord, so neither device knows that there is a computer in the middle.
This would be called a 'Coupler', except that I am using a PC as a coupler.
Here is a (really bad) diagram I made:
What I have done:
I have been able to connect the two devices independently of each other and sniff the results for when they fail to connect. The devices don't send a large volume of data back and forth.
Maybe there is some kind of command tool that I could use, for example (psudocode):
$ couple-usb-ports PORT1 PORT2
You're trying to reinvent the wheel here.
You might consider looking at this link instead.
http://dan3lmi.blogspot.com/2012/10/sniffing-usb-traffic-different.html
Specifically this.
Windows: You cannot directly capture raw USB traffic on Windows with Wireshark/WinPcap, but it is possible to capture and debug USB traffic on a virtual Windows machine under Oracle Virtual Box.
You cannot use a simple PC as transparent USB sniffer without extra (expensive) hardware. An USB bus has always one host (and one or more devices), and the PC can only be the host. This is a hardware limitation.
But you can capture USB data in a Windows machine using Wireshark and USBPcap, eliminating the need for the middle box in most cases.
As this post is tagged Linux, I suppose the controller PC is a Linux machine. Instead of connecting USB ports with a male-male connector, which is all kinds of bad (you are connecting the 5V lines of both machine with each other!), just run Wireshark in the controller PC.
There might be a little work to be done previously, as you have to enable Wireshark for USB monitoring (Particularly in Debian, this is disabled by default), and you might have to install a small driver to enable the monitoring. Have a look at this page for more information.
Once you get it working, Wireshark is an excellent tool for this!

how to read from and write to a serial port (ttys0) from another pc via ethernet (eth0) on Ubuntu/Debian?

Well, there are two pc's connected via Wi-Fi and one of those (let's call it A) has a serial port printer (in ttys0) and a measure serial port device (in ttys1) connected too. So B needs to read some values from the mesure device connected on A and then write to the printer connected on A using a network connection.
ser2net is a good solution for this
aptitude install ser2net
Then edit the config in /etc/ser2net.conf
You can then make a tcp connection to a defined port and be connected to the serial port on the remote computer - very useful.
I don't know if Ubuntu has anything built-in, but you could run a couple of daemons using netcat. Of course, if you want it to be secure, you'd need to do a little more work.

Resources