Saturday, March 04, 2017

OpenOCD Error Connecting to STM32F4 Discovery Board

I recently setup a development system for STM32 microcontroller and I encountered this when setting up OpenOCD.

After following the instruction here on setting up openocd I was not able to connect using the command:


 openocd -f board\stm32f4discovery.cfg  
 GNU ARM Eclipse 64-bits Open On-Chip Debugger 0.10.0-00113-g0f83948 (2017-01-24-18:48)  
 Licensed under GNU GPL v2  
 For bug reports, read  
     http://openocd.org/doc/doxygen/bugs.html  
 Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD  
 adapter speed: 2000 kHz  
 adapter_nsrst_delay: 100  
 none separate  
 srst_only separate srst_nogate srst_open_drain connect_deassert_srst  
 Info : Unable to match requested speed 2000 kHz, using 1800 kHz  
 Info : Unable to match requested speed 2000 kHz, using 1800 kHz  
 Info : clock speed 1800 kHz  
 Error: open failed  
 in procedure 'init'  
 in procedure 'ocd_bouncer'  


The newer STM32F4 Discovery board uses ST-Link V2.1 and the stm32f4discovery.cfg uses ST-Link V2.

Edit the file: openocd/scripts/board/stm32f4discovery.cfg

Change the line:

source [find interface/stlink-v2.cfg]

to

source [find interface/stlink-v2-1.cfg]



 openocd -f board\stm32f4discovery.cfg  
 GNU ARM Eclipse 64-bits Open On-Chip Debugger 0.10.0-00113-g0f83948 (2017-01-24-18:48)  
 Licensed under GNU GPL v2  
 For bug reports, read  
     http://openocd.org/doc/doxygen/bugs.html  
 Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD  
 adapter speed: 2000 kHz  
 adapter_nsrst_delay: 100  
 none separate  
 srst_only separate srst_nogate srst_open_drain connect_deassert_srst  
 Info : Unable to match requested speed 2000 kHz, using 1800 kHz  
 Info : Unable to match requested speed 2000 kHz, using 1800 kHz  
 Info : clock speed 1800 kHz  
 Info : STLINK v2 JTAG v25 API v2 SWIM v14 VID 0x0483 PID 0x374B  
 Info : using stlink api v2  
 Info : Target voltage: 2.883666  
 Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints  


I was able to connect to the board.  I hope this helps.

Friday, January 20, 2017

Best Type C Dongles for Mac & PC


Features:

  • 2x USB 3.0 Ports ( 5Gbps Transfer Rate)
  • 1x SD Memory Card Input
  • 1x Micro SD Memory Card Input
  • 1x Micro USB Input (Additional Power Supply Port)
  • Aluminum Body



Type C RJ45 Gigabit Ethernet Lan Wires Netword Adapter, USB-C LAN Wired USB 3-Port Network Converter for Apple New Macbook, Chromebook Pixel and More(Rose Gold)

Features:


  • Support SuperSpeed USB 3.0 data transfer rate up to 5 Gbps for 1000 BASE-T network performance with backwards compatibility to 10/100 Mbps networks.
  • G-TING LAN USB-C adapter is an easy way to gain wired gigabit network speeds over USB-C for faster HD video streaming, gaming, web browsing, network storage and more,provides an alternative to connecting to the internet via Wi-Fi.
  • G-TING Ethernet Adapter,powered via USB – no external power adapter needed,is the perfect solution for the business traveler who prefers a secure and fast wired Ethernet connection.
  • Superior Aluminum Quality,Compact unibody aluminum design effectively saves precious desk space. To ensure reliability, work and fun is fully integrated.
  • Brand G-TING Products Have a Year Services that Begins on the Date of Purchase. If there are Any Product Quality Problems, Please Feel Free to Contact Our Customer Service Agents for Help



Features:


  • Add four USB 3.0 ports to your devices with USB-C adapter
  • USB 3.0 Ports support ultra-fast data transfer rates of up to 5Gbps and downward compatible with USB 2.0/1.1 specifications
  • VGA port outputs resolutions up to 1080p to VGA displays or projectors
  • Easy installation - No driver or power adapter required
  • Package Contents: AUKEY CB-C27 USB C Hub, Instruction Manual, 24 Month Warranty Card






Friday, October 14, 2016

Flysky iA6 iBUS Setup

The Flysky iA6 receiver is PWM only receiver.  It doesn't even support PPM.  It is a low cost and compact receiver for the Flysky i6 Transmitter.

