WordPress database error: [Disk got full writing 'information_schema.(temporary)' (Errcode: 28 "No space left on device")]
SHOW FULL COLUMNS FROM `mb_options`


Warning: Cannot modify header information - headers already sent by (output started at /var/www/wordpress.matbra.com/wp-includes/class-wpdb.php:1851) in /var/www/wordpress.matbra.com/wp-includes/feed-rss2.php on line 8
Matheus Bratfisch https://wordpress.matbra.com/en "Cogito ergo sum" Fri, 08 Mar 2013 02:16:02 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.3 6748864 Ubuntu 12.04 – Setting up Samba (3.6.3) https://wordpress.matbra.com/en/2013/03/07/ubuntu-12-04-configurando-samba-3-6-3/ https://wordpress.matbra.com/en/2013/03/07/ubuntu-12-04-configurando-samba-3-6-3/#comments Fri, 08 Mar 2013 02:11:07 +0000 http://wordpress.matbra.com/?p=1520 Hello,

Today I decided to format my Home Server and when I setuped it I had a few problems.

“Failed to Retrieve Share List from Server” when I was trying to connect to my ubuntu 12.04 server. Inside the [global] section I add:

name resolve order = bcast host

I did this in my normal computer too. (I’m not exactly sure that this is needed I don’t think so). Rebooted and it is working.

Inside my logs I was getting a lot of smb_panic():

[2013/03/07 22:13:43.607536, 0] lib/util.c:1122(smb_panic) smb_panic(): calling panic action [/usr/share/samba/panic-action 1928]

(Again, I’m not sure that this is totally and exclusive related to this problem, but it worth to say, so you could try it too.)

Other message that I was seeing when trying to smbclient -L SERVER was:

NT_STATUS_PIPE_BROKEN

If you want to see my full smb.conf file keep reading!

My configs file is a Shared folder which is read only, but anyone could read it (guest yes), and the other one is Writable, where anybody can write and read (without authentication). In other words, all my setup don’t uses authentications, it is all done by guests users. This is particularly good in my case, because I can put some interesting files in Shared Folder and guarantee that nobody will screw everything and the Writable is good to add new files to the server or a “temporary backup folder”.

If I remember anything else, I will let you guys know.

Thanks,
Matheus

Just some small changes from default file, but to solve this problem took me sometime.

#======================= Global Settings =======================

[global]

guest account = nobody
## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu)

# Windows Internet Name Serving Support Section:
# WINS Support – Tells the NMBD component of Samba to enable its WINS Server
# wins support = no

# WINS Server – Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no

# What naming service and in what order should we use to resolve host names
# to IP addresses
name resolve order = bcast host

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
; interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# ‘interfaces’ option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself. However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
; bind interfaces only = yes

#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m

# Cap the size of the individual log files (in KiB).
max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to ‘yes’.
# syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d

####### Authentication #######

# “security = user” is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
security = user

# You may wish to use password encryption. See the section on
# ‘encrypt passwords’ in the smb.conf(5) manpage before enabling.
encrypt passwords = true

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
passdb backend = tdbsam

obey pam restrictions = yes

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan < for
# sending the correct chat script for the passwd program in Debian Sarge).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# ‘passwd program’. The default is ‘no’.
pam password change = yes

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
map to guest = bad user

########## Domains ###########

# Is this machine able to authenticate users. Both PDC and BDC
# must have this setting enabled. If you are the BDC you must
# change the ‘domain master’ setting to no
#
; domain logons = yes
#
# The following setting only takes effect if ‘domain logons’ is set
# It specifies the location of the user’s profile directory
# from the client point of view)
# The following required a [profiles] share to be setup on the
# samba server (see below)
; logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user’s home directory
# (this is Samba’s default)
# logon path = \\%N\%U\profile

# The following setting only takes effect if ‘domain logons’ is set
# It specifies the location of a user’s home directory (from the client
# point of view)
; logon drive = H:
# logon home = \\%N\%U

# The following setting only takes effect if ‘domain logons’ is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in ‘DOS’ file format convention
; logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe. The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser –quiet –disabled-password –gecos “” %u

# This allows machine accounts to be created on the domain controller via the
# SAMR RPC pipe.
# The following assumes a “machines” group exists on the system
; add machine script = /usr/sbin/useradd -g machines -c “%u machine account” -d /var/lib/samba -s /bin/false %u

# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe.
; add group script = /usr/sbin/addgroup –force-badname %g

########## Printing ##########

