Disabling Win driver signature

bcdedit should disable it permanently

http://www.drivethelife.com/windows-drivers/how-to-disable-driver-signature-enforcement-on-windows-10-8-7-xp-vista.html

bcdedit /set testsigning on

https://search.thawte.com/support/ssl-digital-certificates/index?page=content&id=SO5565&actp=search&viewlocale=en_US&searchid=1381952841942#

http://stackoverflow.com/questions/7258613/driver-install-fails-because-cross-signing-chain-doesnt-contain-microsoft

https://support.globalsign.com/customer/portal/articles/1698751-ev-code-signing-for-windows-7-and-8

https://github.com/pbatard/libwdi/wiki/Signed-Driver-Walkthrough#Globalsign

https://msdn.microsoft.com/en-us/windows/hardware/drivers/develop/signing-a-driver-for-public-release

https://www.digicert.com/code-signing/driver-signing-in-windows-using-signtool.htm

usb 1 vs usb 2

usb 1.0 vs usb 2.0

lines?
Check lines in usb camera .. may be it is there in usb camera also because of big screen pixelation?

no device connected

root@FriendlyARM:/usr/local/bin/eyeris_usb# lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 04b4:1003 Cypress Semiconductor Corp.
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

knowing which is usb 1.1 and usb 2.0

Who is using the file/resources

Getting information about processes

In linux you can get all the process in this directory

/proc

/proc/proc_id
has many files and folder about processa info

There are multiple ways like:

pwdx

$ pwdx

lsof

$ lsof -p | grep cwd

/proc

$ readlink -e /proc//cwd

Examples

Say we have this process.

$ pgrep nautilus
12136

Then if we use pwdx:

$ pwdx 12136
12136: /home/saml

Or you can use lsof:

INPUT_PULLUP

Does your pin support INPUT_PULLUP? Generally there are two modes: INPUT and OUTPUT but sometime a pin also support INPUT_PULLUP this is useful for switch where you do not need extra big ohm resistor for pulling up or down the pin to ground or vcc when switch is not pressed.

You can set it to this and directly connect switch other leg to ground
by default the pin wil read 1 as because of pullup but as soon as switch is pressed circuit is completed with gnd it is 0

Testing microphone and HDMI sound

cat /proc/asound/cards
root@FriendlyARM:~# cat /proc/asound/cards
0 [audiocodec ]: audiocodec – audiocodec
audiocodec
1 [sndhdmi ]: sndhdmi – sndhdmi
sndhdmi
root@FriendlyARM:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sndcodec-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
root@FriendlyARM:~# arecord -d 10 /tmp/test-mic.wav
Recording WAVE ‘/tmp/test-mic.wav’ : Unsigned 8 bit, Rate 8000 Hz, Mono
arecord: set_params:1233: Sample format non available
Available formats:
– S16_LE
– S24_LE
– S32_LE
– S20_3LE
root@FriendlyARM:~# arecord -vv -fdat foo.wav
Recording WAVE ‘foo.wav’ : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Hardware PCM card 0 ‘audiocodec’ device 0 subdevice 0
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 24000
period_size : 6000
period_time : 125000
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 1
stop_threshold : 24000
silence_threshold: 0
silence_size : 0
boundary : 1572864000
appl_ptr : 0
hw_ptr : 0
# + | 02%^C
Aborted by signal Interrupt…
# + | 02%
aplay -l foo.wav

root@FriendlyARM:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sndcodec-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
speaker-test -c 2 -r 48000 -D hw:1,0

(for others, the hw:x,y is x = card, y = device)

This just runs a sound test with static bouncing back and forth. Once it has played out of each speaker, hit Ctrl+c to stop it, and then check in your sound settings to see if the HDMI output is now listed under the internal device.

so 1,0

speaker-test -c 2 -r 48000 -D hw:1,0

arecord -vv -fdat foo.wav

aplay -Dhw:1,0 foo.wav

NanoPi gpio pins read

