Showing posts with label Fedora. Show all posts
Showing posts with label Fedora. Show all posts

Tuesday, April 18, 2017

HC-06 Bluetooth Module

Based on http://www.martyncurrey.com/arduino-with-hc-05-bluetooth-module-at-mode/

Default mode

Note, use 'software serial' mode on Arduino, as regular uart (pins 0, 1) are also used for USB communication (needed by the IDE).

In the example use pins 2, 3 for RX/TX.
Use voltage divider to get 5v output from Arduino to 3.3v safe for RX on HC-05.

On power up, 2 blinks per second = disconnected
Connect using android device, with 'Serial Bluetooth Terminal' app
Pair device, then connect.
Now should have a steady led
Use code from - https://github.com/bugwhine/arduino/blob/master/bluetooth/bluetooth.ino
Default baud rate for bluetooth side is 9600
From arduino IDE, run program, and open serial monitor
Should be possible to communicate between arduino serial monitor and bluetooth serial app on phone


[steve Arduino]$ hcitool scan
Scanning ...
98:D3:32:20:87:15 HC-06
[steve Arduino]$ sudo rfcomm bind 0 98:D3:32:20:87:15 1
[steve Arduino]$ sudo minicom -s
Serial Port Setup
A -    Serial Device      : /dev/rfcomm0
E  -    Bps/Par/Bits       
C:   9600

Serial comms should now work between minicom, and the arduino serial monitor.

nodejs

sudo dnf install bluez-libs-devel
sudo npm -g install bluetooth-serial-port


node btserial.js
connected
Received: Size of data buf = 1
h
Received: Size of data buf = 6
ello

Friday, February 5, 2016

DisplayLink on Fedora

Here's a surprising story of a piece of unusual hardware working with less effort on Linux, than on Windows.

I bought one of these of ebay -

DELTACO USB 2.0 till DVI/HDMI/VGA-adapter

Planning to use it on a custom x86 board I have, that doesn't have a graphics adapter. First trying it on Windows 7 - where it worked fine, after downloading and installing the drivers.

I then booted Linux, expecting to again download drivers, and likely need to compile them, with the usual dependency nightmares...

However, on boot, the display came up by itself :)


[   16.823553] udl 5-2:1.0: fb1: udldrmfb frame buffer device
[   16.823559] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[   16.823561] [drm] No driver support for vblank timestamp query.
[   16.823563] [drm] Initialized udl on minor 1
[   16.823599] usbcore: registered new interface driver udl

Bus 005 Device 002: ID 17e9:0198 DisplayLink 

Sunday, January 5, 2014

Android development - Fedora 20 and Nexus 7

On Nexus 7

Follow this post to enable USB debugging on the Nexus 7

If you do not see "Developer Options", go into "About device" in Settings and tap on the "Build number" entry seven times, which will unlock "Developer Options".

Then, to get the ADB to recognize the device -

[steve@localhost ~]$ sudo Development/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb devices
List of devices attached
????????????    no permissions


Following this post -

[steve@localhost ~]$ lsusb |grep Nexus
Bus 002 Device 014: ID 18d1:4e42 Google Inc. Nexus 7 (debug)


Edit as below -

[steve@localhost ~]$ cat /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"

[steve@localhost ~]$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
 
Restart udev and adb server -
 
[steve@localhost ~]$ sudo systemctl restart systemd-udevd.service
[steve@localhost ~]$ sudo Development/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb kill-server
 
[steve@localhost ~]$ sudo Development/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
015d3f18d1281012 unauthorized

Authorize the PC on the device, and re-check -

[steve@localhost ~]$ sudo Development/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb devices
List of devices attached 
015d3f18d1281012 device

Friday, August 30, 2013

Upgrade Fedora 17 to 19 using FedUp

Whilst a fairly time consuming process, it went very smoothly. The only minor issue I encountered was Chrome not working, but this and a simple solution was documented on the FedUp page.

Dare I tackle a grub update?

Also worth noting... my issue with

rfkill: WLAN soft blocked

occurring randomly some minutes after boot, although not solved... I seem to have found a remedy.
After installing the rfkill util, I'm able to re-enable via the command

rfkill unblock WLAN

Friday, September 21, 2012

Re-enabling autofs (aka automount) after Fedora 17 upgrade



