Get coordinates from USB 2.0 TouchScreen Monitor under ubuntu. - memory

I have a Touchscreen Panel working under Ubuntu and I need to find out where this device is writing the coordinates when touching the panel.
Buffer? DMA REGISTER? USB REGISTER? Where can I get this information? How to get this information unter linux consol? How getting the physical memory location / buffer adress ?! ...
Anybody has an idea?

in general you can get the coordinates using the evtest tool, that reads input events i.e. in /dev/input/event see How to get Coordinates of Touchscreen Rawdata using Linux <- very good answer
Despite this other ways to get the data depend on your touchscreen (reading/writing /dev/ttySx ,...). Touch screens are in general implemented as USB HID devices or emulating a serial connection
(https://wiki.ubuntu.com/Touchscreen)
Checking for touchscreen connectivity
When encountering a new device, the first order of business is to
determine how the touchscreen is connected to your computer. If the
touchscreen produces no events out of the box, check to see if it's an
USB device or not:
lsusb
USB connection
Check the output for any reference to a touchscreen. If your
touchscreen has an USB interface, and it isn't working, then you may
need to blacklist the usbtouchscreen driver for it to work:
sudo modprobe -r usbtouchscreen
If your touchscreen begins to produce events, then you can permanently
blacklist the usbtouchscreen driver:
echo "blacklist usbtouchscreen" | sudo tee -a
/etc/modprobe.d/blacklist.conf
Some touchscreens might already have good or perfect calibrations,
otherwise you'll need to continue to the calibration section.
Serial connection
If there is no reference to a touchscreen device in your lsusb output,
the connection is most likely through one of your serial ports. The
actual IRQ mapping varies between manufacturers. In the case of
Itronix devices, the default is /dev/ttyS3. A simple way to check for
connections is to check each one for events:
screen /dev/ttyS0
Touch anywhere on your screen to check for any character output. If
nothing happens, quit screen by pressing Ctrl+A and then the \ key
to quit. Continue with /dev/ttyS1, etc. until you get a response. Once
you've determined the device, we can try a few different drivers. In
the case of Itronix (and most other devices using the Touchkit
driver), the correct driver is touchit213.
sudo inputattach --touchit213 /dev/ttyS3
Will work for most touchkit screens. The calibration or one or more
axes may be swapped, but if the calibration is approximate then it's
probably the correct driver. Press Ctrl+C to try a new mode.
inputattach supports any of the following modes, which includes
external touchscreens which may attach through a physical serial port:
--h3600ts -ipaq Ipaq h3600 touchscreend
--elotouch -elo ELO touchscreen, 10-byte mode
--elo4002 -elo6b ELO touchscreen, 6-byte mode
--elo271-140 -elo4b ELO touchscreen, 4-byte mode
--elo261-280 -elo3b ELO Touchscreen, 3-byte mode
--mtouch -mtouch MicroTouch (3M) touchscreen
--touchit213 -t213 Sahara Touch-iT213 Tablet PC
--touchright -tr Touchright serial touchscreen
--touchwin -tw Touchwindow serial touchscreen
--penmount -pm Penmount touchscreen
--fujitsu -fjt Fujitsu serial touchscreen
If your device is built into a laptop, you'll have the best luck with
the mtouch, touchright, touchwin, or touchit213 drivers. Likewise,
non-Elo external touchscreens will most likely use touchit213. If your
device is a tablet with stylus-only input, fujitsu is a popular maker
of embedded tablet devices.
To attach the touchscreen at startup, edit your /etc/rc.local to look
like the following:
/usr/bin/inputattach --daemon --always -t213 /dev/ttyS3 exit 0
Replace -t213 with your appropriate driver and /dev/ttyS3 with the
correct device.
Again, don't worry if the calibration isn't perfect, or if an axis is
inverted or reversed - this will be addressed in the calibration
section.
https://wiki.ubuntu.com/Touchscreen

Related

musb Bubble Interrupt Error in Beaglebone patch path not found

I am new in beaglebone black. BBone Device is connected to the GSM Module on the USB port. I faced some issue like;
1 USB Port not initialize
2 Beaglebone abruptly Off
3 Beaglebone Restated
I have to find some patch for controlling bubble interrupt but I am not finding that patch path in the beaglebone device.
Pls see below patch link;
https://marc.info/?l=git-commits-head&m=144331613106445&w=2
Can Anybody faced similar type problem????
And finding a solution then reply me...
Do you supply the power from the jack? Not from the usb right?
Where the GSM module takes the power? Does it take from the Beaglebone USB_VBUS?
If the GSM module takes the power from the USB_VBUS of BeagleBone or any IO from the BeagleBone. It is possible to cut the connection and restart because, there is an over current protection on the hardware.
It is an important point that what are the power sources of Beaglebone and GSM module? Also, GSM modules maximum current increase the 2A.

Setting up a Wi-Fi repeater (ap-client) on Linux

I'm trying to set up a Wi-Fi repeater on Ubuntu PC or embedded Linux with Wi-Fi dongles, using one dongle at a time. Drivers and firmwares for dongles are done and worked on my PC/embedded board for AP mode and station mode. Then what can I do next?
In my thought, I have to simulate 2 interfaces with only 1 dongle. Than run Hostapd on a interface, run wpa_supplicant on another interface. Is that a workable method? If yes, how can I "create" 2 interface with 1 dongle, say, wlan0/wlan1 or wlan0.1/wlan0.2 or something like that?
Is the whole scenario workable just through some operation about interface and system, or the scenario MUST be supported by driver of dongles, if driver doesn't provide this scenario, then it is impossible?
I tried it on Ralink Soc before(it's called ap-client mode by Ralink). On Ralink platform with its own SDK including Linux source and Wi-Fi drivers, it is done by iwpriv commands. There are interfaces call "apcli0" to work in station mode and "ra0" work in AP mode, but there is only 1 physical Wi-Fi interface built-in in Ralink Soc. It works just fine but I'm not using Ralink Soc now. Is that feature also available for other dongles?
After working on driver compiling, I got some idea.
The chip I'm using supports "dual mac" feature, and the driver must support this feature.
If the driver is successfully compiled, inserted and the dongle is plugged in, there will be 2 interfaces coming out, for example, wlan0 and wlan1. Therefore I can configure one interface as AP and another interface as station.
So the key point is the chip and driver must support dual mac feature.

What exactly determines what’s in the radiotap header when capturing on WLAN?

I’m doing a study project on wifi signal quality. What I want to do is use Raspberry Pi’s to monitor as many metrics as possible on packet level data. I want to do this by putting wifi adapters on monitor mode (using airmon-ng) and than capture the data about the packets using a wireless network protocol analyzer, like tshark.
What I understand from the wireless networks is that you mainly have three parts: a frame part that has the same information independent of what you’re capturing on, which contains things as frame number, frame length and arrival time. (Want to upload images but don't have 10 reputation yet...).
Then the IEEE 802.11 data which contains the necessary stuff for the network to work. When capturing on WLAN this contains the MAC addresses.
And than we have the radiotap header, which contains all kind of information (signal strength db and dbm, noise level, signal quality, TX value, and much more). This one is a bit different, since this information is actually filled or injected by the wifi adapter you use to capture the data with.
In the present flags you can find which values are actually being injected by the wifi adapter. Now my problem is that for my research I really need as much values as possible. I’ve been working for hours but I didn’t succeed in finding a way to capture with anything more than dmb signal strength (if even available). So this is what I tried so far:
The adapters I used so far are the Edimax EW7811UN, the AirPcap Classic, the AirPcap Tx and two similar alfa adapters with Atheros AR9271 chipset. The AR9271 adapters worked out of the box on raspbian (debian for raspberry pi) on the ath9k_htc driver. Putting them on monitor mode and capturing works fine, but only dbm singal strength is given (as in the screenshots above) in the capture. The Edimax was working out of the box on the 8192cu driver, however it clearly doesn’t support monitor mode. I could put it into monitor mode when booting it on the zd1211rw driver but that didn’t even give the dbm signal strength. Strange thing however, is that a friend tried the exact same Edimax adapter and he could capture, and the only difference we could find is that the lsmod says rtl8192cu and not 8192cu. Strangely, forums are saying that 8192cu is the newer version, however this friend had the newest arch linux kernel installed (newer than the raspbian). So I installed Arch Linux on the pi, but still wasn’t able to put the edimax on 8192cu driver in monitor mode. Then I found a package in the aur repos: dkms-8192cu which was supposed to have a patched version. However, after installing it still didn’t work. Also downloading the driver from the realtek website didn’t work. There is some stuff on patching on the aircrack-ng website, but it actually is mentioning injection of frames and doesn’t really look to be what I exactly need.
Than I bought the Airpcap Classic and the Airpcap Tx to see what they could do. First of all, they have zero linux support so that already is a big drawback since l need to use it from the Pi’s. However even in windows the airpcap’s only capture db and dbm noise and signal quality. It does receive some data at dbm noise level, but it’s worthless since it is always at -100 level. I can boot the Airpcap classic and tx have zd1211B chipset so I can boot them on zd1211rw driver but this also gives no dbm signal value or anything else.
So my question is, what exactly determines what’s in the radiotap header? I guess it would be all in the driver, but I need to be exactly sure before I write off every ath9_htc driver based adapter. I’m about to purchase another adapter which runs on carl9170 driver, however I can’t find no guarantee anywhere that it will give me those values. What I did find in the literature is that the madwifi driver gives (or was giving) noise levels, however it is acquired by Atheros so the project stopped and all websites are suggestion just to use ath9k or ath5k drivers. I tried to install it but I failed because it seems to be really outdate software since the project stopped.
It would be of really big help if someone can explain me what exactly determines what’s inside the radiotap headers, and also if someone could share any experience on when they did capture more than only dbm signal strength values from linux.

Wireshark doesn't capture 802.11 data packets

Lately I have been trying to analyze wifi traffic over my own test router.
I looked on the wireshark website on how to do this and setup my own testing network.
my network:
-dd-wrt router with WPA2 personal mixed security using tkip+aes.
-kali linux capture machine with wireshark 1.8.5
-android phone for producing traffic
I then put the wireless interface of my kali laptop into monitor mode user airmon-ng
airmon-ng start wlan0
To check if the created monitor interface(mon0) worked I would use airodump-ng.
When I knew that my monitor interface was working, I started up Wireshark.
I selected mon0 as capture interface and pressed options. In Capture options I put the mac adress of my router, which I got through airodump-ng, in the capture filter area.
I then would take care of the packet decryption that would be needed for me to see the actual data. I went to the following webpage:
http://wiki.wireshark.org/HowToDecrypt802.11
I followed the instructions there.(Only the way I need to put in the decryption keys is different than the key#1 system that is described on the page. I get a new window in which I need to select a security method wep,wpa-pwd or wpa-psk and input the key).
I used the wireshark wpa psk generator tool to get the right pre-shared key.
http://www.wireshark.org/tools/wpa-psk.html
Essid: "testnet"
Password: "wachtwoord"
psk: 33fe484e651381b15859e539279f2991c0f5e5e751ef17f82104d4ad528718ca
I put in 2 new keys. One being wpa-pwd with wachtwoord as its value. The second being wpa-psk with the psk mentioned above as its value.
I applied all the settings, and checked the enable decryption checkbox.
So I clicked the start capture button and saw a whole bunch of beacon frames rolling in.
I associated my android phone with the AP so I knew I capture the eapol packets(I checked this using the filter and I had all 4 packets).
After filtering with "data", I saw that I didn't capture any data packets.
I then expected to see the actual traffic, but this was not the case.
airdecap-ng did not see any WPA packets in the capture file.
My only theory left after hours of puzzeling is lack of driver support.
Please tell me what I am doing wrong?
Thank you!
tl;dr:
My computer does not capture 802.11 wpa2 data packets, and I can't figure out why.
Have you checked if you can capture Wifi frames in OPEN/NONE security? If it doesn't work with OPEN/NONE, then you need to fix the setup before being able to capture WPA2/AES traffic.
Steps I used to check Wifi capture setup:
- Configure AP as OPEN/NONE (open authentication, no encryption).
- Add monitor interface:
$ sudo iw phy phy0 interface add moni0 type monitor
$ sudo ifconfig moni0 up
Set channel of properly (same between the AP and the laptop). Avoid popular ch1,6,11 (use channel 7, for example) to reduce the amount of captured traffic.
Some wireless cards do not support monitor mode very well, so it may also be worth to avoid 802.11n, use 802.11b/g only.

Check if display is powered on

Is there a way to check if display is powered on in linux. I tried xrandr and xset but none of these two give me if any information about monitor power. using xrandr we can identify if the vga cable is connected but not if power is connected. I need this because many of our Lab systems keep lying unused just because some one pulls out the power cable or so.
--
Jatin

Resources