Month: September 2014

Programming a LPC1114FN28 DIP chip using open-source tools

This link explains the steps needed to get a DIP Cortex-M0 chip working using only open-source tools:

http://www.meatandnetworking.com/tutorials/lpc1114fn28-with-open-source-tools/

I tried it, but was facing an issue to detect the device:

$ sudo lpc21isp/lpc21isp lpc1114-blink/out/lpc1114_blink_led.hex /dev/ttyUSB0 115200 12000
lpc21isp version 1.83
LoadFile
File lpc1114-blink/out/lpc1114_blink_led.hex:
	loaded...
Start Address = 0x000000C1
	converted to binary format...
	image size : 484
Image size : 484
Serial port open
Synchronizing (ESC to abort).................................................................................................... no answer on '?'

I double checked the resistor between ground and PIO0_1 and it was fine, but no luck!
Then I decide to press RESET while the lpc21isp was trying to detect the chip and… Great it was detected correctly and flashed the blink LED program.

This LPC1114 chip is very basic, no DMA, no PWM, no RTC, no DAC, etc, but it is low cost and easy to use.

Another review about LPC1114: http://www.downtowndougbrown.com/2012/06/microcontrollers-gpiotimersinterrupts-example-and-lpcxpresso-lpc1114-review/

Online WPA cracker with stats

If you are looking for a free online WPA cracking then take a look at this site:

http://wpa.darkircop.org

You can use besside-ng to collect WPA handshakes and upload the CAP file to this site.

If your captured file is too big, then you can use wireshark to filter it (from gpuhash.me):

Stripping your handshakes with Wireshark:

    Open your capture in Wireshark
    Enter "eapol || wlan.fc.type_subtype == 0x04 || wlan.fc.type_subtype == 0x08" as filter expression (without quotes) then press "Apply"
    Go to File->Save As... menu, enter new file name and select "Displayed" to save filtered packets only 

How to do late board initialization on NuttX

I was looking for a way to call my custom board initialization on NuttX, but when it tries to register a device it was failing because “/dev” (filesystem) wasn’t initialized yet.

I “fixed” it calling my board initialization from arch up_initialize(), then I asked in the NuttX mailing list for a solution similar to U-Boot’s board_late_init. Then Mr. Greg pointed me to BOARD_INITIALIZE feature already present on NuttX:

config BOARD_INITIALIZE
        bool "Custom board/driver initialization"
        default n
        ---help---
                By default, there are three points in time where you can insert
                custom initialization logic:

                1) _boardinitialize():  This function is used only for
                initialization of very low-level things like configuration of
                GPIO pins, power setting.  The OS has not been initialized
                at this point, so you cannot allocate memory or initialize
                device drivers at this phase.

                2) The next level of initialization is performed by a call to
                up_initialize() (in arch//src/common/up_initialize.c).
                The OS has been initialized at this point and it is okay to
                initialize drivers in this phase.

                3) And, finally, when the user application code starts.

                If BOARD_INITIALIZE is selected, then an additional initialization
                call will be performed in the boot-up sequence to a function
                called board_initialize().  board_initialize() will be
                call between phases 2) and 3) above, immediately after
                up_initialize() is called.  This additional initialization
                phase may be used, for example, to initialize board-specific
                device drivers.

All I need to do is to place my custom initialization inside board_initialize() at stm32_boot.c :

#ifdef CONFIG_BOARD_INITIALIZE
void board_initialize(void)
{
  /* Perform board initialization */

  (void)my_custom_board_init();
}
#endif /* CONFIG_BOARD_INITIALIZE */