$ sudo systemctl enable autofs.service
ln -s '/usr/lib/systemd/system/autofs.service' '/etc/systemd/system/multi-user.target.wants/autofs.service'
$ sudo systemctl start autofs.service

Modify auto.smb to avoid se-linux denial on root password request when auto-mounting smb shares

Change line ->
#opts="-fstype=cifs"
to ->
opts="-fstype=cifs,guest"

Upgrade Fedora 16 to 17 using pre-upgrade

The process was quite smooth, as described here -

https://fedoraproject.org/wiki/How_to_use_PreUpgrade

I then hit this (I think that it is expecting grub2)?

https://fedoraproject.org/wiki/How_to_use_PreUpgrade#Upgrade_does_not_install_upon_reboot

I then tried using -

Method 2: Edit the Grub menu.lst File

but hit this error -

dracut Warning: /dev/root does not exist.


and realised the solution was to copy the complete kernel line from the grub2 file /boot/grub2/grub.cfg 
into /boot/grub/grub.conf, as below -

title Fedora Upgrade
root (hd0,4)
kernel /upgrade/vmlinuz preupgrade repo=hd::/var/cache/yum/preupgrade ks=hd:UUID=f83bc73c-070b-4e9a-8f0e-c46b56ec8a5a:/upgrade/ks.cfg stage2=hd:UUID=f83bc73c-070b-4e9a-8f0e-c46b56ec8a5a:/upgrade/squashfs.img
initrd /upgrade/initrd.img
savedefault
boot

Having fixed this, the upgrade went smoothly, and F17 is looking great!

Wednesday, September 19, 2012

Boot Fedora 17 Live from partition on hard drive

'poor man's install', again for Fedora 17. (See my earlier post for Fedora 16)

Use fdisk to create a FAT32 partition large enough to hold the live distro, in my case /dev/sda8 below
Format it using mkfs or gparted.


Command (m for help): p


Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xaa9baa9b


   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    24578047    12288000   27  Hidden NTFS WinRE
/dev/sda2   *    24578048    24782847      102400    7  HPFS/NTFS/exFAT
/dev/sda3        24782848   502260399   238738776    7  HPFS/NTFS/exFAT
/dev/sda4       502261760   625142447    61440344    5  Extended
/dev/sda5       502263808   503287807      512000   83  Linux
/dev/sda6       503289856   605689855    51200000   83  Linux
/dev/sda7       605691904   613883903     4096000   82  Linux swap / Solaris
/dev/sda8       613885952   625141759     5627904    b  W95 FAT32