# If you want to automatically load your printer list rather
# than setting them up individually then you’ll need this
# load printers = yes

# lpr(ng) printing. You may wish to override the location of the
# printcap file
; printing = bsd
; printcap name = /etc/printcap

# CUPS printing. See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
; printing = cups
; printcap name = cups

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /home/samba/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
# for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
# socket options = TCP_NODELAY

# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
; message command = /bin/sh -c ‘/usr/bin/linpopup “%f” “%m” %s; rm %s’ &

# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to ‘no’; otherwise, the default behavior is recommended.
# domain master = auto

# Some defaults for winbind (make sure you’re not using the ranges
# for something else.)
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash

# The following was the default behaviour in sarge,
# but samba upstream reverted the default because it might induce
# performance issues in large organizations.
# See Debian bug #368251 for some of the consequences of *not*
# having this setting and smb.conf(5) for details.
; winbind enum groups = yes
; winbind enum users = yes

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 (default) means that usershare is disabled.
; usershare max shares = 100

# Allow users who’ve been granted usershare privileges to create
# public shares, not just authenticated ones
usershare allow guests = yes

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user’s home director as \\server\username
;[homes]
; comment = Home Directories
; browseable = no

# By default, the home directories are exported read-only. Change the
# next parameter to ‘no’ if you want to be able to write to them.
; read only = yes

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
; create mask = 0700

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
; directory mask = 0700

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server. Un-comment the following parameter
# to make sure that only “username” can connect to \\server\username
# The following parameter makes sure that only “username” can connect
#
# This might need tweaking when using external authentication schemes
; valid users = %S

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; read only = yes

# Un-comment the following and create the profiles directory to store
# users profiles (see the “logon path” option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
; comment = Users profiles
; path = /home/samba/profiles
; guest ok = no
; browseable = no
; create mask = 0600
; directory mask = 0700

#[printers]
# comment = All Printers
# browseable = no
# path = /var/spool/samba
# printable = yes
# guest ok = no
# read only = yes
# create mask = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
#[print$]
# comment = Printer Drivers
# path = /var/lib/samba/printers
# browseable = yes
# read only = yes
# guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace ‘lpadmin’ with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
; write list = root, @lpadmin

# A sample share for sharing your CD-ROM with others.
;[cdrom]
; comment = Samba server’s CD-ROM
; read only = yes
; locking = no
; path = /cdrom
; guest ok = yes

# The next two parameters show how to auto-mount a CD-ROM when the
# cdrom share is accesed. For this to work /etc/fstab must contain
# an entry like this:
#
# /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don’t want to use auto-mounting/unmounting make sure the CD
# is mounted on /cdrom
#
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom

[Compartilhados]
comment = “Shared Files”
browsable = yes
read only = yes
path = “/mnt/1tb/Compartilhados”
guest ok = yes
public = yes

[Writable]
comment = “Writable Folder”
browsable = yes
read only = no
path = “/mnt/1tb/Writable”
guest ok = yes
public = yes

]]>
https://wordpress.matbra.com/en/2013/03/07/ubuntu-12-04-configurando-samba-3-6-3/feed/ 12132 1520
Projects – Git Hub https://wordpress.matbra.com/en/2013/02/14/projetos-git-hub/ https://wordpress.matbra.com/en/2013/02/14/projetos-git-hub/#comments Thu, 14 Feb 2013 19:55:12 +0000 http://wordpress.matbra.com/?p=1515 Hello guys,

A few days ago I started working with Git Hub and uploading my recent projects to it.

Right now, I’m working hardly on my RF24SH Protocol which is a Protocol to NRF24L01+ (wifi module) that aims to create a network of nodes. The difference from Maniacbug RF24Network library is you don’t have to distribute Channels/ID/Parents by yourself. There is a Protocol when a new node connects to the network it will communicate and discover who he can talk to, and after that this new node will ask for configuration to master station, and master station will pass a set of configurations to id, distributing Channels/ID/Parents. So it is easier to beginners to use it and maybe it is easier to put this in some kind of product that you want to sell. (If you do this, it will be nice to hear from you).

There is a lot of work to be done on Protocol, but the library already has working examples. The RF24SH Page provides more information, if you still have questions, please let me know.

Other project that I’m working on is Pocket ImAT – Pocket Image Analysis Tools, which is a Program that (for now) provides you ways to measure image objects. For example, if you’re working with microscopes images, and have a lot of objects on your image with a scale, you can define a scale and draw lines inside objects and the program can save this for you. This project begin when a friend told me that he needed this program, because the one that they are using in his lab was too old and outdated.