iBUS Hack

 If you know how to solder and compile your own copy of Cleanflight/Betaflight firmwares you can have an iBUS receiver using the FS-iA6.  It is very compact once you remove the pins and only uses the iBUS wires.

Wiring


Use this versions of the files then recompile.


Read the RCGroup user darven that started it here

Read the betaflight PR here.

Alternative

This is just an alternative if you have extra iA6 receivers.  The FS-iA6B is the same price as the iA6 and it has ibus/ppm port and can output 10 channels on ibus configuration.


Eachine EB185 FPV Racing Drone

Eachine EB185 FPV Racing Drone is a very compact racing drone from Eachine that comes ready to fly package.  It can be purchased with an optional GPS module.  It is running a Cleanflight firmware making it very configurable.

Specifications:


Aircraft

  • 4" rotors (101mm)
  • Dimension: (L x W x H): 197mm x 168mm x 75mm
  • Weight: 350g including battery
  • Controller: Eachine I6
  • Receiver: Eachine X6
  • GPS: EB7M
  • OSD: EB185 OSD
  • Flight Controller: NAZE32 REV6 Full
  • VTX: TX58200 40ch
  • Motor: Eachine B1806-2300KV
  • ESC: BLheli 12A
  • Battery: 11.1v 1300mAh 30C 3S Lipo
  • Flight time: 5-7mins


Suggested Upgrades

Wednesday, October 12, 2016

Interfacing The SSD1306 OLED Display To OrangePi

I recently purchased an 0.96 Inch 4Pin IIC I2C OLED Display Module and needed to interface it to my OrangePi.  It uses the SSD1306 chipset and can be updated via I2C interface.

SSD1306 Datasheet.

I modified a Python library built for RaspberryPi so it would work with the OrangePi I2C ports.

You can checkout the library here: https://github.com/nukem/ssd1306


You can buy the OLED Display here: https://goo.gl/coVB5o

Sunday, December 06, 2015

3D Printer Auto Bed Leveling Geeetech Prusa i3 Pro X

I used a NPN inductive sensor model LJ12A3-4-Z/BX

It is specified to work on 6v to 36v power but mine worked on 5v off the GT2560 board so it was just perfect.

I wired it like below:

SENSOR               BOARD

GND(BLUE)------------------GND

V+(BROWN)------------------5v

OUT(BLACK)-----------------Zmin


Made the following changes to the Configuration.h file of the firmware, change the Z_MIN_ENDSTOP_INVERTING to true compiled and uploaded the firmware.

const bool Z_MIN_ENDSTOP_INVERTING = true;

Enabled bed auto leveling:

#define ENABLE_AUTO_BED_LEVELING

Set defaults on the leveling grid and sensor position:

    // set the rectangle in which to probe
    #define LEFT_PROBE_BED_POSITION 15
    #define RIGHT_PROBE_BED_POSITION 190
    #define BACK_PROBE_BED_POSITION 165
    #define FRONT_PROBE_BED_POSITION 20

Set the grid points to 3 so it will check 9 points in the bed.

    #define AUTO_BED_LEVELING_GRID_POINTS 3


Set the grid points to check:

      #define ABL_PROBE_PT_1_X 15
      #define ABL_PROBE_PT_1_Y 180
      #define ABL_PROBE_PT_2_X 15
      #define ABL_PROBE_PT_2_Y 20
      #define ABL_PROBE_PT_3_X 170
      #define ABL_PROBE_PT_3_Y 20


Compiled and uploaded the firmware.


The red light will always be turned on but will get brighter once it get nears a metal object.

The default Geeetech firmware can be downloaded from here: http://www.geeetech.com/forum/download/file.php?id=1589

You can buy the sensor here.

UPDATE 10/12/2016

I have replaced my sensor with a capacitive sensor and it works on glass or any surface:


For the one requesting the wiring here's an image of the Geeetech board. Power was taken from an unused fan port.




Saturday, May 09, 2015

How To Setup A Free Proxy Server Using Amazon Services CentOS

Tinyproxy is a small and fast HTTP/HTTPS proxy server daemon.

Open Amazon Web Services (AWS) Account


Register for a free AWS account. You will need a valid credit card to register. The free tier allows you to use their services free (limited) for up to 12months.

Create an EC2 Instance. Here's a great tutorial on how to do it. It includes how to connect to it via SSH.


Install tinyproxy


Connect to your instance via SSH and issue the following command:


yum -y install tinyproxy --enablerepo=epel


Configure tinyproxy


