imx6ull调试sx1268 lora调试记录

1、sx1268原厂只有基于单片机的参考代码:https://github.com/Lora-net/LoRaMac-node

2、如果基于linux平台使用,可以使用 github上sx1268代码

https://github.com/YukiWorkshop

https://github.com/YukiWorkshop/sx126x_linux_driver

需要Linux4.8以上才能使用。

3、调试过程供电和晶振都会影响到DIO的输出,需要测试各种电源和晶振。

4、可以通过测试用例先测试下spi读写是否是否ok。(注意cs引脚需要另外选择)

	printf("chipid=0x%x\n",Radio.ReadReg(0x0740));
	Radio.WriteReg(0x0740,0x34);
	printf("chipid=0x%x\n",Radio.ReadReg(0x0740));
	
	printf("chipid=0x%x\n",Radio.ReadReg(0x0741));
	Radio.WriteReg(0x0741,0x44);
	printf("chipid=0x%x\n",Radio.ReadReg(0x0741));

5、可以通过/sys/class/gpio来测试busy, nrst, nss, dio,这几个引脚是否ok?

//	struct PinConfig {
	//	int16_t busy = -1, nrst = -1, nss = -1, dio1 = -1, dio2 = -1, dio3 = -1;
	//	int16_t tx_en = -1, rx_en = -1;
	//};
echo 7 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio7/direction
echo 1 > /sys/class/gpio/gpio7/value

如下:

	SX126x_Linux Radio("/dev/spidev2.0", 0,
			   {
				   5, 6, 4,
				   3, -1,-1,
				   2, -1
			   }
	);

 

6、以上都ok后,如果发送成功,可以收到Wow RX done,如果没收到,需要两下DIO1引脚(DIO是默认低电平,cpu端也需要设置为默认低电平)

7、即为发送ok,在通过另外一个设置设置为接受,即lora初步调试ok

8、如果需要与其他lora模块通信,即使bw cr  ,sf都一致,也可以收到其他厂家的lora数据,但是数据被处理了,数据不对。

 

SFBWCode RateData Rate(bps) SFBWCode RateData Rate(bps) SFBWCode RateData Rate(bps)
51250000.800015625.00 52500000.800031250.00 55000000.800062500.00
61250000.80009375.00 62500000.800018750.00 65000000.800037500.00
71250000.80005468.75 72500000.800010937.50 75000000.800021875.00
81250000.80003125.00 82500000.80006250.00 85000000.800012500.00
91250000.80001757.81 92500000.80003515.63 95000000.80007031.25
101250000.8000976.56 102500000.80001953.13 105000000.80003906.25
111250000.8000537.11 112500000.80001074.22 115000000.80002148.44
121250000.8000292.97 122500000.8000585.94 125000000.80001171.88
              
SFBWCode RateData Rate(bps) SFBWCode RateData Rate(bps) SFBWCode RateData Rate(bps)
51250000.666713020.83 52500000.666726041.67 55000000.666752083.33
61250000.66677812.50 62500000.666715625.00 65000000.666731250.00
71250000.66674557.29 72500000.66679114.58 75000000.666718229.17
81250000.66672604.17 82500000.66675208.33 85000000.666710416.67
91250000.66671464.84 92500000.66672929.69 95000000.66675859.38
101250000.6667813.80 102500000.66671627.60 105000000.66673255.21
111250000.6667447.59 112500000.6667895.18 115000000.66671790.36
121250000.6667244.14 122500000.6667488.28 125000000.6667976.56
              
SFBWCode RateData Rate(bps) SFBWCode RateData Rate(bps) SFBWCode RateData Rate(bps)
51250000.571411160.71 52500000.571422321.43 55000000.571444642.86
61250000.57146696.43 62500000.571413392.86 65000000.571426785.71
71250000.57143906.25 72500000.57147812.50 75000000.571415625.00
81250000.57142232.14 82500000.57144464.29 85000000.57148928.57
91250000.57141255.58 92500000.57142511.16 95000000.57145022.32
101250000.5714697.54 102500000.57141395.09 105000000.57142790.18
111250000.5714383.65 112500000.5714767.30 115000000.57141534.60
121250000.5714209.26 122500000.5714418.53 125000000.5714837.05
              
SFBWCode RateData Rate(bps) SFBWCode RateData Rate(bps) SFBWCode RateData Rate(bps)
51250000.50009765.63 52500000.500019531.25 55000000.500039062.50
61250000.50005859.38 62500000.500011718.75 65000000.500023437.50
71250000.50003417.97 72500000.50006835.94 75000000.500013671.88
81250000.50001953.13 82500000.50003906.25 85000000.50007812.50
91250000.50001098.63 92500000.50002197.27 95000000.50004394.53
101250000.5000610.35 102500000.50001220.70 105000000.50002441.41
111250000.5000335.69 112500000.5000671.39 115000000.50001342.77
121250000.5000183.11 122500000.5000366.21 125000000.5000732.42

 

 

 

 

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
The aim of this project is to show an example of the endpoint LoRaWAN stack implementation. This project has 3 active branches in place. The master branch which provides the latest released source code (v4.4.2), the develop branch which provides the current source code development status to be released next (Milestone 4.4.3) and the feature/5.0.0 branch which provides a preview of the current source code development status for LoRaWAN Specification v1.1 specification.(Milestone 5.0.0) The master branch implementation is based on LoRaWAN Specification v1.0.3 and LoRaWAN Regional Parameters v1.0.3revA specifications. ClassA, ClassB and ClassC end-device classes are fully implemented. The develop branch implementation is based on LoRaWAN Specification v1.0.3 and LoRaWAN Regional Parameters v1.0.3revA specifications. ClassA, ClassB and ClassC end-device classes are fully implemented. The feature/5.0.0 branch implementation is based on LoRaWAN Specification v1.1 and LoRaWAN Regional Parameters v1.1rB specifications. ClassA, ClassB and ClassC end-device classes are fully implemented. This project also provides SX1272/73, SX1276/77/78/79 and SX1261/2 radio drivers. For each currently supported platform example applications are provided. LoRaMac/classA: ClassA end-device example application. LoRaMac/classB: ClassB end-device example application. LoRaMac/classC: ClassC end-device example application. LoRaMac/fuota-test-01: FUOTA test scenario 01 end-device example application. (Based on provided application common packages) LoRaMac/periodic-uplink-lpp: ClassA/B/C end-device example application. Periodically uplinks a frame using the Cayenne LPP protocol. (Based on provided application common packages) ping-pong: Point to point RF link example application. rx-sensi: Example application useful to measure the radio sensitivity level using an RF generator. tx-cw: Example application to show how to generate an RF Continuous Wave transmission. Note: Each LoRaWAN application example (LoRaMac/classX) includes an implementation of the LoRa-Alliance; LoRaWAN certification protocol. Note: The LoRaWAN stack API documentation can be found at: http://stackforce.github.io/LoRaMac-doc/
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值