But going back to Git Hub… Matheus (X-warrior) Bratfisch Git Hub

If you have any question, suggestion or anything, drop me a line.
Best Regards,
Matheus

]]>
https://wordpress.matbra.com/en/2013/02/14/projetos-git-hub/feed/ 4330 1515
Compile to Teensy 3.0 on Windows using Makefile https://wordpress.matbra.com/en/2013/01/09/compilando-para-teensy-3-0-no-windows-utilizando-makefile/ https://wordpress.matbra.com/en/2013/01/09/compilando-para-teensy-3-0-no-windows-utilizando-makefile/#comments Wed, 09 Jan 2013 22:57:15 +0000 http://wordpress.matbra.com/?p=1489 Good Night,

If you don’t want to use Arduino IDE (Or Teensy IDE? 😉 to programming and uploading your code to Teensy 3.0 you can use Makefiles.

The last IDE version can be found on PJRC Forum . As he said in the Beta 10 version, there is an Makefile example on “arduino-1.0.3\hardware/teensy/cores/teensy3” but to use it you need to add the arm binaries to your system path. To do this, open your command prompt. Start – execute – cmd.

And then type:

PATH = %PATH%;C:\CAMINHO_PARA_O_ARDUINO\arduino-1.0.3\hardware\tools\arm-none-eabi\bin

[If you don’t want to know the modifications that I did, just jump to the end where you can find a resume]

To guarantee that I will not screw everything, I did a copy of “arduino-1.0.3\hardware/teensy/cores/teensy3” and did my modifications on it. I executed:

cs-make.exe

Receveid this error message:

C:\CAMINHO_PARA_O_ARDUINO\arduino-1.0.3\Projects\Example_not_working>cs-make.exe
C:/Users/X-warrior/Desktop/tools/arm-none-eabi/bin/arm-none-eabi-gcc -Wall -g -Os -mcpu=cortex-m4 -mthumb -nostdlib -MMD -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -c -o analog.o analog.c
process_begin: CreateProcess(NULL, C:/Users/X-warrior/Desktop/tools/arm-none-eabi/bin/arm-none-eabi-gcc -Wall -g -Os -mcpu=cortex-m4 -mthumb -nostdlib -MMD -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I. -c -o analog.o analog.c, …) failed.
make (e=2): The system cannot find the file specified.
cs-make.exe: *** [analog.o] Error 2

Checking the Makefile I decided to change some configs and used FULL PATH for it.
TOOLSPATH = C:\CAMINHO_PARA_O_ARDUINO\arduino-1.0.3\hardware\tools
COMPILERPATH = C:\CAMINHO_PARA_O_ARDUINO\arduino-1.0.3\hardware\tools\arm-none-eabi\bin

The error received was the same, so checking the code again I saw the “abspath” and thought that maybe the problem was this, since I changed my folder location. So I removed all “$(abspath” remember that it has a parenthesis that closes the command. So for example:

$(abspath $(COMPILERPATH)) will be $(COMPILERPATH)

Trying to get it working again with cs-make, it started compiling it, but on the end I received this error:

C:\Users\X-warrior\Desktop\arduino-1.0.3\hardware\tools\arm-none-eabi\bin/arm-none-eabi-objcopy -O ihex -R .eeprom main.elf main.hex
C:\Users\X-warrior\Desktop\arduino-1.0.3\hardware\tools/teensy_post_compile -file=main -path= -tools=C:\Users\X-warrior\Desktop\arduino-1.0.3\hardware\tools
Opening Teensy Loader…
Teensy Loader could not find the file main
cs-make.exe: *** [main.hex] Error 1

Triple checking the Makefile I found “path=$(shell pwd)” and I didn’t remember this pwm command on windows so I tried to execute it and it didn’t work. So I changed it to “path=$(shell echo %cd%)”. Before I start compiling again I decide to clean directory using cs-make clean

I received the following errors:

C:\Users\X-warrior\Desktop\arduino-1.0.3\Projects\Example_not_working>cs-make.exe clean
rm -f *.o *.d main.elf main.hex
process_begin: CreateProcess(NULL, rm -f *.o *.d main.elf main.hex, …) failed.
make (e=2): The system cannot find the file specified.
cs-make.exe: *** [clean] Error 2

And then I noticed that it was calling rm -f which isn’t a windows command too. I changed the rm command to:

del *.o
del *.d
del $(TARGET).elf
del $(TARGET).hex

With this I managed to clean the files and tried to compile again, and… IT WORKS! I did a few tests using main.cpp that was being compiled and uploaded to my Teensy 3. Anyways to work with all that files wasn’t attractive so I decided to go a little further and do some cleaning. So inside my “Project” folder I copied all files excluding Makefile and main.cpp to my new folder inside my project “teensy/”. This way I can compile it without all that files on my working folder. I needed to do a few more changes on Makefile as follow:

C_FILES := $(wildcard *.c) \
$(wildcard $(addprefix teensy/, *.c)) \
$(wildcard $(addprefix teensy/util, *.c)) \
$(wildcard $(addprefix teensy/avr, *.c))
CPP_FILES := $(wildcard *.cpp) \
$(wildcard $(addprefix teensy/, *.cpp)) \
$(wildcard $(addprefix teensy/util, *.cpp)) \
$(wildcard $(addprefix teensy/avr, *.cpp))
OBJS := $(C_FILES:.c=.o) $(CPP_FILES:.cpp=.o)

Linker configuration to:

LDFLAGS = -Os -Wl,–gc-sections -mcpu=cortex-m4 -mthumb -Tteensy/mk20dx128.ld

And to keep it consistent:

$(TARGET).elf: $(OBJS) teensy/mk20dx128.ld
$(CC) $(LDFLAGS) -o $@ $(OBJS)

And then I found this error:

teensy/keylayouts.c:1: fatal error: avr/pgmspace.h: No such file or directory
compilation terminated.
cs-make: *** [teensy/keylayouts.o] Error 1

So I updated the CPPFLAGS to:

CPPFLAGS = -Wall -g -Os -mcpu=cortex-m4 -mthumb -nostdlib -MMD $(OPTIONS) -I. -Iteensy/

And also remembered that the clean should be updated too.

clean:
del *.o
del *.d
del $(TARGET).elf
del $(TARGET).hex
del $(CURRENT_PATH)\teensy\*.o
del $(CURRENT_PATH)\teensy\*.d

And add this on the begin of “Configurations that shouldn’t be updated”

CURRENT_PATH=$(shell echo %cd%)

With all this I managed to get the Makefile working on Windows compiling and uploading for Teensy 3.0

Summary:
You must update TOOLSPATH , COMPILERPATH and use your FULL PATH
Then create a folder “My_Project”
Create another folder inside your project called “teensy” (My_Project/teensy/)
Copy “arduino-1.0.3\hardware/teensy/cores/teensy3/” to “My_Project/teensy/” (subdir too, but not the Makefile)
Add the Makefile that you can download on the end of this post inside “My_Project”
Copy “Meu_Projeto/teensy/main.cpp” too “Meu_Projeto/main.cpp”
Programm inside main.cpp
Compile and upload with cs-make.exe

Makefile to Teensy on Windows

Matheus

]]>
https://wordpress.matbra.com/en/2013/01/09/compilando-para-teensy-3-0-no-windows-utilizando-makefile/feed/ 4661 1489
Programming atmega8u2 on Arduino Uno using USB Asp https://wordpress.matbra.com/en/2012/11/02/programando-atmega8u2-no-arduino-uno-utilizando-usb-asp/ https://wordpress.matbra.com/en/2012/11/02/programando-atmega8u2-no-arduino-uno-utilizando-usb-asp/#comments Fri, 02 Nov 2012 03:39:28 +0000 http://wordpress.matbra.com/?p=1473 Hello,