Mount the iso image, and copy files from it 
su
cd /mnt/
mkdir iso live
mount -o loop -t iso9660 ~/Downloads/Fedora-Live.iso iso
mount -t vfat /dev/sda8 live
cp -r iso/* live/

Examine the grub conf on the live distro -
cat /mnt/live/EFI/boot/grub.conf
..
title Fedora-17-x86_64-Live-Desktop.is
  findiso
  kernel /isolinux/vmlinuz0 root=live:LABEL=Fedora-17-x86_64-Live-Desktop.is rootfstype=auto ro liveimg quiet  rhgb
  initrd /isolinux/initrd0.img
..

Find the UUID of your live partition -

[steve@aspireone753 ~]$ ls -lF /dev/disk/by-uuid
total 0
lrwxrwxrwx. 1 root root 10 Nov 13 11:33 B381-1423 ->; ../../sda8

Then edit the regular grub.conf on your main linux installation. Changes needed are shown in bold.

sudo vi /boot/grub/grub.conf

paste in a new entry, copied from the live distro -

title Fedora-17-x86_64-Live-Desktop.is
  root (hd0,7)
  kernel /isolinux/vmlinuz0 root=UUID=B381-1423 rootfstype=auto rw liveimg quiet  rhgb
  initrd /isolinux/initrd0.img
Reboot, and choose the live distro at the grub menu.

Monday, June 6, 2011

Chrome unresponsive for gmail and yahoo mail on Fedora 14

Some time back I switched from Firefox to Chrome on my Aspire One (running Fedora 14). I was impressed by how fast it is, and became a convert. Unfortunately, after some time it became unusable, with gmail and many other pages leaving Chrome unresponsive.

I tried many workarounds and 'solutions', removing my cache and configuration directories but still no joy.

I then began troubleshooting with strace - and noticed that the problem went away. This lead me to some more googling, and I found this post -

Issue 77274: Chrome 11 hangs on linux due to gecko-mediaplayer

The solution was as simple as removing gecko-mediaplayer


$ sudo yum erase gecko-mediaplayer


Thursday, March 31, 2011

MCE Remote and LCD Display

Microsoft MCE Remote
sudo yum install lirc

yum install lirc-remotes
cp /usr/share/lirc-remotes/mceusb/lircd.conf.mceusb /etc/lirc/lircd.conf

chkconfig lirc on
/etc/init.d/lirc restart

I'm unable to get the mouse working at this point. After lot of experimentation and googling, I'm not sure anyone has succeeded yet with Fedora.

LCD Display

sudo yum install lcdproc
cd /etc/sysconfig/lcdproc
cp LCDd.conf.example LCDd.conf
Edit LCDd.conf setting Driver=imonlcd
cp lcdproc.conf.example lcdproc.conf

chkconfig LCDd on
chkconfig lcdproc on
/etc/init.d/LCDd start



Wednesday, March 30, 2011

XBMC on Fedora 14 (HTPC)

I bought a new HTPC, in pieces -

  • 386482 - Antec Fusion HTPC Remote Black, Fans: 2x 120mm Sida, IR, Remote, LCD Display, iMon software
  • 612433 - Corsair CX 500W PSUATX 12V V2.3, 80 Plus, Standard. 2x 6+2pin PCIe, 5x SATA, 120mm Fan
  • 610540 - AMD Athlon II X3 450, Triple Core, 3.2Ghz, AM3, 1,5MB, 95W, Boxed
  • 363359 - Crucial DDR3 1333MHz 4GB KIT, CL9, Kit w/two matched DDR3 2GB, 240pin
  • 597747 - Gigabyte GA-880GMA-UD2H, Socket-AM3 mATX, AMD880G+SB850, DDR3, 2xPCIe(2.0)x16, VGA, DVI, HDMI, SATA 6Gb/s, USB 3.0
  • 575186 - Western Digital Caviar® GreenPower™ 1TB Sata 3 Gb/s, 64MB Cache
  • 582000 - Microsoft Wireless Optical Desktop 700V2 Black USB
  • 508084 - HDMI Cable, 1m
  • 493692 - Lite-On Blu-Ray Reader IHOS104-37, Blu-Ray DVD-ROM, Sata
It's been many years since I've built a PC - it was a nice surprise to see the assembly be problem free. Tired of Vista, and not wanting to shell out Microsoft tax for Windows 7, I decided to install Mythdora - MythTV on Fedora. It was very disappointing - so I switched to Fedora 14 + XBMC - and was immediately impressed.

Customisations so far -
Auto-login, and auto-start of XBMC -
http://www.perturb.org/display/GDM_AutoLogin.html


Installed NoMachine NX Server to allow easy remote management

Next to tackle -
- Microsoft MCE Keyboard/Remote
- Front panel display on the Antec Fusion case
- IPTV PVR

Saturday, February 5, 2011

Fedora 14 on Acer Aspire One A150L

Problem 1
Old livecd-tools from Fedora 8, for Linpus, seem to create a syslinux.cfg that isn't compatible with the version of grub (?) used on the FC14 live image.

Result was this message at boot -

syntax error in syslinux.cfg

Work-around - use Windows based liveusb-creator.


Problem 2
During boot of Fedora from live usb image, the message below appears -

no root device found.
booting has failed, sleeping forever.

The problem in my case was the volume name of the USB drive (FAT32). The label had a space character in it ('P1I CARD'), which the liveusb-creator mapped in syslinux.cfg as 'P1I_CARD'.

I was able to resolve this by renaming the volume to 'USBDISK', and replacing all instances of 'P1I_CARD' in syslinux.cfg.

Install to hard disk
Having booted the live usb image, I used gparted to reduce the size of the linpus partition, and free up space for Fedora.

Next was to install Fedora into the free space and boot into Fedora.
I then copied lines from the linpus grub.conf into the new fedora grub.conf, such that I could dual boot.

This went smoothly, and Fedora is performing exceptionally well... just wish I'd made the upgrade sooner.