Monthly Archives: June 2016

Debian Keyboard Layout

Debian Wiki: Keyboard

$ dpkg-reconfigure keyboard-configuration
$ cat /etc/default/keyboard
$ setxkbmap ch
$ cat /usr/share/doc/keyboard-configuration/README.Debian
After modifying /etc/default/keyboard, you can apply the changes to the Linux
console by running setupcon. If X is configured to use that file too, then the
changes will become visible to X only if

udevadm trigger --subsystem-match=input --action=change

is called, or the system is rebooted.

Executable File Format / Container

Microsoft

  • Section 2.3.1. Machine Types

Microsoft PE and COFF Specification
How to check if a binary is 32 or 64 bit on Windows?

Wikipedia

Portable Executable (PE)
Common Object File Format (COFF)
Executable and Linkable Format (ELF)
Mach object (Mach-O)

Ange Albertini (corkami.com)

github.com/angea/corkami
pics.corkami.com

wikibooks.org

x86 Disassembly
x86 Disassembly/Windows Executable Files
x86 Disassembly/Linux Executable Files

Compiler

Link Time Optimization

Understanding Windows Internal Call Structure
PeLib An open-source C++ library to modify PE files
The PE file format
PE Explorer: View, Edit, and Reverse Engineer EXE and DLL Files
PE Explorer Disassembler

MSYS2

$ pacman -S binutils
$ objdump -f /c/Program\ Files/Git/bin/git.exe

/c/Program Files/Git/bin/git.exe:     file format pei-x86-64
architecture: i386:x86-64, flags 0x00000103:
HAS_RELOC, EXEC_P, D_PAGED
start address 0x0000000000401510

PROXXON Microfräse MF 70 (27110)

Videos

PCB milling tutorial with a Proxxon MF 70 CNC milling machine using Estlcam and PCB-GCODE

Software

Estlcam

Hardware

mf70_platine

Eine Zwangskühlung über zwei Zusatzlüfter verfügt meine Fräse sowieso schon, da es bei der Orginalmaschine schon von Haus auf ein Hitzestau so das ich da schon etwas nachgeholfen habe.

Steuerplatine für MF-70 Proxxon Fräse

Wie kann man als Hersteller auf diese Waise Kühlöffnungen ungeschützt anbringen, ohne sie gegen das eindringen von Leitfähigen Spänen und Stäuben zu sichern. Ein paar “gewebeähnliche” Matten von innen über die Kühlöffnungen geklebt sollten da schon schlimmeres verhindern.

Andererseits kann ich mir kaum vorstellen,daß diese Dinger für 100% Einschaltdauer geeignet sind.Wenn ich also da die Schrittmotoren drannbaue und irgendein Programm fräsen will,kann es sein das die nach ner Stunde abraucht.

Proxxon MF70

Direkt danach habe ich zwei DS18S20 Temperatursensoren eingebaut, der eine misst die Temperatur des Motors in der Nähe der Bürsten, der andere sitzt auf dem Leistungshalbleiter der „Steuerung“ für die Drehzahl. Danach habe ich die obere Abdeckung kreisförmig ausgeschnitten und einen 5V Lüfter daraufgesetzt, der 13m^3 Luft in der Stunde durch die seitlichen Lüftungsschlitze am Motor vorbei saugt. Jetzt habe ich sehr stabile 31°C am Motorgehäuse und gequalmt hat es bis jetzt auch nicht wieder.

MF70 und der tote Motor

Neue Proxxon-Fräse abgeraucht

Italienisch

montaggio kress?
Controllo velocità mandrino Proxxon MF70

  • Triac BTB 16-600BW Artikel Distrelec Code: 620842
  • Diac DB 3, Artikel Distrelec Code: 620839
  • Brückengleichrichter DF 06M Artikel Distrelec Code: 600605

Metall Modelbau

Anleitungen und Bauberichte zum Thema Metallmodellbau
Eine Kleinfräsmaschine, oder Zerspanung auf dem Desktop
Zwei kleine Universalfrässpindeln

  • Single-Phase Bridge Rectifiers = Brückengleichrichter
  • Thyristor / TRIAC (Triode for Alternating Current, Zweirichtungs-Thyristortriode oder Symistor)

Brushless Motor

Proxxon MF70
MF70 Brushless Conversion
Fresa Proxxon MF70 con CNC kit by CNCITALIA con mandrino Brushless da 1820W
Youtube: Proxxon MF70 brushless motor conversion
MF70 brushless Motor ER11 Spindel

Shared Memory: System V / POSIX / mmap

Beej’s Guide to Unix IPC – Shared Memory Segments
Programming in C – IPC: Shared Memory
System V IPC
Oracle Programming Interfaces Guide – System V Shared Memory

Don’t use absolute pointer

POSIX / System v Shared Memory vs Threads Shared Memory

In the table I mention the virtual memory mapping issues, what is all that about? It’s about being able to store pointers on the shared memory and whenever that make sense. As I point out the memory can be mapped at different virtual addresses in different processes which means that you can’t use absolute pointer. I think this is better understood with a picture:

virtualmemory

In the picture process 1 has stored the 0x70000100 address in the shared memory, that points to somewhere in the shared memory for process 1 but when process 2 reads that address it points to a completely different data in that process that it’s outside the shared memory. That is because the shared memory was mapped at 0x7000000 on process 1 but on 0xFF000000 on process 2.

This means that when using POSIX shared memory you will have to refrain from storing pointers and need to store offsets or indexes instead (ptrdiff_t, etc). That, in turns, means that you have to engineer your data structures for shared memory.

stackoverflow

Why use SysV or POSIX shared memory vs mmap()?
How to list processes attached to a shared memory segment in linux?

  • ipcs
  • ipcmk
  • ipcrm
