Showing posts with label RasPI. Show all posts
Showing posts with label RasPI. Show all posts

11 July 2020

My current LoRA "DX" is 64 km

After few experiments with spread factor and the GP antenna, thanks to TTN Mapper service I can visualize which gateways have received my LoRA signal on 868 MHz.




On the South facing balcony the signal travels 64 km at SF7 BW125 and the RSSI is still respectable. The strongest link at SNR = 8 dB is "just" 48 km long. Both of these long distance paths are in line of sight or very close to it. A total of 5 gateways received my transmissions.

When I moved the transmitter on the North facing balcony I hit 3 new gateways, two of which are available on TTN Mapper. The maximum distance here is about 38 km, but there is absolutely no line of sight path between us.

That makes a total of 7 (8) TTN LoRAWAN gateways that can receive and relay to the cloud my LoRA messages

07 July 2020

Simulating a LoRA node GPS position on TTN

A simple way to see your LoRAWAN node or gateway coverage is to use the TTN Mapper service.

In order to get my node visible on TTN Mapper I had to enable the Mapper Integration within my Application and output notes's position. TTN Mapper documentation says that either the node sends its position in the payload or you can "pair" it with a smartphone app and keep both close to each other (ie the same vehicle, the same bag, ...).

OTOH if the node sends its position it must be decoded into a JSON through some code written in the web console, Decoder section under Payload Formats. So, why not write a static Decoder function that returns the required variables?

You need to produce latitude and longitude. Optionally altitude and hdop. If a node isn't moving, that's quite easy! Recover the coordinates in your preferred way (smartphone GPS app, GPS tracker, a web mapping service, ...) and fill in your code like this:

function Decoder(bytes, port) {

  var decoded = {};


  // your node's actual coordinates
  decoded.latitude = X;  // a value like 10.456 (this is North-South or equator)
  decoded.longitude = Y; // a value like 80.123 (this is East-West of Greenwich)
  // your node's height above ground (or is it m.a.s.l.?)
  decoded.altitude = Z;
  // your position accuracy, 5 is fine
  decoded.hdop = 5;

  return decoded;
}

Once the Decoder function is saved, all further transmissions within your TTN Application will carry those variables (added cloud-side once the data is received through a gateway).

Can you see a cheating danger in here? I do. But fortunately there isn't a LoRA distance competition, yet.

Let's get my signal as far away as possible, as strong as possible!

03 July 2020

RaspberryPI and LoRAWAN with SX1276

I had laying around a SX1276 LoRA module for some months and following an IoT discussion at work I thought it would be the right time to play with it.

Instead of wiring an Arduino board with level converters (or use a 3v3 Arduino Nano, which I have), I opted to use an old, single-core, 512 MB RAM, Raspberry Pi B+: wiring is straightforward and I can debug+control it remotely over SSH.

Not that I have meaningful data to transmit. I am interested in the RF part of the whole thing since 868 MHz lies between 70 and 23 cm HAM bands and everyone writes wonders about the LoRA modulation scheme. Because of that I chose the software that offered the fastest way to get a signal on the air with the support of TTN. I used arduino-lmic-rpi with bcm2835-1.64 driver. The RPi distro is based on Debian 8 with kernel 4.9.35, don't ask me its name.

The TTN part is well documented: you need to create an Application and register your device on their portal. Then get Device EUI, Application EUI and App Key which have to be inserted into the .cpp file. Pay attention that DEUI and AEUI need to be reversed, so LSB first. Compile and run.

If everything is correct and your LoRA node can reach a gateway nearby, your transmissions will begin to appear on the web console. You need a TTN gateway in your area and it must be able to receive your transmission!!

Performance? My signal is being received by 4 gateways and a couple of them seem to be quite far away (but in line of sight).

Nothing new so far, I have only replicated someone else's work.

18 June 2014

Talking AT commands to GSM cell/smartphone (over Bluetooth)