Recently my Arduino UNO stopped to be recognized by computer (using USB), I tried a few stuffs:

– Changed the Atmega328
– Rewrite bootloader
– Tested the controller on other board
– Measure the connection between a few pins using a multimeter

Nothing worked, so I decided to try to update the atmega8u2 firmware that is responsible to control de USB connection, I found two articles that I used as base:
Updating the Atmega8U2 on an Uno or Mega2560 using DFU e também How to upgrade atmega8u2 firmware

Both of them used solutions that needs to soldering a resistor on the board, but I don’t want to solder anything to the board, so I checked next to the atmega8u2 exists the ICSP pins, so I decided to try to burn the bootloader using them. Just to prevent other disaster I removed my atmega328 from board and connected the USB ASP to the ICSP pins. (Remember that the PIN 1 has a number or a little mark near it, mine had a small white circle)

After that, I accessed the dir that contains atmega8u2 hex of Arduino Uno (/arduino/hardware/arduino/firmware), and then I tried to rewrite the bootloader:

sudo avrdude -c usbasp -p m8 -u -U flash:w:UNO-dfu_and_usbserial_combined.hex

It didn’t worked because it is a atmega8u2 and I was trying to write it with atmega8 the error was:

avrdude: Yikes! Invalid device signature.

So I did a little more research and I discover that at90usb162 is almost the same, so I decided to take a shot with force (-F) option

