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

Board Configuration Information for Xbee S6B Wifi module #763

Open
trevorbattle opened this issue Dec 18, 2023 · 0 comments
Open

Board Configuration Information for Xbee S6B Wifi module #763

trevorbattle opened this issue Dec 18, 2023 · 0 comments

Comments

@trevorbattle
Copy link

I have had success using the XBee S6B module, and have some information that could go in the "Board Configuration Examples".

General Notes:

  • I am using a custom board with an Atmega2560 chip. This board was designed and used for Digi Zigbee devices, but seems to support the S6B hardware without changes.
  • The example WebClient.ino works as described.
  • The example HttpClient.ino does not work, just like the warning says, as characters are lost and HttpClient locks up.
  • HTTPS is not possible, as the documentation says, you can ask for it but it will attempt a plain HTTP connection and the server will complain that cleartext on port 443 is not allowed.

Most of the work I've done has been to get it to work with ArduinoOTA, specifically that the device can periodically poll a web site, and if a sketch update is found, download and install it.

Notes on ArduinoOTA with Digi S6B Wifi module:

  • As described on the ArduinoOTA page, it is required to change the Atmega2560 bootloader to make use of copy_flash_pages, see https://github.com/jandrassy/ArduinoOTA#atmega-support
  • The Mega2560 has 256K of flash, so you have to keep your sketch to under half that to have room for the update.
  • The Mega2560 can seemingly keep up with the Wifi stream when copying to memory, no characters are lost.
  • However, from my experience, calling InternalStorage.write(byte) for each incoming byte will cause bytes to be dropped from the Wifi stream. This is probably the most useful piece of information, I was not able to get this working. Whatever happens during this write takes too long and about 1% of bytes are dropped.
  • I was able to get OTA update working using a byte[1024] buffer and fetching/writing 1024 bytes at a time, however my code is application specific. It also requires web server-side code that can send the firmware blocks requested by the device, so for a 50K sketch it does ~50 requests into memory, then 50 loops of InternalStorage.write, then finally InternalStorage.apply(). At this moment I am not doing any checksumming of all the blocks.

However, in summary, if you really want ArduinoOTA to work with TinyGSM and XBee Wifi, it will.

I am currently attempting the same code with the XBee LTE-M devices, but some hardware changes are required at my end. The current consumption of the cellular devices is very high. (over 1000mA clean power required just for the module)

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

No branches or pull requests

1 participant