Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bc66 #492

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Bc66 #492

wants to merge 5 commits into from

Conversation

belveder79
Copy link

Added Quectel BC66 support as UART modem (alpha stage)

  • have fully functional MQTT client support
  • have server-side SSL certificate validation support for MQTT client
  • rudimentary connection/disconnection support based on original BG96 implementation (not fully tested)

@SRGDamia1
Copy link
Collaborator

I would rather not implement MQTT using application level modem commands at this time. I would prefer to keep TinyGSM at the socket level (TCP commands) and refer users to an MQTT library (like PubSubClient) for the MQTT application layer.

@belveder79
Copy link
Author

belveder79 commented Feb 9, 2021 via email

@SRGDamia1
Copy link
Collaborator

Oh, sorry, so it's an SSL issue, too. I didn't catch that.

I think others have had success by using TinyGSM for the socket layer, another SSL library for the security layer, and then PubSubClient or whatever else on top of that. Have you tried something like that?

@SRGDamia1
Copy link
Collaborator

I'm sure using the on-chip MQTT and SSL functionality would be more efficient, I'm just not sure I want to add that layer to this library right now.

@belveder79
Copy link
Author

Concerning SSL libs, I actually have not tested others. I'm primarily working with ESP8266 and ESP32, and program memory is always an issue, aside of the very little computational power...

You are totally right. Having less hardware-specific support for individual features, but keeping the library functionality more general instead, is a good approach. The main issue I see is that you have to be clear about what is a modem and what is more than a modem and have to reflect that somewhat in what goes in and what does not...

The SIM800 is a stupid modem. The BC66 however is essentially like an ESP8266, but uses NB-IoT instead of WIFI. So in my case, indeed I want to use the BC66 like a stupid modem because it's not a plausible replacement for my ESP32. So I need to control it over AT commands. Still it turned out that handling of modem data over serials - and the polling in particular - causes real trouble if the waitResponse() is not called frequently or there are several modem responses piling up to be handled with string-compare.

Because I need to have SSL for my MQTT server I just went straight for using the built-in functions, which worked fairly well, but only because the MQTT protocol for BC66 is pretty clean (i.e. clear responses or messages). There are still occasional issue, which are - again - related to this waitResponse() thing... so the bottom line is, I cut it short by using the direct modem commands, and I now have less issues because it is cleaner, but the issues still there are related to the fundamental issues with querying data from the modem...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants