So, I’m trying to do a HTTPS connection in various ways, and I always get the same result: no data
mostly I don’t use tx/rx on the Xbee, but SPI in API mode. I tried to connect using sockets, and all goes well for creation and connecting, but I NEVER receive the 0xcf frame that would indicate a connection. According to the documentation, it would be send to the serial, which doesn’t make sense since I’m using SPI (DIN/DOUT are NOT forcefully disabled, but SPI is always selected on boot) so serial would be disabled
I tried to do some connections in the xbee REPL console and a basic HTTP connection works:
>>> u = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP); u.connect(('kevzan.net',80)); u.write('GET /test/test.txt HTTP/1.1
host: kevzan.net
connection: close
accept: */*
'); u.read()
81
b'HTTP/1.1 302 Found
Date: Fri, 18 Dec 2020 16:49:36 GMT
Server: Apache/2.4.29 (Ubuntu)
Location: https://kevzan.net/test/test.txt
Content-Length: 292
Connection: close
Content-Type: text/html; charset=iso-8859-1
302 Found
Found
The document has moved [here](https://kevzan.net/test/test.txt).
Apache/2.4.29 (Ubuntu) Server at kevzan.net Port 80
'
Now if I switch to ssl, it doesn’t:
>>> u = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP); u.connect(('kevzan.net',80)); u.write('GET /test/test.txt HTTP/1.1
host: kevzan.nes = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_SEC); u = ssl.wrap_socket(s); u.connect(('kevzan.net',443)); u.write('GET /test/test.txt HTTP/1.1
host: kevzan.net
connection: close
accept: */*
'); time.sleep(1); u.read()
81
b''
(I should get Hello)
Any explanation or hint?
Feel free to test using my server if necessary (a simple browser call will show you it works, and certificates are fine)
Thanks!
Phil
PS: I get the same issue on LTE-M/NBioT Xbee or LTE Cat-1 ones (latest firmware versions)