hey @ryanHologram thanks for the response.
that’s correct. I modified the chat script to instead of sending OK AT+CGDCONT=1,"IP","hologram"
it sends OK AT+CGDCONT=1,"IP","broadband"
. It is generally able to connect, but holding the connection becomes problematic.
I have a cron bash script that runs sudo hologram modem connect
. then, once that succeeds, it runs a python script to handle file uploads using the request library. that essentially looks like the code below (some helper functions omitted):
def sendImages(*imgs):
files = {}
try:
printnow('Uploading ' + str(imgs))
i = 0
for img in imgs:
files['imageData-' + str(i)] = open(IMAGE_DIR + '/' + img, 'rb')
i += 1
r = requests.put(UPLOAD_URL, headers=headers, files=files, timeout = 60)
printnow(str(r.status_code) + ": " + str(imgs))
imagesToSend = [...]
printnow('Sending these images: ' + str(imagesToSend))
imageChunks = list(chunks(imagesToSend, NUM_IMAGES_TO_SEND_PER_REQUEST)) # splits list into sublists of size 2
for imageChunk in imageChunks:
sendImages(*imageChunk)
printnow('Finished uploading')
I’ve actually switched back to the hologram sim to see if it was perhaps a problem with my network/sim config (hologram tries to use t-mobile), but on that side, i’m seeing a lot of this immediately after connection (it doesn’t hold it for long at all)
Oct 20 15:46:39 raspberrypi pppd[1102]: LCP terminated by peer
Oct 20 15:46:39 raspberrypi pppd[1102]: Connect time 0.4 minutes.
Oct 20 15:46:39 raspberrypi pppd[1102]: Sent 1961 bytes, received 4223 bytes.
Oct 20 15:46:42 raspberrypi pppd[1102]: Connection terminated.
Oct 20 15:46:43 raspberrypi pppd[1102]: Modem hangup
but that seems like it may potentially be another issue altogether.
one thing that seems suspicious to me is that the nova light is double blinking blue, which indicates 2g. as far as i know, AT&T does not support a 2g network, so not sure how it even connects. and i am in downtown atlanta, so i am skeptical that there is no 3g at&t or t-mobile available.
i know there’s a lot to digest here, but let me know if I can answer anything else for you!