lloydroc / ebyte-sx1276

EByte E32 for the Raspberry Pi on Linux
Apache License 2.0
20 stars 5 forks source link

Wrong Frequency #27

Closed viaSeunghyun closed 11 months ago

viaSeunghyun commented 11 months ago

Hi,

When we run the command e32 --status, e32 returns some properties, but the information about Frequency is incorrect. My model is a 900MHz band model, but it shows up as 433MHz. It should actually show 868 MHz. The raw settings HEX is as follows.

0xc000001a1744

lloydroc commented 11 months ago

Hello you are right and I see why this is a problem. When I did this I only had the 868MHz model. Ebyte designed the output so the frequency calculation depends not only on channel but on the version. Also, when I look at the output of the e32 --status command it has two frequency outputs. The first is from the version output which should be the model. The second is the setting of base frequency with the channel setting.

The fix should be easy.

viaSeunghyun commented 11 months ago

And the output values (in dB) don't seem to match either. Both the 20dB and 30dB models represent the maximum output of each model when the bit is 00. I don't have a variety of models to see if this is distinguishable by version, so I haven't looked at the actual data.

I'll log this as an issue first.

lloydroc commented 11 months ago

Hello @viaSeunghyun would you mind looking at https://github.com/lloydroc/ebyte-sx1276/pull/28? I have not found a way in the datasheet to know the total power whether (20dBm, 27dBm, 30dBm) to know from the output of the status or version commands. If you know a way please let me know? I looked through many datasheets. This PR will fix the frequency and will output the attenuation of the total power level.

viaSeunghyun commented 11 months ago

Hello, @lloydroc

My country (South Korea) was on a long holiday. So the confirmation is late.

First, The datasheet and the actual data are quite different. Until we get clarification from Ebyte, I think it's correct to express it in terms of attenuation levels.

TL; DR

Full Text

I have a 900T20D and a 900T30D. I asked for "C1 C1 C1" and "C3 C3 C3" respectively, recorded the responses, and decoded them using a dedicated program from Ebyte.

Raw Data

900T20D 900T30D
C1 C1 C1 C0 00 00 1A 17 44 C0 00 00 1A 06 44
C3 C3 C3 C3 32 10 14 C3 00 45 10 1E 0B 00 00

900T20D

Request Response
C1 C1 C1 C0 00 00 1A 17 44
C3 C3 C3 C3 32 10 14
Type Value
Version 7393-1-15
Frequency 885.0MHz
Baudrate 9600
Parity 8N1
AirRate 2400
Power 30dBm
FEC Enable
Fixed Mode Disable
WOR timing 250ms
IO Mode PushPull
Address 0
Channel 23

900T30D

Request Response
C1 C1 C1 C0 00 00 1A 06 44
C3 C3 C3 C3 00 45 10 1E 0B 00 00
Type Value
Version 7393-3-16
Frequency 868.0MHz
Baudrate 9600
Parity 8N1
AirRate 2400
Power 30dBm
FEC Enable
Fixed Mode Disable
WOR timing 250ms
IO Mode PushPull
Address 0
Channel 6
lloydroc commented 11 months ago

Thank you @viaSeunghyun ! There seem to be many inconsistencies in the Datasheet. I have contacted the vendor before and not gotten any luck making changes and getting clarifications. There is definitely a language barrier. It is unfortunate we cannot show total power but if you can find a way, please let me know.