Not getting complete data in minicom.

Started by SaffellBot, June 10, 2016, 06:06:46 PM

SaffellBot

I just finished setting up the might hat and pi3. I went through the steps on the guild to disable bluetooth. The only changes on the pi from the default jessi image are changing the host name, time zone, and boot to console. From minimcom I am getting only part of the data. In some transmissions the beginning of the serial line is missing, sometimes characters in the middle of a string are missing. Many strings show up as a blank line. Eventually no more useful data is passed, only blanks and the occasional ].

The mighy hat only gets 2/3 of the data lines sent to it. All the data comes across just fine when connected to a moteino using the standard gateway sketch (only modification is the encryptkey). The only changes to the mightyhat code were to disable debug information, and to change the security key. The LCD screen reads out properly, but is missing the humidity string just as the mightyhat serial is.

Is there a setting somewhere I might have missed that's causing this, or some other solution? Also, looking at this I am surprised that the moteino has a much stronger signal strength is so much lower for the mightyhat given that's in HW and the moteino is not. Plus the mighthat has a "real" antenna while the moteino has a simple wire antenna.

Example from Pi3:

EPLOT|data|Temperature|T|77.39}   [RSSI:-91]








                                            ature|T [RSSI:89]


Example from mightyhat:

[1] {TIMEPLOT|data|Lux|T| 1.90}   [RSSI:-101]
[1] {TIMEPLOT|data|Temperature|T|77.40}   [RSSI:-102]
[1] {TIMEPLOT|data|Lux|T| 1.88}   [RSSI:-98]
[1] {TIMEPLOT|data|Temperature|T|77.40}   [RSSI:-93]
[1] {TIMEPLOT|data|Lux|T| 1.86}   [RSSI:-90]
[1] {TIMEPLOT|data|Temperature|T|77.40}   [RSSI:-89]
[1] {TIMEPLOT|data|Lux|T| 1.84}   [RSSI:-87]
[1] {TIMEPLOT|data|Temperature|T|77.40}   [RSSI:-86]
[1] {TIMEPLOT|data|Lux|T| 1.83}   [RSSI:-85]
[1] {TIMEPLOT|data|Temperature|T|77.40}   [RSSI:-84]
[1] {TIMEPLOT|data|Lux|T| 1.80}   [RSSI:-81]


Example from Moteino:

Listening at 915 Mhz...
SPI Flash Init OK. Unique MAC = [D7:65:64:43:1B:60:58:37:]
RFM69_ATC Enabled (Auto Transmission Control)
#[1][1] {TIMEPLOT|data|Temperature|T|77.40}   [RX_RSSI:-49] - ACK sent. Pinging node 1 - ACK...nothing
#[2][1] {TIMEPLOT|data|Humidity|T|25.08}   [RX_RSSI:-50] - ACK sent.
#[3][1] {TIMEPLOT|data|Lux|T| 1.98}   [RX_RSSI:-51] - ACK sent.
#[4][1] {TIMEPLOT|data|Temperature|T|77.40}   [RX_RSSI:-51] - ACK sent. Pinging node 1 - ACK...nothing
#[5][1] {TIMEPLOT|data|Humidity|T|25.04}   [RX_RSSI:-52] - ACK sent.
#[6][1] {TIMEPLOT|data|Lux|T| 1.98}   [RX_RSSI:-53] - ACK sent.
#[7][1] {TIMEPLOT|data|Temperature|T|77.40}   [RX_RSSI:-54] - ACK sent. Pinging node 1 - ACK...nothing
#[8][1] {TIMEPLOT|data|Humidity|T|24.99}   [RX_RSSI:-55] - ACK sent.
#[9][1] {TIMEPLOT|data|Lux|T| 1.98}   [RX_RSSI:-55] - ACK sent.
#[10][1] {TIMEPLOT|data|Temperature|T|77.40}   [RX_RSSI:-56] - ACK sent. Pinging node 1 - ACK...nothing


EDIT:

With the LCD disabled the mightyhat gets all of the data out to a serial monitor via the FTDI. However, not all of it makes it to the Pi3 as before.

john4444

Hi SaffellBot,
QuoteI am surprised that the moteino has a much stronger signal strength is so much lower for the mightyhat given that's in HW and the moteino is not. Plus the mighthat has a "real" antenna while the moteino has a simple wire antenna.
By "real" antenna I presume that you are referring to those short, semi-flexible antennas with SMA connectors on them.
Just FYI, those "real" antennas have significantly poorer performance than the "simple wire".
Signal strength is sacrificed for wider bandwidth with the "real" style antenna.
A wire antenna, cut to the proper length, will have a somewhat narrow bandwidth which is a good thing for fixed frequency rx/tx.
John AE5HQ

joelucid

QuoteFrom minimcom I am getting only part of the data. In some transmissions the beginning of the serial line is missing, sometimes characters in the middle of a string are missing.

Stuff like that sometimes happens when you have two processes reading serial at the same time. Have you shut down the server process before using minicom? Almost aways the RFM69 will give you either the full correct packet or nothing due to CRC.


QuoteAlso, looking at this I am surprised that the moteino has a much stronger signal strength is so much lower for the mightyhat given that's in HW and the moteino is not.

The HW is only better at sending. HW and  W are equivalent for receiving. That said the RSSI numbers you're seeing on the MightyHat are very low indeed. Just as example I have a gateway in the shed at our weekend house and a mote in the farthest room in the house opposite of the shed. That's 3 (pretty thin) wooden walls. I receive a mote with suboptimal antenna (non tuned short stub) sending at -18dBm (that's powerlevel 0 on a rfm69w) at -85dBm.

Maybe you can describe where the nodes are located relative to each other. Which radios you use on the sensors, which powerlevel etc.

Joe

SaffellBot

Regarding the antenna / RSSI issue. I'm using ATC. It was a -100 because it was turned down from when I gathered the moteino data. They were about 2 inches from each other. I'm just surprised the moteino was at -50, and the adjacent mighthat was at -100. If a simple wire antenna is better I can always solder that in. I had initially assumed that a commercial antenna marketed as a "915 mhz SMA" would be better at 915 mhz than a simple wire. If that's not the case it's not a big deal.

Regarding the server process. I have no idea. I haven't done anything other than turning bluetooth off and changing some very simple settings as noted. My arduino knowledge is reasonably strong, my linux / pi3 knowledge much less so.  How would I shut down the server process / find it's status, and if it's disabled will it prevent it functioning as a webserver in the future?

joelucid

You know it almost sounds as if you don't have any antenna attached. 50dBm is a difference of 1:100000. That's not likely to be caused by a bad commercial antenna.

I'm assuming you use Felix gw? Then he will need to tell you how to shut it down since I don't use it.

SaffellBot

Update. I got the serial port working. They recently published an update changing how the UARTs work. I was able to get things to work by editing /boot/config.txt to contain:

enable_uart=1
dtoverlay=pi3-miniuart-bt


This retains bluetooth functionality, though I'm not using it. It's possibly to replace the miniuart line with:
dtoverlay=pi3-disable-bt

to just disable bluetooth.

This solution locks your processor at the minimum clock speed. Apparently that is required to use the UART. With dynamic clock speeds the serial communications frequency changes (unbelievable). If you really need the speed you can add the line
force_turbo=1
which will cause it to run at maximum speed at all times. People recommend using a good heat sink and power supply in this mode.


I still have not solved the issue where the mighty hat drops my humidity data when the LCD is enabled. When running the gateway ATC default code all data comes across fine now. I'm also not 100% sure the shutdown button press works, but I won't be able to investigate that until later in the week.