sudo avrdude -c usbasp -p usb162 -u -U flash:w:UNO-dfu_and_usbserial_combined.hex -F

I waited it to burn, turn arduino uno off, connected my atmega328 and then turn it on and my USB just showed up on my computer, so now I can program my Arduino UNO using USB again.

Matheus

PS: Right after the booloader update I tried to Upload a Sketch to atmega328 without sucess, it was out of sync, so I tried to rewrite the bootloader of atmega328, and then everything started to work.

References:
http://8515.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=688637
http://image.pinout.net/pinout_10_pin_files/connector_pinout.php?image=avr_icsp.png&pinout=%20This%20a%20pinout%20of%20the%20AVR%20ICSP%20header.%20(6-pin%20&%2010-pin)

]]>
https://wordpress.matbra.com/en/2012/11/02/programando-atmega8u2-no-arduino-uno-utilizando-usb-asp/feed/ 659 1473
Using USB ASP as a regular user https://wordpress.matbra.com/en/2012/10/28/usando-usb-asp-como-nao-root/ https://wordpress.matbra.com/en/2012/10/28/usando-usb-asp-como-nao-root/#comments Mon, 29 Oct 2012 02:40:22 +0000 http://wordpress.matbra.com/?p=1470 Hello,

To use your USB Asp as a regular user (non root) you must add the following rule to /etc/udev/rules.d

Execute:

$ sudo pico /etc/udev/rules.d/99-usbasp.rules

Add:

SUBSYSTEM==”usb”, ENV{DEVTYPE}==”usb_device”, SYSFS{idVendor}==”16c0″, SYSFS{idProduct}==”05dc”, MODE=”0666″

Save the file, reboot and you will be able to use USB Asp as a non-root.

Matheus

]]>
https://wordpress.matbra.com/en/2012/10/28/usando-usb-asp-como-nao-root/feed/ 3077 1470
Raspberry Pi with Raspbian dropping SSH connection https://wordpress.matbra.com/en/2012/10/26/raspberry-pi-com-raspbian-derrubando-conexao-ssh/ https://wordpress.matbra.com/en/2012/10/26/raspberry-pi-com-raspbian-derrubando-conexao-ssh/#comments Fri, 26 Oct 2012 05:37:47 +0000 http://wordpress.matbra.com/?p=1467 I was playing with my Raspberry PI with Raspbian and the ssh connection was dropping (or timeouting, or something like this), I got a “Broken Pipe” message, and If I tried to connect again, it refuses it.

I don’t know why, but to fix it edit /etc/ssh/sshd_config with

sudo nano /etc/ssh/sshd_config

Search for TCPKeepAlive and update it from yes to no

TCPKeepAlive no

It doesn’t make sense, I know, but it worked.

Abraços

]]>
https://wordpress.matbra.com/en/2012/10/26/raspberry-pi-com-raspbian-derrubando-conexao-ssh/feed/ 3049 1467
Ultrasonic distance sensor with Arduino and HC-SR04 (Arduino + HC-SR04) https://wordpress.matbra.com/en/2012/10/20/sensor-de-distancia-ultrasonico-com-arduino-e-hc-sr04-arduino-hc-sr04/ https://wordpress.matbra.com/en/2012/10/20/sensor-de-distancia-ultrasonico-com-arduino-e-hc-sr04-arduino-hc-sr04/#comments Sat, 20 Oct 2012 05:34:51 +0000 http://wordpress.matbra.com/?p=1462 Good night,

Going on with my adventures with Arduino and sensors, today I decided to play with Ultrasonic sensor HC-SR04 to measure distance.

HC-SR04 is pretty easy to work with, it has 4 pins, VCC to energy, Trig to start a measurement, Echo to get the distance, and GND to ground.

It has a library to get it working, it is called Ultrasonic. The only problem that I had was the Library is out of date, it still uses WProgram.h but Arduino 1.0.1 uses Arduino.h, so I updated it. (You can get on the end of the post).

The library must be included on your dir “arduino-1.0.1/libraries” and you must restart your IDE.