Today's discovery, by chance, was that some cellphones/smartphones expose a "standard old fashioned" serial modem when connected over Bluetooth to a computer. This means that it is possible to interact with the phone using the standard and extended AT command set.

What for? Well, any Bluetooth enabled embedded system (Arduino + HC-05, Raspberry PI + USB-BT dongle, ...) can have access to wireless telephony services such as SMS, dialin/out and potentially GPRS/Internet. All this without the requirement of a special modem device and an extra bulky cable in between. And probably you already have a suitable device laying around.

Not all cell/smartphones support this mode. For example an Android 2.3.3 Samsung Galaxy S i9000 does, while a Windows Mobile 6.1 Samsung SGH-i780 does not. I have two more cellphones with Bluetooth to test.

I think this is a simple(r) way to enable remote control of embedded systems, even though a lot of experimentation is needed.

Edit: Nokia 6233 exposes a modem over Bluetooth. Hooray!

16 October 2012

Raspberry Pi from RS shipped, at last

Last night, while I was about to cancel my #2 RasPi order, RS wrote me:

"If you ordered a Raspberry Pi board as part of your order we are pleased to inform you that we have sent you the upgraded 512MB Revision 2 board to thank you for your continued patience."
 
That's a pleasant surprise, especially if this means I can run GCompris and Childsplay on it without noticeable slow downs.

03 September 2012

RasPi from RS delayed

Not that I am longing for another Raspberry Pi, but I got an email from RS that my order with them will be shipped about 4 weeks later than expected. Weird, since Farnell was weeks early! Maybe there is an unbalance of orders they receive?

This is a good chance to cancel my order with RS, unless someone in a hurry wants to buy it from me (how much I paid it + S&H to your doorstep).

09 August 2012

Raspberry Pi arrived and tested

My RasPi from Farnell arrived 3 days after the shipping notificaton. It came with regular mail from UK.

Setting it up was not so straightforward:
  • pushing the operating system ISO to the SD card was not so easy with MS Windows
  • I had no USB keyboard at home
  • I have no HDMI-capable screen, at home
  • I had no DHCP-enabled network to connect it to
With the help of a colleague I got a working SD card and put my RPi on the net. I ran few apt-get's to update it and install gcompris and childsplay packets. Unfortunately there isn't much choice of software ported to the ARM processor. No problems to get a vncserver running at a decent resolution or 1280x900 over the 100 Mbps network link.

At home I used the composite video out to test how functional it can be, but the result is not encouraging. Both childsplay and gcompris require a minimum screen resolution that is larger than what is available on TVout, while they run OK on the existing home computer + LCD screen.

On the other hand it may work as a digital media center with OpenELEC, but I haven't had the time to test it in the real world. But I can imagine the burden of wires around/behind the TV if an external hard-disk is added, then a USB-to-WiFi adapter, a powered USB hub ... not charming at all!

My RasPi test drive impressions are that it has enough computing power to do interesting things, with an excellent performance/price ratio. I am a bit skeptical about its usefulness in bringing youngsters closer to in-depth computer science and programming. And I doubt I will have much use for it. :-(


24 July 2012

Raspberry PI from Farnell

Yesterday I received an email from Farnell stating that my RPi had been shipped (order #ORP051xxx). Since I ordered it the same day I submitted my order to RS, I was expecting a similar 11 weeks delivery time. But it got on my way about 50 days early. Could the recent increase in production capacity have something to do with it? Or most people ordered their copy from RS, since the communication was a tad better?

There is apparently no way to know which express courier Farnell used, nor to get a tracking number. On the other hand, RPi @ RS was paid right away, while Farnell charged my card on the shipping day.

Still no shipping news from RS, though.

29 June 2012

Raspberry PI: ordered

The "invitation to order" email came one day late and I have just paid for my RasPI. Order #127xxx, despatch expected within 11 weeks (or 77 days, or mid September).


(up here is a countdown widget in Flash, in case you don't see it)