Giter Club home page Giter Club logo

nbsn95's Introduction

nbsn95's People

Contributors

david-huang-dw avatar dragino avatar playemaker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nbsn95's Issues

Setting TDC through Uplink Payload not working

Hello Dragino-Team,
im trying to get configuration updates through Uplink to work for the TDC on an NDDS75.
I'm using v1.2.0 on it downloaded from your website and it gets the Payload 0x0100001E which should set the TDC to 60 but doesnt and still uses the old value.
What do i wrong, or is there a bug in the Software?

< AT+CFG
> [...]
> AT+TDC=3600
> [...]
>
> OK
>
< ATZ
> [41]reboot error:Software!
> NDDS75 NB-IOT Distance Sensor
> Image Version: v1.2.0
> NB-IoT Stack : D-BC95-003
> Protocol in Used: UDP
> [12492]NBIOT has responded.
> [13824]Echo mode turned off successfully.
> [15170]The IMEI number is:12234567890.
> [16518]The IMSI number is:1234567890.
> [20867]Set automatic network access successfully.
> Currently set frequency band:3,8,20
> [23562]Signal Strength:16
> [28596]PSM mode configured 
> [30929]*****Upload start:0*****
> [30964]remaining battery =3358 mv 
> [38004]distance:250
> [40531]Open UDP port successfully
> [44072]Datagram is sent by RF 
> [46607]Received downlink data:0100001E
> [46649]Datagram is sent by RF 
> [47684]Send complete
> [48708]*****End of upload*****
> 
< 12345678
> [48744]Password Correct
< AT+CFG
> [...]
> AT+TDC=3600
> [...]

Best Regards
Norbert Ronecker

AT echo turnoff not working causing trouble

Hi,

first of all thank you very much for this nice device and firmware. To give back a little bit, I want to inform you about a minor bug in the current firmware.

In the nb_ATE function, the concatenation AT ATE is used, which produces the string "ATATE0", causing the command to fail. I did manually set ATE1 beforehand and therefore, uploading data failed.

I assume, you should use ATE"0\n" instead of AT ATE"0\n"

Pin 14 and Pin 12 state not added to data

In the documentation pin PB14 and PB12 are checked in mode 1 on high or low.
But during get data the pins aren't read for there state.
Add logic in common.c to read the pins and add the correct value:
if (HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_12) && sys.mod != model6)
Sensor->exit_state = Sensor->exit_state + 2;

	if (HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_14) && sys.mod != model6)
		Sensor->exit_state = Sensor->exit_state + 128;

Encryption support required

TLS on MQTT (as a minimum) is mandatory for all modern brokers. Encryption options are required for the 95A to be useful in production environments.

Memory useage issues.

Hi All
During my evaluation of the code I came across several issues.

1/ struct NBTASK { };
This is declared inside a header file (NOTE: header files shouldn't generate code). This results in 5 copes of this structure (and 6k or 25% of available RAM)
from MAP file:
Line 3528: NBTask 0x20000024 Data 1240 nbinit.o(.data)
Line 3530: NBTask 0x2000092c Data 1240 nb_mqtt.o(.data)
Line 3532: NBTask 0x20000e04 Data 1240 nb_udp.o(.data)
Line 3534: NBTask 0x200012dc Data 1240 nb_coap.o(.data)
Line 3536: NBTask 0x200017b4 Data 1240 nb_tcp.o(.data)

2/ local buffers
nb_udp.c, nb_tcp.c, nb_coap.c, nb_mqtt.c all use 1 or 2 local buffers. These buffers are mutually exclusive and so only one task ever uses them (and because this is a set and leave device, they will never be used). These buffers could be safely shared to free up almost 800b of RAM.
static char buff[200]={0};
static char downlink_data[50]={0};

Simon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.