X-Git-Url: http://pere.pagekite.me/gitweb/homepage.git/blobdiff_plain/fe355b44be0993da52a8c9858be208dae3fd3bd2..541506f8b882c39e352573e909b0bff09b735191:/blog/index.rss diff --git a/blog/index.rss b/blog/index.rss index a642378182..2b3c45abc9 100644 --- a/blog/index.rss +++ b/blog/index.rss @@ -6,6 +6,211 @@ http://people.skolelinux.org/pere/blog/ + + Generating 3D prints in Debian using Cura and Slic3r(-prusa) + http://people.skolelinux.org/pere/blog/Generating_3D_prints_in_Debian_using_Cura_and_Slic3r__prusa_.html + http://people.skolelinux.org/pere/blog/Generating_3D_prints_in_Debian_using_Cura_and_Slic3r__prusa_.html + Mon, 9 Oct 2017 10:50:00 +0200 + <p>At my nearby maker space, +<a href="http://sonen.ifi.uio.no/">Sonen</a>, I heard the story that it +was easier to generate gcode files for theyr 3D printers (Ultimake 2+) +on Windows and MacOS X than Linux, because the software involved had +to be manually compiled and set up on Linux while premade packages +worked out of the box on Windows and MacOS X. I found this annoying, +as the software involved, +<a href="https://github.com/Ultimaker/Cura">Cura</a>, is free software +and should be trivial to get up and running on Linux if someone took +the time to package it for the relevant distributions. I even found +<a href="https://bugs.debian.org/706656">a request for adding into +Debian</a> from 2013, which had seem some activity over the years but +never resulted in the software showing up in Debian. So a few days +ago I offered my help to try to improve the situation.</p> + +<p>Now I am very happy to see that all the packages required by a +working Cura in Debian are uploaded into Debian and waiting in the NEW +queue for the ftpmasters to have a look. You can track the progress +on +<a href="https://qa.debian.org/developer.php?email=3dprinter-general%40lists.alioth.debian.org">the +status page for the 3D printer team</a>.</p> + +<p>The uploaded packages are a bit behind upstream, and was uploaded +now to get slots in <a href="https://ftp-master.debian.org/new.html">the NEW +queue</a> while we work up updating the packages to the latest +upstream version.</p> + +<p>On a related note, two competitors for Cura, which I found harder +to use and was unable to configure correctly for Ultimaker 2+ in the +short time I spent on it, are already in Debian. If you are looking +for 3D printer "slicers" and want something already available in +Debian, check out +<a href="https://tracker.debian.org/pkg/slic3r">slic3r</a> and +<a href="https://tracker.debian.org/pkg/slic3r-prusa">slic3r-prusa</a>. +The latter is a fork of the former.</p> + + + + + Mangler du en skrue, eller har du en skrue løs? + http://people.skolelinux.org/pere/blog/Mangler_du_en_skrue__eller_har_du_en_skrue_l_s_.html + http://people.skolelinux.org/pere/blog/Mangler_du_en_skrue__eller_har_du_en_skrue_l_s_.html + Wed, 4 Oct 2017 09:40:00 +0200 + Når jeg holder på med ulike prosjekter, så trenger jeg stadig ulike +skruer. Det siste prosjektet jeg holder på med er å lage +<a href="https://www.thingiverse.com/thing:676916">en boks til en +HDMI-touch-skjerm</a> som skal brukes med Raspberry Pi. Boksen settes +sammen med skruer og bolter, og jeg har vært i tvil om hvor jeg kan +få tak i de riktige skruene. Clas Ohlson og Jernia i nærheten har +sjelden hatt det jeg trenger. Men her om dagen fikk jeg et fantastisk +tips for oss som bor i Oslo. +<a href="http://www.zachskruer.no/">Zachariassen Jernvare AS</a> i +<a href="http://www.openstreetmap.org/?mlat=59.93421&mlon=10.76795#map=19/59.93421/10.76795">Hegermannsgate +23A på Torshov</a> har et fantastisk utvalg, og åpent mellom 09:00 og +17:00. De selger skruer, muttere, bolter, skiver etc i løs vekt, og +så langt har jeg fått alt jeg har lett etter. De har i tillegg det +meste av annen jernvare, som verktøy, lamper, ledninger, etc. Jeg +håper de har nok kunder til å holde det gående lenge, da dette er en +butikk jeg kommer til å besøke ofte. Butikken er et funn å ha i +nabolaget for oss som liker å bygge litt selv. :)</p> + + + + + Visualizing GSM radio chatter using gr-gsm and Hopglass + http://people.skolelinux.org/pere/blog/Visualizing_GSM_radio_chatter_using_gr_gsm_and_Hopglass.html + http://people.skolelinux.org/pere/blog/Visualizing_GSM_radio_chatter_using_gr_gsm_and_Hopglass.html + Fri, 29 Sep 2017 10:30:00 +0200 + <p>Every mobile phone announce its existence over radio to the nearby +mobile cell towers. And this radio chatter is available for anyone +with a radio receiver capable of receiving them. Details about the +mobile phones with very good accuracy is of course collected by the +phone companies, but this is not the topic of this blog post. The +mobile phone radio chatter make it possible to figure out when a cell +phone is nearby, as it include the SIM card ID (IMSI). By paying +attention over time, one can see when a phone arrive and when it leave +an area. I believe it would be nice to make this information more +available to the general public, to make more people aware of how +their phones are announcing their whereabouts to anyone that care to +listen.</p> + +<p>I am very happy to report that we managed to get something +visualizing this information up and running for +<a href="http://norwaymakers.org/osf17">Oslo Skaperfestival 2017</a> +(Oslo Makers Festival) taking place today and tomorrow at Deichmanske +library. The solution is based on the +<a href="http://people.skolelinux.org/pere/blog/Easier_recipe_to_observe_the_cell_phones_around_you.html">simple +recipe for listening to GSM chatter</a> I posted a few days ago, and +will show up at the stand of <a href="http://sonen.ifi.uio.no/">Åpen +Sone from the Computer Science department of the University of +Oslo</a>. The presentation will show the nearby mobile phones (aka +IMSIs) as dots in a web browser graph, with lines to the dot +representing mobile base station it is talking to. It was working in +the lab yesterday, and was moved into place this morning.</p> + +<p>We set up a fairly powerful desktop machine using Debian +Buster/Testing with several (five, I believe) RTL2838 DVB-T receivers +connected and visualize the visible cell phone towers using an +<a href="https://github.com/marlow925/hopglass">English version of +Hopglass</a>. A fairly powerfull machine is needed as the +grgsm_livemon_headless processes from +<a href="https://tracker.debian.org/pkg/gr-gsm">gr-gsm</a> converting +the radio signal to data packages is quite CPU intensive.</p> + +<p>The frequencies to listen to, are identified using a slightly +patched scan-and-livemon (to set the --args values for each receiver), +and the Hopglass data is generated using the +<a href="https://github.com/petterreinholdtsen/IMSI-catcher/tree/meshviewer-output">patches +in my meshviewer-output branch</a>. For some reason we could not get +more than four SDRs working. There is also a geographical map trying +to show the location of the base stations, but I believe their +coordinates are hardcoded to some random location in Germany, I +believe. The code should be replaced with code to look up location in +a text file, a sqlite database or one of the online databases +mentioned in +<a href="https://github.com/Oros42/IMSI-catcher/issues/14">the github +issue for the topic</a>. + +<p>If this sound interesting, visit the stand at the festival!</p> + + + + + Easier recipe to observe the cell phones around you + http://people.skolelinux.org/pere/blog/Easier_recipe_to_observe_the_cell_phones_around_you.html + http://people.skolelinux.org/pere/blog/Easier_recipe_to_observe_the_cell_phones_around_you.html + Sun, 24 Sep 2017 08:30:00 +0200 + <p>A little more than a month ago I wrote +<a href="http://people.skolelinux.org/pere/blog/Simpler_recipe_on_how_to_make_a_simple__7_IMSI_Catcher_using_Debian.html">how +to observe the SIM card ID (aka IMSI number) of mobile phones talking +to nearby mobile phone base stations using Debian GNU/Linux and a +cheap USB software defined radio</a>, and thus being able to pinpoint +the location of people and equipment (like cars and trains) with an +accuracy of a few kilometer. Since then we have worked to make the +procedure even simpler, and it is now possible to do this without any +manual frequency tuning and without building your own packages.</p> + +<p>The <a href="https://tracker.debian.org/pkg/gr-gsm">gr-gsm</a> +package is now included in Debian testing and unstable, and the +IMSI-catcher code no longer require root access to fetch and decode +the GSM data collected using gr-gsm.</p> + +<p>Here is an updated recipe, using packages built by Debian and a git +clone of two python scripts:</p> + +<ol> + +<li>Start with a Debian machine running the Buster version (aka + testing).</li> + +<li>Run '<tt>apt install gr-gsm python-numpy python-scipy + python-scapy</tt>' as root to install required packages.</li> + +<li>Fetch the code decoding GSM packages using '<tt>git clone + github.com/Oros42/IMSI-catcher.git</tt>'.</li> + +<li>Insert USB software defined radio supported by GNU Radio.</li> + +<li>Enter the IMSI-catcher directory and run '<tt>python + scan-and-livemon</tt>' to locate the frequency of nearby base + stations and start listening for GSM packages on one of them.</li> + +<li>Enter the IMSI-catcher directory and run '<tt>python + simple_IMSI-catcher.py</tt>' to display the collected information.</li> + +</ol> + +<p>Note, due to a bug somewhere the scan-and-livemon program (actually +<a href="https://github.com/ptrkrysik/gr-gsm/issues/336">its underlying +program grgsm_scanner</a>) do not work with the HackRF radio. It does +work with RTL 8232 and other similar USB radio receivers you can get +very cheaply +(<a href="https://www.ebay.com/sch/items/?_nkw=rtl+2832">for example +from ebay</a>), so for now the solution is to scan using the RTL radio +and only use HackRF for fetching GSM data.</p> + +<p>As far as I can tell, a cell phone only show up on one of the +frequencies at the time, so if you are going to track and count every +cell phone around you, you need to listen to all the frequencies used. +To listen to several frequencies, use the --numrecv argument to +scan-and-livemon to use several receivers. Further, I am not sure if +phones using 3G or 4G will show as talking GSM to base stations, so +this approach might not see all phones around you. I typically see +0-400 IMSI numbers an hour when looking around where I live.</p> + +<p>I've tried to run the scanner on a +<a href="https://wiki.debian.org/RaspberryPi">Raspberry Pi 2 and 3 +running Debian Buster</a>, but the grgsm_livemon_headless process seem +to be too CPU intensive to keep up. When GNU Radio print 'O' to +stdout, I am told there it is caused by a buffer overflow between the +radio and GNU Radio, caused by the program being unable to read the +GSM data fast enough. If you see a stream of 'O's from the terminal +where you started scan-and-livemon, you need a give the process more +CPU power. Perhaps someone are able to optimize the code to a point +where it become possible to set up RPi3 based GSM sniffers? I tried +using Raspbian instead of Debian, but there seem to be something wrong +with GNU Radio on raspbian, causing glibc to abort().</p> + + + Datalagringsdirektivet kaster skygger over Høyre og Arbeiderpartiet http://people.skolelinux.org/pere/blog/Datalagringsdirektivet_kaster_skygger_over_H_yre_og_Arbeiderpartiet.html @@ -338,264 +543,5 @@ mailing list).</p> - - Idea for storing trusted timestamps in a Noark 5 archive - http://people.skolelinux.org/pere/blog/Idea_for_storing_trusted_timestamps_in_a_Noark_5_archive.html - http://people.skolelinux.org/pere/blog/Idea_for_storing_trusted_timestamps_in_a_Noark_5_archive.html - Wed, 7 Jun 2017 21:40:00 +0200 - <p><em>This is a copy of -<a href="https://lists.nuug.no/pipermail/nikita-noark/2017-June/000297.html">an -email I posted to the nikita-noark mailing list</a>. Please follow up -there if you would like to discuss this topic. The background is that -we are making a free software archive system based on the Norwegian -<a href="https://www.arkivverket.no/forvaltning-og-utvikling/regelverk-og-standarder/noark-standarden">Noark -5 standard</a> for government archives.</em></p> - -<p>I've been wondering a bit lately how trusted timestamps could be -stored in Noark 5. -<a href="https://en.wikipedia.org/wiki/Trusted_timestamping">Trusted -timestamps</a> can be used to verify that some information -(document/file/checksum/metadata) have not been changed since a -specific time in the past. This is useful to verify the integrity of -the documents in the archive.</p> - -<p>Then it occured to me, perhaps the trusted timestamps could be -stored as dokument variants (ie dokumentobjekt referered to from -dokumentbeskrivelse) with the filename set to the hash it is -stamping?</p> - -<p>Given a "dokumentbeskrivelse" with an associated "dokumentobjekt", -a new dokumentobjekt is associated with "dokumentbeskrivelse" with the -same attributes as the stamped dokumentobjekt except these -attributes:</p> - -<ul> - -<li>format -> "RFC3161" -<li>mimeType -> "application/timestamp-reply" -<li>formatDetaljer -> "&lt;source URL for timestamp service&gt;" -<li>filenavn -> "&lt;sjekksum&gt;.tsr" - -</ul> - -<p>This assume a service following -<a href="https://tools.ietf.org/html/rfc3161">IETF RFC 3161</a> is -used, which specifiy the given MIME type for replies and the .tsr file -ending for the content of such trusted timestamp. As far as I can -tell from the Noark 5 specifications, it is OK to have several -variants/renderings of a dokument attached to a given -dokumentbeskrivelse objekt. It might be stretching it a bit to make -some of these variants represent crypto-signatures useful for -verifying the document integrity instead of representing the dokument -itself.</p> - -<p>Using the source of the service in formatDetaljer allow several -timestamping services to be used. This is useful to spread the risk -of key compromise over several organisations. It would only be a -problem to trust the timestamps if all of the organisations are -compromised.</p> - -<p>The following oneliner on Linux can be used to generate the tsr -file. $input is the path to the file to checksum, and $sha256 is the -SHA-256 checksum of the file (ie the "<sjekksum>.tsr" value mentioned -above).</p> - -<p><blockquote><pre> -openssl ts -query -data "$inputfile" -cert -sha256 -no_nonce \ - | curl -s -H "Content-Type: application/timestamp-query" \ - --data-binary "@-" http://zeitstempel.dfn.de > $sha256.tsr -</pre></blockquote></p> - -<p>To verify the timestamp, you first need to download the public key -of the trusted timestamp service, for example using this command:</p> - -<p><blockquote><pre> -wget -O ca-cert.txt \ - https://pki.pca.dfn.de/global-services-ca/pub/cacert/chain.txt -</pre></blockquote></p> - -<p>Note, the public key should be stored alongside the timestamps in -the archive to make sure it is also available 100 years from now. It -is probably a good idea to standardise how and were to store such -public keys, to make it easier to find for those trying to verify -documents 100 or 1000 years from now. :)</p> - -<p>The verification itself is a simple openssl command:</p> - -<p><blockquote><pre> -openssl ts -verify -data $inputfile -in $sha256.tsr \ - -CAfile ca-cert.txt -text -</pre></blockquote></p> - -<p>Is there any reason this approach would not work? Is it somehow against -the Noark 5 specification?</p> - - - - - Når nynorskoversettelsen svikter til eksamen... - http://people.skolelinux.org/pere/blog/N_r_nynorskoversettelsen_svikter_til_eksamen___.html - http://people.skolelinux.org/pere/blog/N_r_nynorskoversettelsen_svikter_til_eksamen___.html - Sat, 3 Jun 2017 08:20:00 +0200 - <p><a href="http://www.aftenposten.no/norge/Krever-at-elever-ma-fa-annullert-eksamen-etter-rot-med-oppgavetekster-622459b.html">Aftenposten -melder i dag</a> om feil i eksamensoppgavene for eksamen i politikk og -menneskerettigheter, der teksten i bokmåls og nynorskutgaven ikke var -like. Oppgaveteksten er gjengitt i artikkelen, og jeg ble nysgjerring -på om den fri oversetterløsningen -<a href="https://www.apertium.org/">Apertium</a> ville gjort en bedre -jobb enn Utdanningsdirektoratet. Det kan se slik ut.</p> - -<p>Her er bokmålsoppgaven fra eksamenen:</p> - -<blockquote> -<p>Drøft utfordringene knyttet til nasjonalstatenes og andre aktørers -rolle og muligheter til å håndtere internasjonale utfordringer, som -for eksempel flykningekrisen.</p> - -<p>Vedlegge er eksempler på tekster som kan gi relevante perspektiver -på temaet:</p> -<ol> -<li>Flykningeregnskapet 2016, UNHCR og IDMC -<li>«Grenseløst Europa for fall» A-Magasinet, 26. november 2015 -</ol> - -</blockquote> - -<p>Dette oversetter Apertium slik:</p> - -<blockquote> -<p>Drøft utfordringane knytte til nasjonalstatane sine og rolla til -andre aktørar og høve til å handtera internasjonale utfordringar, som -til dømes *flykningekrisen.</p> - -<p>Vedleggja er døme på tekster som kan gje relevante perspektiv på -temaet:</p> - -<ol> -<li>*Flykningeregnskapet 2016, *UNHCR og *IDMC</li> -<li>«*Grenseløst Europa for fall» A-Magasinet, 26. november 2015</li> -</ol> - -</blockquote> - -<p>Ord som ikke ble forstått er markert med stjerne (*), og trenger -ekstra språksjekk. Men ingen ord er forsvunnet, slik det var i -oppgaven elevene fikk presentert på eksamen. Jeg mistenker dog at -"andre aktørers rolle og muligheter til ..." burde vært oversatt til -"rolla til andre aktørar og deira høve til ..." eller noe slikt, men -det er kanskje flisespikking. Det understreker vel bare at det alltid -trengs korrekturlesning etter automatisk oversettelse.</p> - - - - - Epost inn som arkivformat i Riksarkivarens forskrift? - http://people.skolelinux.org/pere/blog/Epost_inn_som_arkivformat_i_Riksarkivarens_forskrift_.html - http://people.skolelinux.org/pere/blog/Epost_inn_som_arkivformat_i_Riksarkivarens_forskrift_.html - Thu, 27 Apr 2017 11:30:00 +0200 - <p>I disse dager, med frist 1. mai, har Riksarkivaren ute en høring på -sin forskrift. Som en kan se er det ikke mye tid igjen før fristen -som går ut på søndag. Denne forskriften er det som lister opp hvilke -formater det er greit å arkivere i -<a href="http://www.arkivverket.no/arkivverket/Offentleg-forvalting/Noark/Noark-5">Noark -5-løsninger</a> i Norge.</p> - -<p>Jeg fant høringsdokumentene hos -<a href="https://www.arkivrad.no/aktuelt/riksarkivarens-forskrift-pa-horing">Norsk -Arkivråd</a> etter å ha blitt tipset på epostlisten til -<a href="https://github.com/hiOA-ABI/nikita-noark5-core">fri -programvareprosjektet Nikita Noark5-Core</a>, som lager et Noark 5 -Tjenestegresesnitt. Jeg er involvert i Nikita-prosjektet og takket -være min interesse for tjenestegrensesnittsprosjektet har jeg lest en -god del Noark 5-relaterte dokumenter, og til min overraskelse oppdaget -at standard epost ikke er på listen over godkjente formater som kan -arkiveres. Høringen med frist søndag er en glimrende mulighet til å -forsøke å gjøre noe med det. Jeg holder på med -<a href="https://github.com/petterreinholdtsen/noark5-tester/blob/master/docs/hoering-arkivforskrift.tex">egen -høringsuttalelse</a>, og lurer på om andre er interessert i å støtte -forslaget om å tillate arkivering av epost som epost i arkivet.</p> - -<p>Er du igang med å skrive egen høringsuttalelse allerede? I så fall -kan du jo vurdere å ta med en formulering om epost-lagring. Jeg tror -ikke det trengs så mye. Her et kort forslag til tekst:</p> - -<p><blockquote> - - <p>Viser til høring sendt ut 2017-02-17 (Riksarkivarens referanse - 2016/9840 HELHJO), og tillater oss å sende inn noen innspill om - revisjon av Forskrift om utfyllende tekniske og arkivfaglige - bestemmelser om behandling av offentlige arkiver (Riksarkivarens - forskrift).</p> - - <p>Svært mye av vår kommuikasjon foregår i dag på e-post.  Vi - foreslår derfor at Internett-e-post, slik det er beskrevet i IETF - RFC 5322, - <a href="https://tools.ietf.org/html/rfc5322">https://tools.ietf.org/html/rfc5322</a>. bør - inn som godkjent dokumentformat.  Vi foreslår at forskriftens - oversikt over godkjente dokumentformater ved innlevering i § 5-16 - endres til å ta med Internett-e-post.</p> - -</blockquote></p> - -<p>Som del av arbeidet med tjenestegrensesnitt har vi testet hvordan -epost kan lagres i en Noark 5-struktur, og holder på å skrive et -forslag om hvordan dette kan gjøres som vil bli sendt over til -arkivverket så snart det er ferdig. De som er interesserte kan -<a href="https://github.com/petterreinholdtsen/noark5-tester/blob/master/docs/epostlagring.md">følge -fremdriften på web</a>.</p> - -<p>Oppdatering 2017-04-28: I dag ble høringuttalelsen jeg skrev - <a href="https://www.nuug.no/news/NUUGs_h_ringuttalelse_til_Riksarkivarens_forskrift.shtml">sendt - inn av foreningen NUUG</a>.</p> - - - - - Offentlig elektronisk postjournal blokkerer tilgang for utvalgte webklienter - http://people.skolelinux.org/pere/blog/Offentlig_elektronisk_postjournal_blokkerer_tilgang_for_utvalgte_webklienter.html - http://people.skolelinux.org/pere/blog/Offentlig_elektronisk_postjournal_blokkerer_tilgang_for_utvalgte_webklienter.html - Thu, 20 Apr 2017 13:00:00 +0200 - <p>Jeg oppdaget i dag at <a href="https://www.oep.no/">nettstedet som -publiserer offentlige postjournaler fra statlige etater</a>, OEP, har -begynt å blokkerer enkelte typer webklienter fra å få tilgang. Vet -ikke hvor mange det gjelder, men det gjelder i hvert fall libwww-perl -og curl. For å teste selv, kjør følgende:</p> - -<blockquote><pre> -% curl -v -s https://www.oep.no/pub/report.xhtml?reportId=3 2>&1 |grep '< HTTP' -< HTTP/1.1 404 Not Found -% curl -v -s --header 'User-Agent:Opera/12.0' https://www.oep.no/pub/report.xhtml?reportId=3 2>&1 |grep '< HTTP' -< HTTP/1.1 200 OK -% -</pre></blockquote> - -<p>Her kan en se at tjenesten gir «404 Not Found» for curl i -standardoppsettet, mens den gir «200 OK» hvis curl hevder å være Opera -versjon 12.0. Offentlig elektronisk postjournal startet blokkeringen -2017-03-02.</p> - -<p>Blokkeringen vil gjøre det litt vanskeligere å maskinelt hente -informasjon fra oep.no. Kan blokkeringen være gjort for å hindre -automatisert innsamling av informasjon fra OEP, slik Pressens -Offentlighetsutvalg gjorde for å dokumentere hvordan departementene -hindrer innsyn i -<a href="http://presse.no/dette-mener-np/undergraver-offentlighetsloven/">rapporten -«Slik hindrer departementer innsyn» som ble publiserte i januar -2017</a>. Det virker usannsynlig, da det jo er trivielt å bytte -User-Agent til noe nytt.</p> - -<p>Finnes det juridisk grunnlag for det offentlige å diskriminere -webklienter slik det gjøres her? Der tilgang gis eller ikke alt etter -hva klienten sier at den heter? Da OEP eies av DIFI og driftes av -Basefarm, finnes det kanskje noen dokumenter sendt mellom disse to -aktørene man kan be om innsyn i for å forstå hva som har skjedd. Men -<a href="https://www.oep.no/search/result.html?period=dateRange&fromDate=01.01.2016&toDate=01.04.2017&dateType=documentDate&caseDescription=&descType=both&caseNumber=&documentNumber=&sender=basefarm&senderType=both&documentType=all&legalAuthority=&archiveCode=&list2=196&searchType=advanced&Search=Search+in+records">postjournalen -til DIFI viser kun to dokumenter</a> det siste året mellom DIFI og -Basefarm. -<a href="https://www.mimesbronn.no/request/blokkering_av_tilgang_til_oep_fo">Mimes brønn neste</a>, -tenker jeg.</p> - - -