Hi,
I am working with the Xbee3 LTE-M module and microcontroller unit.
I want to make a network interface layer using the LTE module and in doing so I need to implement socket calls(create, send, receive, etc) which interns talk to Xbee hardware using AT command via USART.
This code requires the XBee to be in API mode (ATAP1) and at a baud rate of 115.2kbps (ATBD7).
As for sockets, you don’t control it like you would think. You only need to send the TX request (IPV4) which will have the IP address and port number for the device you want to send the data to. The radio will keep the socket open for the timeout period set on the radio and the remote device.
The data will be sent back on what ever port number the xbee is set to (DE and CO).
Hi,
I tried using above mentioned example as well as xbee_netcat.c but I am facing issue while getting callback response from xbee for socket apis in both the cases.
After call to
netcat_socket = xbee_sock_create(xbee, proto,netcat_sock_notify_cb);
I am getting xbee_sock_frame_handler 0x8a and then nothing happens.
my frame dispatcher looks like
#define XBEE_SOCK_FRAME_HANDLERS { 0, 0, xbee_sock_frame_handler, NULL } //receive for every frame event
After initializing xbee module and going into API mode I am able to resolve FQDN and getting IP of remote host from its callback network is also available .
Below are the logs I am receiving in the process
xbee_sock_frame_handler 0x88,
Cellular module connected…
xbee_sock_frame_handler 0x88,
My IP is 10.117.118.127
xbee_sock_create: created socket 0x0037
xbee_sock_frame_handler 0x8a
So my query is why callbacks are not being called for socket apis ?
Furthermore i have XBEE_CELLULAR_ENABLED=1 is enabled.
The code you are working with has not been updated to support the new socket functions that exits in the XBee 3 CAT M module. You are going to need to look at the manual for the XBee and add the necessary functions to this code.
I have used xbee_ansic_library/samples/common/xbee_netcat.c code with minor modification of removal of windows related functions to support my platform as xbee_ansic_library/samples/common/socket_test.c did now work for me.
xbee_netcat.c file seems doing initialization and command layer init, and IP management.
Is there any recommended sequence available ?
I also tried to map the socket api frames with manual but i was not able to find frame to guide.
socket_frames.h has
//Frame definitions and support functions for Extended Socket frames
(0x40-0x4F and 0xC0-0xCF).
The firmware version you are working with is very old. I would suggest you update it to the current version. Make sure you do it using one of the new XBIB-CU-TH boards so you can update the U-Blox modules as well. Also make sure you do it in at least 3 steps. That is, update to version 1140F, then 11413 and finally 11415.
LTE-M module is located at remote location and is attached with EFM32 Geint gecko.
I am able to communicate with the module and able to Get ip and cell network.
So is there any FOTA way to do it from MCU ?
Any sample or guide available to do it easy way ?