{"id":703,"date":"2023-09-13T21:22:34","date_gmt":"2023-09-13T19:22:34","guid":{"rendered":"https:\/\/yvesoesch.ch\/wordpress\/?page_id=703"},"modified":"2023-09-27T14:36:05","modified_gmt":"2023-09-27T12:36:05","slug":"experience-with-lora-aprs-on-m5stack","status":"publish","type":"page","link":"https:\/\/yvesoesch.ch\/wordpress\/technique\/electronique-rf\/experience-with-lora-aprs-on-m5stack\/","title":{"rendered":"Experience with LoRa APRS on M5Stack"},"content":{"rendered":"\n<p>There are already a few websites describing APRS over Lora. This article is not intended to be a full \u00ab\u00a0HowTo\u00a0\u00bb, just some additional tips and tricks from personal experience.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Hardware<\/h2>\n\n\n\n<p>HB9IAL gave me few month ago some <em>M5stack<\/em> hardware. Among other modules, two <em>Core<\/em> devices, one GPS extension, one humidity and temperature sensor and two 433 MHz LoRa Module, I decided to gave them a try on LoRa APRS.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/APRS_Cube_M5Stack_low-1024x768.jpg\" alt=\"\" class=\"wp-image-686\" srcset=\"https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/APRS_Cube_M5Stack_low-1024x768.jpg 1024w, https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/APRS_Cube_M5Stack_low-300x225.jpg 300w, https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/APRS_Cube_M5Stack_low-768x576.jpg 768w, https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/APRS_Cube_M5Stack_low.jpg 1440w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Software<\/h2>\n\n\n\n<p>DL3DCW has written a nice piece of software called <em>APRSCube<\/em> (see link below)<\/p>\n\n\n\n<p>To install this firmware onto the M5stack using a Linux machine, I used the python module <em>esptools<\/em>. If needed install it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install esptool<\/code><\/pre>\n\n\n\n<p>To flash the firmware into the M5stack connected to an USB port of the PC, the syntax is the following: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>esptool.py --port \/dev\/ttyACM0 write_flash 0x10000 APRScube.bin<\/code><\/pre>\n\n\n\n<p>The port <em>\/dev\/tty*<\/em> might need adjustment to fit your machine. The memory offset 0x10000  was found in a document from ON5VL.<\/p>\n\n\n\n<p>Then edit the <em>APRScube.ini<\/em> file to set at least:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>WLAN SSID and password (if WLAN is wanted)<\/li>\n\n\n\n<li>Callsign<\/li>\n\n\n\n<li>Default Position (if GPS is not used)<\/li>\n\n\n\n<li>aprs2.net Server password (if upload on APRS-IS is wanted. Try <em>callpass<\/em> on linux terminal or online calculators)<\/li>\n\n\n\n<li>Some other parameters (refer to APRScube documentation)<\/li>\n<\/ul>\n\n\n\n<p>Copy <em>APRScube.ini<\/em>  to a Micro SD card of 16 GB max and insert it in the M5stack Core before power-up.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">LoRa transmission parameters<\/h2>\n\n\n\n<p>The following parameters are applied (common use within the european amateur radio community in 2023)<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Parameter<\/th><th>Value<\/th><th>Unit<\/th><th>Remark<\/th><\/tr><\/thead><tbody><tr><td>TX and RX frequency<\/td><td>433.775<\/td><td>MHz<\/td><td><a href=\"https:\/\/vienna.iaru-r1.org\/wp-content\/uploads\/2019\/01\/VIE19-C5-015-OEVSV-LORA-APRS-433-MHz.pdf\">IARU recommendation<\/a><\/td><\/tr><tr><td>Power<\/td><td>20<\/td><td>dBm<\/td><td>Max value for M5stack without external PA. See below for TX power measurement<\/td><\/tr><tr><td>Spreading Factor<\/td><td>12<\/td><td><\/td><td>For best sensitivity<\/td><\/tr><tr><td>Signal Bandwidth<\/td><td>125<\/td><td>kHz<\/td><td><a href=\"https:\/\/vienna.iaru-r1.org\/wp-content\/uploads\/2019\/01\/VIE19-C5-015-OEVSV-LORA-APRS-433-MHz.pdf\">IARU recommendation<\/a><\/td><\/tr><tr><td>Coding rate<\/td><td>4:5<\/td><td><\/td><td>To limit transmission time, CR ratio is kept high (lower redundancy)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Remarks and comments<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Unfortunately the TX and RX frequencies cannot be freely configured in the APRSCube configuration file. In Switzerland at the moment only 433.775 MHz is in use (simplex). Therefore the only usable mode is <em>PEER<\/em>. (<em>NODE<\/em> or <em>GATE<\/em> work in semi-duplex and make use of the other LoRa APRS frequency defined by IARU: 433.900 MHz for TX or RX)<\/li>\n\n\n\n<li>Same for other parameters such as spreading factor, bandwidth and coding rate. Fortunately the parameters usedin in the firmware match common usage for LoRa APRS in Europe.<\/li>\n\n\n\n<li>The sensitivity of the GPS module is very poor using the internal antenna. It looses the position when the LoRa module sends a frame&#8230; It is really recommended to use an external antenna connected through the MCX connector (don&rsquo;t forget to swap the uFL connector inside the module!)<\/li>\n\n\n\n<li>Only the internal M5stack GPS module works with APRScube firmware. The external GPS module (connected through the 4-wires flat ribbon cable) is not recognized.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Experience<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">TX power<\/h3>\n\n\n\n<p>The 433 MHz LoRa Module for M5Stack has been measured at +17.4 dBm. (50 mW), pigtail cable MCX-N not taken into accound during the measurement.  No additional power amplifier used.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/APRSCube_TX_Power_low-1024x768.jpg\" alt=\"\" class=\"wp-image-693\" srcset=\"https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/APRSCube_TX_Power_low-1024x768.jpg 1024w, https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/APRSCube_TX_Power_low-300x225.jpg 300w, https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/APRSCube_TX_Power_low-768x576.jpg 768w, https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/APRSCube_TX_Power_low.jpg 1440w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">TX Range<\/h2>\n\n\n\n<p>Using the (very small) internal antenna of the LoRa Module, some frames were received 27 km away by HB9RD-10 (unknown antenna\/hardware conditions). The TX antenna is a meander of about 33x5mm glued insude the M5stack plastic frame. Its gain is probably well below 0 dBi. Not so bad for 50mW! The LoRa sensitivity on RX side compensate the low TX conditions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"830\" height=\"769\" src=\"https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/AprsFi_Screenshot-from-2023-08-26-19-56-30.png\" alt=\"\" class=\"wp-image-695\" srcset=\"https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/AprsFi_Screenshot-from-2023-08-26-19-56-30.png 830w, https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/AprsFi_Screenshot-from-2023-08-26-19-56-30-300x278.png 300w, https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/AprsFi_Screenshot-from-2023-08-26-19-56-30-768x712.png 768w\" sizes=\"auto, (max-width: 830px) 100vw, 830px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">RX range<\/h2>\n\n\n\n<p>Unfortunately 433.775 MHz is in the ISM part of the amateur 70cm band. At my location the frequency is heavily used by a neighbour&rsquo;s TV headphone and other telemetry\/data systems. Even after several days with the module connected to an external X50 antenna, no frame from another station was ever received. Configuration error or only interferences?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">TestDrive<\/h2>\n\n\n\n<p>A 55 cm long antenna mounted on a magnetic support was installed on the car. The exact antenna type is unknown but it it claimed to cover the 400 &#8211; 435 MHz range. An M5stack setup was used as transmitter.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/433_MHz_Antenna-1024x768.jpg\" alt=\"\" class=\"wp-image-722\" srcset=\"https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/433_MHz_Antenna-1024x768.jpg 1024w, https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/433_MHz_Antenna-300x225.jpg 300w, https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/433_MHz_Antenna-768x576.jpg 768w, https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/433_MHz_Antenna-1536x1152.jpg 1536w, https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/433_MHz_Antenna-2048x1536.jpg 2048w, https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/433_MHz_Antenna-1568x1176.jpg 1568w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Profiting from a Week-end on the Mont-Tendre (a local mountain 1679 m ASL) on 16-17 September 2023, the M5Stack transmitter was switched on during the drive. The device transmits the position on regular basis on 433.775 MHz. Some gateways relay the received packets on the APRS-IS feed. The result is visible on www.aprs.fi.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"577\" height=\"610\" src=\"https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/HB9DTX_10_LoRaAPRS_16_17_sept_2023.png\" alt=\"\" class=\"wp-image-723\" srcset=\"https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/HB9DTX_10_LoRaAPRS_16_17_sept_2023.png 577w, https:\/\/yvesoesch.ch\/wordpress\/wp-content\/uploads\/2023\/09\/HB9DTX_10_LoRaAPRS_16_17_sept_2023-284x300.png 284w\" sizes=\"auto, (max-width: 577px) 100vw, 577px\" \/><\/figure>\n\n\n\n<p>During this test 3 different gateways received packets: HB9RD-10, HB9EVJ-10 and HB9DTX-10. Every red dot on the map corresponds to a location. It is interesting to see how far the low power (50mW) Lora signal can travel!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Links<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/on5vl.org\/lora-aprs-le-guide-pratique\/\">https:\/\/on5vl.org\/lora-aprs-le-guide-pratique\/<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/on5vl.org\/comment-faire-votre-aprscube\/\">https:\/\/on5vl.org\/comment-faire-votre-aprscube\/<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/aprscube.de\/firmware\" data-type=\"link\" data-id=\"http:\/\/aprscube.de\/firmware\">http:\/\/aprscube.de\/firmware<\/a> ==&gt; <a href=\"https:\/\/forum.aprs-dl.de\/showthread.php?tid=31\/firmware\">https:\/\/forum.aprs-dl.de\/showthread.php?tid=31\/firmware<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/vienna.iaru-r1.org\/wp-content\/uploads\/2019\/01\/VIE19-C5-015-OEVSV-LORA-APRS-433-MHz.pdf\" data-type=\"link\" data-id=\"https:\/\/vienna.iaru-r1.org\/wp-content\/uploads\/2019\/01\/VIE19-C5-015-OEVSV-LORA-APRS-433-MHz.pdf\">https:\/\/vienna.iaru-r1.org\/wp-content\/uploads\/2019\/01\/VIE19-C5-015-OEVSV-LORA-APRS-433-MHz.pdf<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/m5stack.com\/\" data-type=\"link\" data-id=\"https:\/\/m5stack.com\/\">https:\/\/m5stack.com\/<\/a><\/li>\n\n\n\n<li>https:\/\/aprs.fi\/<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Collection of tips and tricks from personal experience with LoRa APRS on M5stack<\/p>\n","protected":false},"author":3,"featured_media":686,"parent":163,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-703","page","type-page","status-publish","has-post-thumbnail","hentry","entry"],"_links":{"self":[{"href":"https:\/\/yvesoesch.ch\/wordpress\/wp-json\/wp\/v2\/pages\/703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yvesoesch.ch\/wordpress\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/yvesoesch.ch\/wordpress\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/yvesoesch.ch\/wordpress\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/yvesoesch.ch\/wordpress\/wp-json\/wp\/v2\/comments?post=703"}],"version-history":[{"count":8,"href":"https:\/\/yvesoesch.ch\/wordpress\/wp-json\/wp\/v2\/pages\/703\/revisions"}],"predecessor-version":[{"id":728,"href":"https:\/\/yvesoesch.ch\/wordpress\/wp-json\/wp\/v2\/pages\/703\/revisions\/728"}],"up":[{"embeddable":true,"href":"https:\/\/yvesoesch.ch\/wordpress\/wp-json\/wp\/v2\/pages\/163"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/yvesoesch.ch\/wordpress\/wp-json\/wp\/v2\/media\/686"}],"wp:attachment":[{"href":"https:\/\/yvesoesch.ch\/wordpress\/wp-json\/wp\/v2\/media?parent=703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}