Tag Archives: COMMUNICATION

DIY LORA MODULE

#115 Making A DIY LoRa Module

2x DIY LoRa RFM95W modules with adapter boards.

When taking a closer look at the DIY aspect of lora I wanted to test LoRa peer to peer.. E.G multiple peers to one peer (NOT LoRa WAN) I noticed that the actual radio PCB is difficult to use when going the traditional through hole way… adapter boards do exist but are few and far between at least in SA. you can make your own for manufacture but then rather create your entire product PCB for manufacture.

Even with this drawback I was able to source old adapters for one of the very firs modules the: RFM95W. In South Africa we are mostly using 868Mhz although 433Mhz modules are around I don’t see them being super common in terms of LoRa modules.

The modules I used have a footprint for adding a female SMA connecter for easy antenna connecting.

Parts used:

  • 2x RFM95W 868Mhz LoRa module transceiver
  • 2x 3.3v active buzzer
  • 2x 1 pole dip switch
  • 2x TP4056 module with protection ICs
  • 2x ATtiny404 MCU
  • 2x NCV8163 3.3V LDO
  • 2x SSD1306 128×32 OLED
  • 2x 2pin 2.5mm JST battery connector
  • 2x Headers and jumpers
  • 2x 13400 3.7V 550mAh
  • 2x 10k resistors
  • 2x 220R resistors
  • 2x SOIC to DIP adapter PCB
  • 2x BC547 transistors
  • Some 0.9mm tin plated copper wire
  • Some 0.255mm PVC insulated wire
Soldering made slightly easier…

After checking the PCB I commenced with testing the devices. Unfortunately the test area has largely mountains terrain
the signal works really well and penetrates better through foliage on the mountains terrain but once there is a full on mountain in the way the signal stops. so in this retrospect the devices are better then a radio which was quite interesting but makes sense because data is being sent and uses less bandwidth then interpreting voice audio. Also the error checking for LoRa helps a lot.

Some more pros for the LoRa is that its a transceiver out of the box with RSSI functions included. Also for increased range and/or quality the spreading factor and signal bandwidth can be adjusted.

Although there’s many pros regarding LoRa I still tend to use simple 433.92 RF modules without issue at least in my situation with rural areas under about 3KM at and given point.

So it really becomes more of a cost factor than anything else. Although I’m happy selling a custom LoRa product for compatibility with LoRa WAN or some other requirement with a similar principal. Plain old generic RF is still cool in my book.

Back of one of the PCBs

UPSILON REMOTE MONITOR

#100 Monitoring A Line UPS Remotely

Modernizing the old UPSilon 2000 application was a daunting task my first thought was to read the serial output but unfortunately the UPS is listed as a HID device and not a simple COM port. So I went down the rabbit hole of trying to communicate with hid devices which have strict security to combat keyloggers. I tried to use kernel32 and the create file read and write file methods but I got access denied. Looking closer I could read some of the inputs of the ups hid device but it was going to take too long to figure out direct communication to the ups without an SDK or a good example app using USB HID to communicate with a UPS.

Computer Management Hid UPS

Some details of my ups hid were:
VID = 0001 PID = 0000 Path = \?\hid#vid_0001&pid_0000#6&7efa158&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} SerialNumber = Manufacturer = MEC Product: MEC0003

Communication over USB

So after wasting 2 days I went back to the drawing board this time instead of using Wireshark to catch the USB packets I decided to take a closer look at the upsilon 2000 application. unfortunately the .dll's don’t show any useful functions in dependency viewer so I can’t call C++ functions from them in C#. So next I switched Wireshark to local monitoring and I found some very useful traffic.

tcp.port == 2570 connect as a client and get data
tcp.port == 8652 read the data from the sms server
udp.port == 11541 udp data

Port 8652 allows me to read alerts sent to the SMS server but instead I re-direct them to my C# application.

GET /smssend_hide.cgi?$sms_recptmobile=0123456789&$sms_content=DESKTOP-294DAYV: This is a test message!&$sms_code=1 HTTP/1.1
User-Agent: RUPS2K SMS
Host: 127.0.0.1
Connection: Keep-Alive

Port 2570 allows me to TCP connect as a client with no auth and now I get all the stat report strings every 1 second.

(238.7 238.7 238.7 007 50.1 27.4 --.- 00001000

The UDP port 11541 always receives upsXXXcnt001 for constant monitoring and I haven’t observed any other use besides this.

ups000cnt001 – connected ups
upsdiscnt001 – not connected

The exe files communicating between themselves are
Monw32.exe 11541 udp listner
RupsMon.exe 2570 tcp listner
UPSilon.exe connects as client

So after finding this info I was able to build a C# app that works in conjunction with UPSilon 2000 but the C# app offers more flexibility such as remote messaging via Telegram or forwarding the stats to a webserver for remote viewing.

The application checks the cd key every time it starts it connects to an IP in Taiwan http://upsilon.icv99.net on port 80 however is you go to port 8080 you get a webpage cd key checking form.
http://59.124.238.71:80
http://upsilon.icv99.net:8080/download_sys/
http://upsilon.icv99.net:8080/download_sys/keycheck.php?cdkey_check=testkey

Reporting serial key and NTFS to home via: http://59.124.238.71

The only thing I couldn’t do was send commands directly to the ups because that communication link is done within the upsilon app itself however I am happy with the overall outcome.

Source code of my application can be found on GitHub

LORA SETUP

#78 Setting up the LoRa T-Beam

Living on a farm I often encounter communication issues coupled with the urgency to communicate when catastrophes strike. Therefore in my quest to find suitable backups and backups to the backups I stumbled upon the LoRa system. Specifically the LoRa boards in the T-Beam configuration using the Meshtastic firmware + Android app which allows text message communication over a few kilometers in my case.

After testing them I came to the conclusion that they do work and reliability, however they can get damaged easily and the quality of boards and components used is not up to the bar of commercial motherboards such as gigabyte PC motherboards as an example.

My final opinion being: they work and I would use them as one of my “coms” layers however I would not put the T-Beam on par with a mobile phone the quality is simply just not there.