# ipcs 

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x07021999 0          root       644        1704       2                       
0x00000000 98305      lightdm    600        67108864   2          dest            
0x00000000 3014666    andreas    600        393216     2          dest         
0x00000000 829358091  andreas    600        393216     2          dest         
0x00003e77 1092059148 andreas    666        16384      0                       
0x00000070 1103659029 root       644        4100       0                       
0x00000071 1103691798 root       644        4100       0                       
0x00000000 1094877207 andreas    600        393216     2          dest         
0x00000000 1094975512 andreas    600        393216     2          dest         

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0x00000070 0          root       644        1         
0x00000071 32769      root       644        1         

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages

# cat /proc/sysvipc/shm                   
       key      shmid perms                  size  cpid  lpid nattch   uid   gid  cuid  cgid      atime      dtime      ctime                   rss                  swap
 117578137          0   644                  1704   961  5094      2     0     0     0     0 1465985643 1465985643 1460954208                  4096                     0
         0      98305  1600              67108864   829   985      2   994   991   994   991 1460957764 1460957764 1460957764              14114816                     0
         0     196610  1600                393216  1173  1006      2  1000  1000  1000  1000 1460957835          0 1460957835                294912                     0
         0     229379  1600                393216  1173  1006      2  1000  1000  1000  1000 1460957836          0 1460957836                393216                     0
         0     753668  1600                393216  1176 31704      2  1000  1000  1000  1000 1465912954 1465912954 1460964055                327680                     0
         0     622597  1600                524288  1178  1006      2  1000  1000  1000  1000 1460957836          0 1460957836                 57344                     0
         0     720902  1600                393216  1269  1006      2  1000  1000  1000  1000 1460957837          0 1460957837                393216                     0
         0  740392967  1600                911400  1405  1006      2  1000  1000  1000  1000 1462974727          0 1462974727                913408                     0
         0  829259784  1600                393216  1571  7645      2  1000  1000  1000  1000 1465140074 1465140074 1462981930                393216                     0
         0    1179657  1600                393216  1871  9967      2  1000  1000  1000  1000 1464769386 1464769386 1460964459                393216                     0
         0    3014666  1600                393216  1871  9967      2  1000  1000  1000  1000 1464769386 1464769386 1460964669                393216                     0
         0  829358091  1600                393216  1571  7645      2  1000  1000  1000  1000 1465140074 1465140074 1462981931                294912                     0
     15991 1092059148   666                 16384 15991 15991      0  1000  1000  1000  1000 1464004251 1464004251 1464004251                  4096                     0
         0 1102446605  1600                393216 23751  1006      2  1000  1000  1000  1000 1465368150          0 1465368150                393216                     0
         0 1103626254  1600                 33904  1405  1006      2  1000  1000  1000  1000 1465915710          0 1465915710                 36864                     0
         0   13139983  1600                393216  1183  1006      2  1000  1000  1000  1000 1460992697          0 1460992697                 90112                     0
         0 1103134736  1600                524288 31704  1006      2  1000  1000  1000  1000 1465912955          0 1465912955                 40960                     0
         0 1092419601  1600               8388608 15992  4833      2  1000  1000  1000  1000 1465984866 1465984866 1464004285               2383872                     0
         0 1066008594  1600               7887360  1405  1006      2  1000  1000  1000  1000 1463145010          0 1463145010               7888896                     0
         0 1086849043  1600                393216  1269  1006      2  1000  1000  1000  1000 1463486217          0 1463486217                393216                     0
         0 1081835540  1600                393216  1176 31704      2  1000  1000  1000  1000 1465912954 1465912954 1463484456                131072                     0
       112 1103659029   644                  4100  4744  5016      0     0     0     0     0 1465985147 1465985149 1465984872                     0                     0
       113 1103691798   644                  4100  5014  5016      0     0     0     0     0 1465985147 1465985149 1465985125                     0                     0
         0 1094877207  1600                393216 23562  7548      2  1000  1000  1000  1000 1465139904 1465139904 1464605255                393216                     0
         0 1094975512  1600                393216 23562  7548      2  1000  1000  1000  1000 1465139904 1465139904 1464605255                393216                     0

Windows NTP Service & Monitoring

Service

w32time

How to update Windows 8 clock with the internet every time I boot the system?
Window Dienste – die verschiedenen Startmodi Manuell, Automatisch, Verzögerter Start, Start durch Auslöser

w32tm /debug /disable
w32tm /unregister

[Reboot]

w32tm /register

sc qtriggerinfo w32time
[SC] QueryServiceConfig2 ERFOLG
DIENSTNAME: "w32time"
        DIENST STARTEN
          DOMÄNENBEITRITTSSTATUS         : "1ce20aba-9851-4421-9430-1ddeb766e809" [DOMÄNE BEIGETRETEN]

Quotes

These are the possible reasons that routers are not able to sync with the public time servers: High offset and more between the server and the router

So I installed NTP and hoped that it would magically fix up the issue, but it turns out that NTP by itself is absolutely unhelpful not only in cases of big offset, but also in cases of big drift – it will fix your clock when it is slightly inaccurate, but not when it is inaccurate a lot.

NTP: Windows after reboot
Windows Server 2008 R2 SP1 – How to Sync Time from External Time Source?
Configuring Time in Windows 7 and Win 2008 R2
Windows Time Service Tools and Settings
Fixing NTP Refusing to Sync
Ntpd excessively inaccurate
Clock Quality
How To Synchronize Microsoft Windows to a NTP Server

netdom

Windows 7 is Missing NETDOM.EXE
Remote Server Administration Tools for Windows 7 with Service Pack 1 (SP1)
Use PowerShell to Replace netdom Commands to Join the Domain

Meinberg

NTP Time Server Monitor
NTP Download