Kategoriarkiv: Okategoriserade

Installin Ubunut UFEI

I want to install Ubuntu 6.10 alongside with Windows 10. As I read how to accomplice that I understand that Ubuntu has to load in UEFI mode since Windows is already installed in that mode. I cannot boot the live-DVD in UEFI mode which is required for UEFI installation. I ended up  using Rufus to load the ISO-file unto a USB-stick and booting from that i UFEI mode.

Next problem appeared: There were no compatible graphics drivers for my graphics card that were loaded i the UEFI mode. The screen went black or red, and I was never presented with any UI.

The workaround was to press ’c’ in the GRUB menu and add nomodeset right infront of quiet splash and added nouveau.modeset=0 in the end of the the linux line. To boot press F10. Once installed boot Ubuntu in the same manner and then install the appropriate graphics drivers.

⚡Presentation ’Arterial Blood Gas Interpretation Information in this slide presentation is adapted from All You Really Need to Know to Interpret Arterial Blood Gases.’

Arterial Blood Gas Interpretation Information in this slide presentation is adapted from All You Really Need to Know to Interpret Arterial Blood Gases.

Källa: ⚡Presentation ’Arterial Blood Gas Interpretation Information in this slide presentation is adapted from All You Really Need to Know to Interpret Arterial Blood Gases.’

Pickkit 2 med pk2cmd

 

För PIC-programmering krävs 2 program. Sdcc för kompilering och Pk2cmd för att föra över till mikrokontrollern. Dessa måste i ubuntu kompileras och installeras från källkod då det annars saknas includfilerer pga licensprolem.

### Pk2cmd ###

export PATH=$PATH:/usr/share/pk2 #Gör att filen hittas och kan användas.

pk2cmd ’-S#’ list all connected Pickit 2 devices and their firmware version

pk2cmd -Dfile replace the firmware by the contents of the specified file

pk2cmd -Ppart -R -T power on the target, part is for example PIC18F4550. The -R option is needed to release the Vpp line, which is also the MCLR (reset) on many PIC’s.

pk2cmd -Ppart -W power off the target

pk2cmd -Ppart -Ffile -M program the target using specified file

”part = PIC18F4550”

Ladda upp firmware test.hex.

pk2cmd -M -PPIC18f4550 -Ftest.hex

### sdcc ###

#Kompilera test.c

sdcc -mpic16 -p18f4550 –use-non-free test.c

### list usb devices ####

lsusb

 

USB-capturing

Capturing USB data through Wireshark

1)Install Wireshark through Update Manager.2)Enable usbmon through below commands

#mount -t debugfs none_debugs /sys/kernel/debug
 #modprobe usbmon
 #ls /sys/kernel/debug/usb/usbmon
0s  0u  1s  1t  1u  2s  2t  2u  3s  3t  3u  4s  4t  4u

3)Check the USB devices through tshark
#sudo tshark -D

E.g:
#sudo tshark -D
tshark: Lua: Error during loading:
[string ”/usr/share/wireshark/init.lua”]:45: dofile has been disabled
1. eth0
2. wlan0
3. usbmon1 (USB bus number 1)
4. usbmon2 (USB bus number 2)
5. usbmon3 (USB bus number 3)
6. usbmon4 (USB bus number 4)
7. any (Pseudo-device that captures on all interfaces)
8. lo

 

 

4)List of de-vices connected can be seen through the command
#usb-devices

or

#lsusb which I prefere.

5) To have wireshark or tshark gain access to usbmon type

#sudo chgrp wireshark /dev/usbmon*

and

#sudo chmod 754 /dev/usbmon*

6) Now you can use wireshark or tshark without root access

7)
If the device is connected to usb2,then to capture through wireshark command has below:

#tshark -i usbmon2 -w 1.pcap

Open the capture file through Wireshark GUI.

or

Capture direct from wireshark GUI.

Wireshark networc capturing

When I tried to catch ethernet traffic the program WireShark did not find any devicec. I looked in the file /usr/share/doc/wireshark/README.Debian, but could not solve the problem. Then I found this solution on http://superuser.com/questions/81233/wireshark-permission-problem-in-ubuntu

I had a similar issue with not being able to see any network interfaces when running Wireshark (tshark’s GUI cousin) as a non-root user. Nowadays, Ubuntu and Debian support file capabilities with which I was able to get Wireshark (and tshark) running as non-root.

First, create a wireshark group:

:~$ sudo groupadd wireshark

Second, add your username to the wireshark group

:~$ sudo usermod -a -G wireshark yourusername

Third, change group ownership of dumpcap to wireshark group

:~$ sudo chgrp wireshark /usr/bin/dumpcap

Fourth, set file permissions of dumpcap to 754 (rwx for user, r-x for group)

:~$ sudo chmod 754 /usr/bin/dumpcap

Fifth, enable file capabilities for dumpcap

:~$ sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap

You may also need to run dpkg-reconfigure for wireshark-common if you install wireshark or tshark as a package through Synaptic and enable packet capture for non-root users

:~$ sudo dpkg-reconfigure wireshark-common

Lokalt VendorID samt ProduktID i testsyfte

Idag skapade jag ett lokalt VendorID samt ProduktID genom att redigbera filen: /var/lib/usbutils/usb.ids Lade till mitt eget ID efter samma mönster som de som redan låg där. Använde mig av 0010 som VendorID och 0001 som produktID.

Redigerade sedan filen usbcdc.c där jag under fliken

__code unsigned char device_descriptor[]

ändrade till.

0x10, 0x00, // idVendor lsb, idVendor msb
0x01, 0x00, // idProduct lsb, idProduct msb

Efter att ha kompilerat programmet och fört över det till PIC:en körde jag ~$lsusb.

Minnet flyttar online!

Sedan jag börat använa Linux har mycket tid spenderats att googla fram lösningar till diverse frågeställningar. Bekymret har varit att när jag behövt ominstallera systemet eller ändra något har jag inte bara glömt hur jag gjort, men också hur jag hittat den ursprungliga lösningen. Så detta är en ansats att hjälpa minnet på traven.