credit: wiringNP


 +-----+-----+----------+------+---+-NanoPI M1+---+------+----------+-----+-----+
 | BCM | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | BCM |
 +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
 |     |     |     3.3v |      |   |  1 || 2  |   |      | 5v       |     |     |
 |  12 |   8 |    SDA.0 |   IN | 0 |  3 || 4  |   |      | 5V       |     |     |
 |  11 |   9 |    SCL.0 |   IN | 0 |  5 || 6  |   |      | 0v       |     |     |
 | 203 |   7 |   GPIO.7 |   IN | 0 |  7 || 8  | 0 | IN   | TxD3     | 15  | 198 |
 |     |     |       0v |      |   |  9 || 10 | 0 | IN   | RxD3     | 16  | 199 |
 |   0 |   0 |     RxD2 |   IN | 0 | 11 || 12 | 0 | IN   | GPIO.1   | 1   | 6   |
 |   2 |   2 |     TxD2 |   IN | 0 | 13 || 14 |   |      | 0v       |     |     |
 |   3 |   3 |     CTS2 |   IN | 0 | 15 || 16 | 0 | IN   | GPIO.4   | 4   | 200 |
 |     |     |     3.3v |      |   | 17 || 18 | 0 | IN   | GPIO.5   | 5   | 201 |
 |  64 |  12 |     MOSI |   IN | 0 | 19 || 20 |   |      | 0v       |     |     |
 |  65 |  13 |     MISO |   IN | 0 | 21 || 22 | 0 | IN   | RTS2     | 6   | 1   |
 |  66 |  14 |     SCLK |   IN | 0 | 23 || 24 | 0 | IN   | CE0      | 10  | 67  |
 |     |     |       0v |      |   | 25 || 26 | 0 | IN   | GPIO.11  | 11  | 17  |
 |  19 |  30 |    SDA.1 |   IN | 0 | 27 || 28 | 0 | IN   | SCL.1    | 31  | 18  |
 |  20 |  21 |  GPIO.21 |   IN | 0 | 29 || 30 |   |      | 0v       |     |     |
 |  21 |  22 |  GPIO.22 |   IN | 0 | 31 || 32 | 0 | IN   | RTS1     | 26  | 7   |
 |   8 |  23 |  GPIO.23 |   IN | 1 | 33 || 34 |   |      | 0v       |     |     |
 |  16 |  24 |  GPIO.24 |   IN | 1 | 35 || 36 | 1 | IN   | CTS1     | 27  | 13  |
 |   9 |  25 |  GPIO.25 |   IN | 0 | 37 || 38 | 1 | IN   | TxD1     | 28  | 15  |
 |     |     |       0v |      |   | 39 || 40 | 1 | IN   | RxD1     | 29  | 14  |
 +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
 | BCM | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | BCM |
 +-----+-----+----------+------+---+-NanoPI M1+---+------+----------+-----+-----+

 +-----+----NanoPI M1 Debug UART---+----+
 | BCM | wPi |   Name   | Mode | V | Ph |
 +-----+-----+----------+------+---+----+
 |     |     |       0v |      |   | 41 |
 |     |     |       5v |      |   | 42 |
 |   4 |  32 |   GPIO.4 |   IN | 1 | 43 |
 |   5 |  33 |   GPIO.5 |   IN | 1 | 44 |
 +-----+-----+----------+------+---+----+


example usage:

First download and compile wiringnp

make

gpio readall

gpio mode 21 out

gpio mode 22 out

gpio write 21 1

qtwebkit not installed problem

Many a time for setting your application on fresh ubuntu machine you will be frustrated with the qt unfulfilled dependencies. Once I got this with qtwebkit and I installed all possible plugins like:

 apt-get install libqt5multimedia5 libqt5webkit5-dev qtmultimedia5-dev libqtmultimediakit1 libqt5webkit5-qmlwebkitplugin libqt5declarative5 libqtwebkit-dev

Isn’t above all which can be needed for qtwebkit but now still the application gives the same error.

Finally below fixed the issue and it seemed like I never needed all above
apt-get install qtquick1-qml-plugins

I already have the core stuff

apt-get install qt5-default libqt5declarative5
 apt-get install libqt5x11extras5

 

My experience with Ubuntu core with Just X11

In ubuntu core which is very thin ubuntu you can run UI application using linuxfb which is via raw framebuffer. It will be very slow. If your screen/UI is not updated frequently and just one screen is shown most of the time. You can do away with this.

./<yourFirstApplication> -platform linuxfb
or
./<yourSecondApplication> -platform linuxfb

Above works for my Qt application. But If you want good UI support you will need X11. You don’t need to reinvent the wheel by writing your own acceleration on top of linuxfb.

apt-get install xorg

With startx you can’t run applications on same display so :0 :1 is needed for each application

You use same terminal but different display application will run but display will be screwed whatever is changing the display that will be shown

Only part of the screen which is changed is updated weird

So run applications on different terminal and different display and then manage which terminal to show at any time.

Like

startx ./yourFirstApplication — :0 vt7 &

startx ./yourSecondApplication — :1 vt8 &

startx ./yourThirdApplication — :2 vt9 &

 

Now whenever needed switch with ctl + alt + F1 for FirstApplication F2 for SecondApplication F3 for thirdApplication make sure to press two times for switch

Not working as expected : Still whatever is changing it is going there .. so expectation is eyeris-main and menu both will not be changing at the same time somehow we need to refresh the whole screen..

This is of-course not what you want. You can’t ask user to press the keys to switch between application. You want to automatically control this from your application. What to show at what time.

For me the applications were written in Qt so Qt already uses X11 to create and arrange window. I just need to make it run in single display with single instance of startx.

The solution is simple. Start one main application with startx and then run all application from that application. You can also use a lightweight program called xdotool to control which window to bring in front.

xdotool windowraise `xdotool search –class <application-name>`

 

Or you can go other way around by using some light weight desktop/window manager

 

apt-get install xdm

from xdm you can run without startx. This is all taken care of. You will also get a simple login screen with xdm.

apt-get install lightdm lightdm-gtk-greeter

There are other options also like

apt-get install nodm

or
apt-get install ubuntu-session

or

apt-get install xfce4 xfwm4 xfce4-panel xfce4-settings xfce4-session xfce4-terminal xfdesktop4 xfce4-taskmanager tango-icon-theme