Howto run an application on SailfishOS with root permissions 

Normally you will not need it unless you are debugging something permission sensitive stuff.

- Activate developer mode, set ssh password
- SSH to your phone
- devel-su
- export XDG_RUNTIME_DIR=/run/user/100000
- xdg-open /usr/share/applications/ble_scanner.desktop
[ hozzászólás ] [ 0 trackbackek ] permalink ( 0 / 0 )
nRF51822 development logs 

I have purchased a similar board from ebay to play with:

The Nordic's PCA10028 devboard has almost the same MCU as mine, but it has double amount of RAM. To compile the examples for this board the linker script needs to be modified:

/* Linker script to configure memory regions. */

GROUP(-lgcc -lc -lnosys)

FLASH (rx) : ORIGIN = 0x0, LENGTH = 0x40000
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4000

.fs_data :
PROVIDE(__start_fs_data = .);
PROVIDE(__stop_fs_data = .);
} > RAM

INCLUDE "nrf5x_common.ld"

[ hozzászólás ] ( 1 megtekintés ) [ 0 trackbackek ] permalink ( 3.5 / 6 )
Driving an ICF-340-30-2 fan motor with an STM8 

My ex-neighbour came to me with an idea which was built around a HVAC fan motor and it's driver. It was salvaged from an old Toshiba air conditioner. You can find a pretty comprehensive service manual for it here. The motor is a ICF-340-30-2 and the driving board is a MCC-821-03 board.

Of course in it's state it was not able to drive the motor as we wanted so I have cut out the original MCU and replaced with an 1 USD STM8S003F3 board:

The motor driving is simple: there is a drive and a feedback signal. Both are optically isolated by the IC10 and IC11 optocouplers.

Here is the relevant pins of the main MCU (IC30):
- 21: Drive signal
- 22: Feedback signal
- 17: front button
(VCC (+5V) and GND is accessible from a plenty place)

I have successfully managed to get the motor running by generating an 1.6KHz PWM signal to the drive signal. I have not cared about the feedback signal (closed loop is for the puppies :D)
[ hozzászólás ] ( 8 megtekintés ) [ 0 trackbackek ] permalink ( 3.3 / 9 )
Hack from the past: DIY Nokia DKU-2 cable 

Many years ago, when the Nokia pop-to-port cables were expensive, I have created the following "DKU-2 cable" from an aftermarket headset, some prototyping PCB and an USB B type connector, by melting the pogo like pins to the proper positions:

It was slightly faster with my Nokia 6230 than the Bluetooth, not to mention the iRDA at that time.

Watch out for the carefully impedance controlled USB traces! (Hah, at that time I have had no idea about that fact..)
[ hozzászólás ] ( 4 megtekintés ) [ 0 trackbackek ] permalink ( 2.9 / 13 )
Adding Cosmic compiler error parser to QtCreator 

I am forced to use Cosmic C compiler for developing STM8. All of the existing IDEs (STVD and Cosmic's own) for STM8 are terrible, so I am using QtCreator for editing code.

To be able to jump easily to the compiler errors/warnings I have created a custom error parser:

I have used the following error parser regexps:

for errors


for warnings.
[ hozzászólás ] ( 6 megtekintés ) [ 0 trackbackek ] permalink ( 2.9 / 39 )

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Következő> >>