Sensor VCC connects to Arduino +5V pin
Sensor Trig connects to Arduino PIN 12
Sensor Echo connects to Arduino PIN 13
Sensor GND connnects to Arduino GND PIN

You can configure it on trig and echo variables.

[code lang=”c”]
#include “Ultrasonic.h”
int trig = 12;
int echo = 13;
Ultrasonic ultrasonic(trig,echo);

void setup() {
Serial.begin(9600);
}

void loop()
{
Serial.print(“Distance CM:”);
Serial.println(ultrasonic.Ranging(CM));
Serial.print(“Distance INC:”);
Serial.println(ultrasonic.Ranging(INC));
delay(100);
}
[/code]

Referências:
HC-SR04 DataSheet
Biblioteca Ultrasonic atualizada para Arduino 1.0.1

]]>
https://wordpress.matbra.com/en/2012/10/20/sensor-de-distancia-ultrasonico-com-arduino-e-hc-sr04-arduino-hc-sr04/feed/ 1830 1462
Installing Flash 11.2 on Ubuntu 12.10 – 64 Bits. https://wordpress.matbra.com/en/2012/10/19/instalando-flash-11-2-no-ubuntu-12-10-64-bits/ https://wordpress.matbra.com/en/2012/10/19/instalando-flash-11-2-no-ubuntu-12-10-64-bits/#respond Fri, 19 Oct 2012 04:23:02 +0000 http://wordpress.matbra.com/?p=1459 Hello,

This update of Flash Player installer uses the new version 11.2. It downloads it and install.

To install it you must give execution permission:

chmod +x native-64bit-flash-installer-11.2.sh

And then, just execute it:

./native-64bit-flash-installer-11.2.sh

The installation should be complete without problems.

Flash Player 11.2 Installer – Ubuntu 64 Bits

If you want to install older version take a look at: Install Flash 10 on Ubuntu 64 Bits

Remembering that this is the last Flash version for Linux. Sadly. Security problems will have updates.

Matheus

]]>
https://wordpress.matbra.com/en/2012/10/19/instalando-flash-11-2-no-ubuntu-12-10-64-bits/feed/ 0 1459
Installing Java on Ubuntu 12.10 – 64 bits https://wordpress.matbra.com/en/2012/10/19/instalando-java-no-ubuntu-12-10-64-bits/ https://wordpress.matbra.com/en/2012/10/19/instalando-java-no-ubuntu-12-10-64-bits/#comments Fri, 19 Oct 2012 03:54:47 +0000 http://wordpress.matbra.com/?p=1455 Hello,

After install my Ubuntu 12.10 and setup it I try to access my online banking. I couldn’t access it, because the Java wasn’t there. So here is how to Install Java on Ubuntu 12.10 (64 bits) and use it on firefox.

Install:

$ sudo apt-get install icedtea6-plugin

Now to have your Java working on firefox use:

$ sudo apt-get install icedtea-plugin

Close your browser, open and enjoy.

Best Regards,
Matheus

]]>
https://wordpress.matbra.com/en/2012/10/19/instalando-java-no-ubuntu-12-10-64-bits/feed/ 1715 1455
Remove or Disable Overlay Scrollbar – Ubuntu 12.10 https://wordpress.matbra.com/en/2012/10/19/remover-ou-desabilitar-a-barra-de-rolagem-overlay-ubuntu-12-10/ https://wordpress.matbra.com/en/2012/10/19/remover-ou-desabilitar-a-barra-de-rolagem-overlay-ubuntu-12-10/#comments Fri, 19 Oct 2012 03:48:29 +0000 http://wordpress.matbra.com/?p=1453 Good Night,

Sadly (for me) the Scroll bar on Ubuntu 12.10 are still the same as Ubuntu 11.10. I particularly don’t like it. So I tried the same method to disable the overlay scroll bar on Ubuntu 11.10 and Ubuntu 11.04 and Ubuntu 12.04 and it works! (I just tested the disable method.)

Use this:

# echo export LIBOVERLAY_SCROLLBAR=0 > /etc/X11/Xsession.d/80overlayscrollbars

If you try the other methods, please let us know if it works!

Remove or Disable Overlay Scrollbar – Ubuntu 11.10

PS: The scrollbar arrow is not showing, maybe a little bug.

Best Regards,,
Matheus

]]>
https://wordpress.matbra.com/en/2012/10/19/remover-ou-desabilitar-a-barra-de-rolagem-overlay-ubuntu-12-10/feed/ 395 1453