GPRS_C_SDK icon indicating copy to clipboard operation
GPRS_C_SDK copied to clipboard

Is it possible to run micropython on the A9G?

Open Skorpeo opened this issue 6 years ago • 13 comments

is it possible to flash the A9G with micropython? If so, are there any instructions or flash tool?

Skorpeo avatar Dec 23 '18 15:12 Skorpeo

Look here: https://github.com/Neutree/micropython

PostconEssen avatar Jan 18 '19 12:01 PostconEssen

Have anyone got any success using micropython or maybe luat on this device? I'm spoiled by NodeMCU on ESP8266 so I'm looking something on similar level. I'm still waiting for delivery so can't verify anything at the moment. I saw https://github.com/Neutree/micropython but there's not much activity lately and it doesn't seem to be popular.

pm4r avatar Jan 18 '19 14:01 pm4r

looks cool but not sure how to flash and no documentation...

Skorpeo avatar Jan 20 '19 13:01 Skorpeo

You can flash it using coolwatcher.

pergerk avatar Jan 20 '19 15:01 pergerk

Unfortunately, it does not look like wireless communications are implemented in this port. However, adding custom modules does not seem a rocket science.

pulkin avatar Jan 25 '19 12:01 pulkin

I took over the micropython port at https://github.com/pulkin/micropython/tree/master/ports/gprs_a9 . I ported GPS and the next thing on the list is the GSM module itself. Testers are welcome.

pulkin avatar Feb 03 '19 15:02 pulkin

Awesome! Hats off to you, when I have some time to flash the board I will give it a shot

Skorpeo avatar Feb 03 '19 18:02 Skorpeo

Great job. GPS+GPRS are what people brings to this hardware. I'm too busy right now, but am looking forward to try this as well in a month or so.

pm4r avatar Feb 05 '19 20:02 pm4r

I started porting sockets and, in principle, the port should be already usable for something as simple as GPS tracking application. I am aware of several ways to make the module unresponsive so watchdog is absolutely necessary. Have fun (I will no longer advertise in this thread).

import cellular as c
import usocket as sock
import time

print("Waiting network registration ...")
while not c.is_network_registered():
    time.sleep(1)

print("Delay 2 sec ...")
time.sleep(2)
print("Activating ...")
c.gprs_activate("internet", "", "")

print("Local IP:", sock.get_local_ip())
print("Resolving ...")
ip = sock.dns_resolve("portquiz.net")
print("IP:", ip)

s = sock.socket()
print("Connecting ...")
s.connect((ip, 80))
print("Sending ...")
print("Sent:", s.send("hi\n"))
print("Receiving ...")
print("Received:", s.recv(128))

pulkin avatar Mar 23 '19 00:03 pulkin

@pulkin @Neutree Im trying for a few days to get Micropython working on my module, and just can't.

I followed everything, generated the hex from ports/gprs_a9 (build was sucessful), uploaded the .lod file (also with success) but than I can't connect to module, upload file or do anything. Tried to get any response using pyserial, rshell or ampy, and nothing. Already tried using Windows and Ubuntu and also with the Docker image.

Programming/uploading generated hex files in the normal way using C++ works normally. I just can't get micropython to work with this module. Can anyone please give me some light here?

arlucio avatar May 10 '19 17:05 arlucio

There could be several options. First, wiring. Are you sure you connect another USB2TTL to TX1/RX1? pudding

pulkin avatar May 10 '19 18:05 pulkin

Ok my fault, now it's working.

Actually I just had the idea to change pins to TX1/RX1, as you proposed, some hours ago (would be great if you could put it on the readme for the new users).

I tried it before and it didn't worked but now it works, no idea why. Anyways thanks for the help, and great work!

arlucio avatar May 10 '19 18:05 arlucio