I am trying to paste a line; which is:
setenv -p STARTUP "ifconfig eth0 -auto;boot -z -elf 136.170.195.87:vmlinuz-nfs-7231b0-D183-NFS-DEBUG 'root=/dev/nfs nfsroot=136.170.195.87:/export/home/joshis1/vmlinuz-nfs-7231b0-D183/rootfs/nfs rw bmem=226M#30M ip=dhcp'"
When I try to copy the line in minicom, the line is not copied completely.
What should I do?
I have solved this by setting Character tx delay to 1ms.
Ctrl+A followed by z
select 't'
select 'f'
type '1'
and there you go!
Maybe you are running without line wrap on? I had a problem until I started invoking with "minicom -w". In the problem condition, output line content beyond screen width was lost, input line content wrapped to beginning of line.
If I'm not wrong you should exit minicom, start it again with "minicom -w".
Or even better, try using 'screen' instead of 'minicom'. I gave up minicom a long time ago in favor of screen. Once you get used to it, you'll never go back!. Chris Stratton was probably right: you're overrunning the target. There is no flow control in virtually all embedded targets. That said, I do these copy operations from screen all the time using screen to set u-boot environment variables, and never have any issues. Depends on your target, too!
Invoke screen something like this:
screen /dev/ttyUSB0 115200
Of course, the device node corresponding to your serial port will be different depending on your serial device. The example above is typical for Linux with a USB serial dongle. On my macbook, it usually comes up as something like this for the same serial dongle:
/dev/tty.usbserial
If you like vi, you'll love screen.
I do like the suggestion of this answer to use screen.
However, if you want to keep using minicom an option is to enable both Software flow control and Line wrap.
To enable Software flow control:
press Ctrl+A followed by o
go down to Serial port setup and enter it
press g to switch Software Flow Control to Yes (if not previously enabled)
press Esc and select Save setup as dfl if you want to permanently save the configuration
To enable Line wrap:
press Ctrl+A followed by o
go down to Screen and keyboard and enter it
press r to switch Line Wrap to Yes (if not previously enabled)
press Esc and select Save setup as dfl if you want to permanently save the configuration
Line wrapping can also be enabled by starting minicom with the -w option or by pressing Ctrl+A followed by w.
Related
I am a bit new here, English is not my native, so I am sorry for any possible misspelling.
I have a very odd problem - my Xiaomi Mi Surface Display 34" (XMMNTWQ34 model) monitor buttons act really strange - instead of calling the monitor OSD, pressing any of 4 present buttons tries to switch to another possible input source (this is even not their function!), but no luck: just 3 seconds of the black screen and it turns back to the initial image. Let me explain how I got into this.
I have a monitor named before, which has 4 input ports: 2 DP and 2 HDMI. There is a PC always connected to the monitor via the DP interface (DP1 to be exact). Today I tried to connect a second PC via HDMI to the HDMI1 port. It went totally good, I was able to switch between PCs using a monitor OSD. But I thought it was too long and complicated to press a dozen buttons on OSD just to change an input source, so started to google any other programmatical methods of doing such thing.
Some fact: there are no drivers for this monitor on the Internet (it actually works at full 3440x1440#144 Hz resolution/refresh rate via DP interface without any trouble, but Windows sees it as "Generic PnP Monitor", so I see no way to fix it without a relevant driver).
I have found that any VESA-compatible monitor has the 0x60 parameter, which means exactly "input source", so altering the value of this parameter switches the input source without the need to call an OSD. I have found that the possible values of this 0x60 parameter for my monitor provided by several utilities are: 0x0F, 0x10, 0x11, and 0x12. But setting any of these values got me no luck - the screen just flashed black and nothing more. Moreover, those utilities showed that the current value of the 0x60 parameter was 0x07 - described as "S-Video 1" input source, and it did not change at any made tries. But my monitor does not even have such input ports!
But I discovered a total disaster a bit later - when I tried to switch the input source via OSD, I was not able to call it - any of the 4 buttons on the monitor was causing a black flash and nothing more! So OSD is now totally unavailable! This is madness. I can't enter the OSD, I can't change the input source without turning off any one of 2 connected PCs, I can't do anything which is supposed to be made via OSD. Rebooting and reattaching of every possible thing has no effect - even with 2 PCs being connected to monitor and waiting to enter a BIOS password (no OS loaded whatsoever): pressing any button on the monitor causes only black flash and nothing more, no OSD called. I guess this is a strictly monitor firmware issue because the OSD worked well until yesterday.
I have absolutely no idea how to solve this, I googled this all day long, but no luck. System restore did not change anything. Please help. Thank you all very much.
Same issue after using ControlMyMonitor App. At the time being, i didn't found any solution to get the OSD back. And I didn't found any solution to factory reset the monitor, I don't know if it's possible.
I strongly discourage users to use any kind of VESA com application on this Xiaomi 34 monitor !
Now, the best solution in order to switch inputs, is to disconnect or shutdown one of the computer connected, ans it will switch automaticaly to the only one remaining. (Or use a VESA script...)
I've created a keyboard-like with v-usb. I wonder if it's possible to send special command like on my Logitech keyboard to open Calc, increase/decrease volume, shutdown PC, etc.
It ought to be achievable. First you may need to pretend to be a Logitech keyboard, in the event that certain scan codes are only acted on if the keyboard type matches.
Second, you would need to find out what the scan code is for those keys. You might get help at Scan Codes Demystified and USB IDs.
Recently I started using vim to development and since that time I'm only using PuTTY instead of NXNoMachine (with GNOME).
When looking up huge console logs I use Shift+PageUp/PageDown a lot to move up/down one screen and I'm used to using one line movement (Ctrl+Shift+Up/Down) as well.
Unfortunately one line movement doesn't work in PuTTY.
Any idea how to make PuTTY allow this?
It's Ctrl+PageUp and Ctrl+PageDown.
See Scrolling the screen back section in PuTTY documentation.
I am trying to get an arduino to tell my computer what the state of it's relays is. And for some reason every time it sends a new string PuTTY leaves the horizontal position of the last text. This makes for a very ugly display.
I would like PuTTY to look like the arduino serial manager.
Here is what it looks like from the arduino serial manager
This is what it looks like in PuTTY
This is the code I am using to send to computer from arduino.
You could have set Implicit CR in every LF option from PuTTY's terminal options instead of changing every line termination in your code from \n to \r\n.
Probably you should use "\r\n" instead of "\n" at the end of lines.
Send \r\n instead of \n only as end-of-line marker. A lot of terminals (incl. Putty, Minicom) require it.
I have two LCD's using Xorg's xinerama feature. Each LCD screen has a touchscreen which are connected to their respective USB lines.
Looking into the '/var/log/messages' file, I see the following:
kernel: input: Analog Resistive as /class/input/input0
kernel: input: USB HID v1.01 Mouse [Analog Resistive] on usb-0000:00:1d.3-1
kernel: input: Analog Resistive as /class/input/input1
kernel: input: USB HID v1.01 Mouse [Analog Resistive] on usb-0000:00:1d.3-2
For some reason, at some point in time the USB bus seems to reset (or something weird) and my two touchscreens get inverted (press the left LCD and the mouse moves on the right and if I press the right LCD the mouse moves on the left).
To try and debug the problem, I tried to write a udev rule to log when my devices get reset/disconnected (or whatever). But it seems as though udev will report full details (product, manufacturer, idProduct, idVendor, etc) on the device when it connects, but gives you nothing but a few bus numbers when it is removed. Why is this?
When I get an ACTION=="remove", KERNEL=="input*" rule, there is no way for me to know which device it is! Does anyone know a way around this?
i'd suggest first thing check udev events on device "remove" event by running e.g. udevadm monitor --kernel --property --subsystem-match=usb and disconnecting your devices in turn and comparing outputs.
Here on a single mouse disconnect i get two events:
KERNEL[6680.737678] remove /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0
DEVTYPE=usb_interface
INTERFACE=3/1/2
MODALIAS=usb:v09DAp000Ad0034dc00dsc00dp00ic03isc01ip02in00
PRODUCT=9da/a/34
SEQNUM=2835
SUBSYSTEM=usb
TYPE=0/0/0
KERNEL[6680.739577] remove /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
ACTION=remove
BUSNUM=002
DEVNAME=/dev/bus/usb/002/006
DEVNUM=006
DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2
DEVTYPE=usb_device
MAJOR=189
MINOR=133
PRODUCT=9da/a/34
SEQNUM=2836
SUBSYSTEM=usb
TYPE=0/0/0
You can write your rule invoking a script which should do some job after examining some specific environment variable. A rule may be as simple as
SUBSYSTEM=="usb", ACTION=="remove", RUN+="/usr/local/sbin/usbdevgone.sh"
In your case i'd suggest checking $DEVPATH inside usbdevgone.sh as they should differ for your two otherwise identical devices.
Also you may pass devpath (this is a path in /sys/ filesystem) as an argument to your script like this (see man udev for a list of available substitutions):
SUBSYSTEM=="usb", ACTION=="remove", RUN+="/usr/local/sbin/usbdevgone.sh $devpath"
Do not forget to notify udevd of your new or changed rule with udevadm control --reload-rules
I have run into the same problem in Linux. The information sent on a remove is minimal and cannot be used to uniquely identify the device being removed. I used to use the PHYDEVPATH (which is unique on plug in and unplug for a given machine and USB port), but very unfortunately, that has been deprecated in later versions of udev.
I was writing an application with similars features and I solved the problem implementing a daemon with the only mission of storing the udev_device connected. So when I detect some remove even from the udev_monitor I check for some device missing on the deamon's devices list. That what is missing is the device disconnected. That way I can obtain the data of disconnected devices.