You must allow your IP to connect to the server

sudo vim /etc/tinyproxy/tinyproxy.conf

Allow XXX.XXX.XXX.XXX #Your public IP address

Then we need to make sure it runs even on restart.
sudo chkconfig tinyproxy on
sudo service tinyproxy start






TheFollowerShop - Where to buy Instagram Followers, Instagram Likes

Saturday, May 02, 2015

Microsoft Announced Partnership With the Arduino Community

Microsoft released as open source a Windows Virtual Shields for Arduino technologies and a wireless access application called Windows Remote Arduino.

With Windows Virtual Shields for Arduino, users can tap into the incredible power of their Windows 10 devices through wireless protocols. For example Lumia 530 contains a lot of Arduino Shield capabilities and allows designers/makers to connect all those components seamlessly. Imagine being able to create an Arduino project that includes GPS, Web connectivity/parsing, touch display, speech technologies and more!

With Windows Remote Arduino developers can create a wireless interface to Windows 10 devices as if they were physically attached to an Arduino Shield. Arduino functions can be accessed directly from the Universal Windows Application.

Read more here.

Sunday, February 03, 2013

Import Sketchup Model to Unity 3D

You can use Sketchup to build your model then export them to DAE format.

You can then use the free FBX converter from Autodesk to convert the DAE file to FBX and load it to Unity 3D

Autodesk stand alone FBX converter:

http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=10775855

Saturday, February 11, 2012

Missing OS X Dock

Sometimes the OS X Dock, icons that you can click to quick launch applications, crashes and it disappears.

The best way to restart the Dock and see it again without restarting is issuing the following command on the Terminal:

killall -KILLALL Dock


When the menu bar becomes unresponsive, you can also restart it using the following commands:


killall -KILLALL SystemUIServer



Wednesday, October 26, 2011

In-house PCB Through-Hole How To's

In-house PCB production.

References:


Videos

Saturday, September 03, 2011

Intel Announce A New Random Generator for their 64bit CPUs

New random number generator for the next generation of Intel CPUs. A new instruction RdRand built for Intel 64-bit microprocessor retrieves a 16-, 32-, or 64-bit random value and makes it available in a software-accessible register.

Thursday, September 24, 2009

A Look Into the Future

This are still concepts but we know the technology is here to implement this thing.

A computer tablet that has visual recognition and do visual search.







Ever wonder how a place looks like in the past?



Ah the weather widget, its always present on any new gadget!



Tons of information on your hand while on tour!





Imagine how your apartment would look like even before you buy a single thing!








Dictionary search without typing what you see!





Food nutrition information without a sweat.


It can do visual search







Go out and check the name of the stars you have always watch every night.


Interact with in real time and find related information to a structure.




Below are some of my favorites it has practical uses.





Lip movement recognition?!!



On a foreign land and want to read the local newspaper?! No problem translate it!




HUD (Heads Up Display) for everyone! Navigating a building would become a breeze!

Thursday, September 03, 2009

Installing LAMP to CentOS 5.x

This is assuming CentOS was installed properly and connected to the internet.

Installing MySQL



yum install mysql mysql-server

Confirm the install and by answering yes, and yum will download all packages needed to install MySQL.

We need to make sure MySQL is started on boot

chkconfig --levels 235 mysqld on

You can now start the MySQL server by issuing the following command:

/etc/init.d/mysqld start

You can also start it using the command below:

service mysqld start

Once MySQL server is running it will display initial startup text and will instruct you to set "root" user password.

mysqladmin -u root password rootpassword
mysqladmin -h server1.example.com -u root password rootpassword


Make sure you change the highlighted items with the correct information.

Installing Apache (http server)


yum install httpd

Make it run on boot.

chkconfig --levels 235 httpd on

Start the service

service httpd start

Install PHP

yum install php


Tuesday, February 10, 2009

Removing the Firefox Scroll Bars

I was developing for a MID (Mobile Internet Device) and needed to remove the vertical scroll bar of Firefox, the default browser, because of the page shift that happens when viewing a long page. MID supports touch so scrolling doesn't require the vertical scroll bar.

The solution is a simple CSS rule:


<body style="overflow:hidden">

Friday, January 02, 2009

Watching Remote Logs

We sometimes need to monitor log files on remote servers.

A simple method, that doesn't require us to log in to the remote host, is to run GNU tail command over the network using ssh.

Example, if we want to monitor the file /var/log/sample.log on the remote host hostname.


$ ssh hostname tail -retry -follow=name /var/log/sample.log