pulkin / micropython Goto Github PK
View Code? Open in Web Editor NEWThis project forked from neutree/micropython
MicroPython implementation on Ai-Thinker GPRS module A9 (RDA8955)
Home Page: https://micropython.org
License: MIT License
This project forked from neutree/micropython
MicroPython implementation on Ai-Thinker GPRS module A9 (RDA8955)
Home Page: https://micropython.org
License: MIT License
I slightly modified adafruit-ssd1306.py oled display driver library for use with A9G pudding and non-standard I2C library.
I did some tests using hw i2c ports 2 and 3 and had no issues.
The main difference is how to init display:
oled = ssd1306_a9g.SSD1306_I2C(width, height, i2c_id, i2c_freq, addr)
where i2c_id is 2 or 3 and i2c_freq = clk frequency in kHz
i.e oled = ssd1306_a9g.SSD1306_I2C(128, 64, 3, 400)
Hoping it could be useful to somebody.
# MicroPython SSD1306 OLED driver, I2C and SPI interfaces created by Adafruit
# ported to A9G pudding by iemmeti
import framebuf
import i2c
import time
# register definitions
SET_CONTRAST = const(0x81)
SET_ENTIRE_ON = const(0xa4)
SET_NORM_INV = const(0xa6)
SET_DISP = const(0xae)
SET_MEM_ADDR = const(0x20)
SET_COL_ADDR = const(0x21)
SET_PAGE_ADDR = const(0x22)
SET_DISP_START_LINE = const(0x40)
SET_SEG_REMAP = const(0xa0)
SET_MUX_RATIO = const(0xa8)
SET_COM_OUT_DIR = const(0xc0)
SET_DISP_OFFSET = const(0xd3)
SET_COM_PIN_CFG = const(0xda)
SET_DISP_CLK_DIV = const(0xd5)
SET_PRECHARGE = const(0xd9)
SET_VCOM_DESEL = const(0xdb)
SET_CHARGE_PUMP = const(0x8d)
# Timings (after some try and error)
CMD_TIMEOUT = 20
FB_TIMEOUT = 100
class SSD1306:
def __init__(self, width, height, external_vcc):
self.width = width
self.height = height
self.external_vcc = external_vcc
self.pages = self.height // 8
# Note the subclass must initialize self.framebuf to a framebuffer.
# This is necessary because the underlying data buffer is different
# between I2C and SPI implementations (I2C needs an extra byte).
self.poweron()
self.init_display()
def init_display(self):
for cmd in (
SET_DISP | 0x00, # off
# address setting
SET_MEM_ADDR, 0x00, # horizontal
# resolution and layout
SET_DISP_START_LINE | 0x00,
SET_SEG_REMAP | 0x01, # column addr 127 mapped to SEG0
SET_MUX_RATIO, self.height - 1,
SET_COM_OUT_DIR | 0x08, # scan from COM[N] to COM0
SET_DISP_OFFSET, 0x00,
SET_COM_PIN_CFG, 0x02 if self.height == 32 else 0x12,
# timing and driving scheme
SET_DISP_CLK_DIV, 0x80,
SET_PRECHARGE, 0x22 if self.external_vcc else 0xf1,
SET_VCOM_DESEL, 0x30, # 0.83*Vcc
# display
SET_CONTRAST, 0xff, # maximum
SET_ENTIRE_ON, # output follows RAM contents
SET_NORM_INV, # not inverted
# charge pump
SET_CHARGE_PUMP, 0x10 if self.external_vcc else 0x14,
SET_DISP | 0x01): # on
self.write_cmd(cmd)
self.fill(0)
self.show()
def poweroff(self):
self.write_cmd(SET_DISP | 0x00)
def poweron(self):
self.write_cmd(SET_DISP | 0x01)
def contrast(self, contrast):
self.write_cmd(SET_CONTRAST)
self.write_cmd(contrast)
def invert(self, invert):
self.write_cmd(SET_NORM_INV | (invert & 1))
def show(self):
x0 = 0
x1 = self.width - 1
if self.width == 64:
# displays with width of 64 pixels are shifted by 32
x0 += 32
x1 += 32
self.write_cmd(SET_COL_ADDR)
self.write_cmd(x0)
self.write_cmd(x1)
self.write_cmd(SET_PAGE_ADDR)
self.write_cmd(0)
self.write_cmd(self.pages - 1)
self.write_framebuf()
def fill(self, col):
self.framebuf.fill(col)
def pixel(self, x, y, col):
self.framebuf.pixel(x, y, col)
def scroll(self, dx, dy):
self.framebuf.scroll(dx, dy)
def text(self, string, x, y, col=1):
self.framebuf.text(string, x, y, col)
class SSD1306_I2C(SSD1306):
# modified for A9G i2c library
def __init__(self, width, height, i2c_id=3, i2c_freq = 100, addr=0x3C, external_vcc=False):
self.i2c_id = i2c_id
self.i2c_freq = i2c_freq
i2c.init(i2c_id, i2c_freq)
self.addr = addr
self.temp = bytearray(2)
# Add an extra byte to the data buffer to hold an I2C data/command byte
# to use hardware-compatible I2C transactions. A memoryview of the
# buffer is used to mask this byte from the framebuffer operations
# (without a major memory hit as memoryview doesn't copy to a separate
# buffer).
self.buffer = bytearray(((height // 8) * width) + 1)
self.buffer[0] = 0x40 # Set first byte of data buffer to Co=0, D/C=1
self.framebuf = framebuf.FrameBuffer1(memoryview(self.buffer)[1:], width, height)
super().__init__(width, height, external_vcc)
def write_cmd(self, cmd):
self.temp[0] = 0x80 # Co=1, D/C#=0
self.temp[1] = cmd
# modified for A9G i2c library
i2c.transmit(self.i2c_id, self.addr, self.temp, CMD_TIMEOUT)
def write_framebuf(self):
# Blast out the frame buffer using a single I2C transaction to support
# hardware I2C interfaces.
# modified for A9G i2c library
i2c.transmit(self.i2c_id, self.addr, self.buffer, FB_TIMEOUT)
def poweron(self):
pass
Implement voice calls in cellular
.
I am having an issue using cellular.gprs
as this command hangs forever when providing my SIM Card APN (TM
).
(Providing a wrong APN such as wrong_apn
yields an error but the command doesn't hang.)
Example code that hangs my board:
import cellular
cellular.is_network_registered() # returns True!!!!
cellular.gprs("TM", "", "")
Is there a setting I forgot to enter before invoking cellular.gprs
?
Official settings for my SIM Card (Things Mobile) are:
Additional optional parameters are:
Additionally I tried to send my phone a SMS from the board invoking cellular.SMS("+33612345678", "test message")
as I believe this action is independent from being connected to an APN.
But I didn't receive the SMS... (I entered the correct phone number.)
Any example or hint to perform this action would be appreciated.
Thanks,
Currently gps.get_location()
will return the latest location if it cannot get the current location.
There should be a way to tell if gps.get_location()
is the actual position.
Both time and location are from NMEA RMC sentence which probably means that they correspond to each other.
I think about giving access to the timestamp of the last reported location (if there is any). Unfortunately, GPS does not really provide something on demand: it just spams UART2 with its messages
ESP8266:
micropython/ports/esp8266/modesp.c
Lines 285 to 322 in cda82f4
I have noticed that gps.time()
rolls back to its original value 2525040000
after executing mqtt.publish(topic, message)
.
I believe the GPS resets completely in that situation for an unknown reason.
micropython/ports/gprs_a9/Makefile
Lines 8 to 14 in f7bdef5
usage: get gps's RTC time.
There is no way to answer an incoming call.
To conform with the API standard.
.. and explore whether formatting it to FAT32 is possible. Flash dump:
flash-dump.bin.gz
binwalk
:
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
9820 0x265C CRC32 polynomial table, little endian
1975160 0x1E2378 CRC32 polynomial table, little endian
2057636 0x1F65A4 Neighborly text, "neighbor entryis required"
2097655 0x2001F7 PARity archive data - file number 19807
2109185 0x202F01 Neighborly text, "NeighborCellInfo != NULL, neighbor cell number:%d_ProcessData pNeighborCellInfo[%d] sMcc=%d%d%d,sMnc=%d%d%d,sLac=%x,sCellID=%x,iBsic=%d,iRxLev=%d,iRxLevSub=%d,nArfcn=%d,nTSM_BCC"
2109211 0x202F1B Neighborly text, "neighbor cell number:%dInfo[%d] sMcc=%d%d%d,sMnc=%d%d%d,sLac=%x,sCellID=%x,iBsic=%d,iRxLev=%d,iRxLevSub=%d,nArfcn=%d,nTSM_BCCHDec=%d,nTSM_C1Value=%d"
2109262 0x202F4E Neighborly text, "NeighborCellInfo[%d] sMcc=%d%d%d,sMnc=%d%d%d,sLac=%x,sCellID=%x,iBsic=%d,iRxLev=%d,iRxLevSub=%d,nArfcn=%d,nTSM_BCCHDec=%d,nTSM_C,iBsic=%d,iRxLev=%d,iRxLevSub=%d,nArfcn=%d,nTSM_BCCHDec=%d,nTSM_C1Value=%d"
2120345 0x205A99 Unix path: /dev/ota/v4.1/update_and_check/%s HTTP/1.1
2122488 0x2062F8 CRC32 polynomial table, little endian
2126635 0x20732B Unix path: /./mupnp/src/mupnp/http/http_packet.c
2131744 0x208720 PEM RSA private key
2131808 0x208760 PEM EC private key
2132835 0x208B63 Unix path: /./mupnp/src/mupnp/net/socket.c
2133203 0x208CD3 Unix path: /./mbedtls/library/ssl_tls.c
2140668 0x20A9FC PEM certificate
2157484 0x20EBAC SHA256 hash constants, little endian
2169315 0x2119E3 Unix path: /./mbedtls/library/ssl_cli.c
2369610 0x24284A Certificate in DER format (x509 v3), header length: 4, sequence length: 2063
2491470 0x26044E Certificate in DER format (x509 v3), header length: 4, sequence length: 2048
2491474 0x260452 Certificate in DER format (x509 v3), header length: 4, sequence length: 17408
2491478 0x260456 Certificate in DER format (x509 v3), header length: 4, sequence length: 0
2492038 0x260686 Certificate in DER format (x509 v3), header length: 4, sequence length: 17408
2492042 0x26068A Certificate in DER format (x509 v3), header length: 4, sequence length: 2048
2492046 0x26068E Certificate in DER format (x509 v3), header length: 4, sequence length: 1024
2502362 0x262EDA Certificate in DER format (x509 v3), header length: 4, sequence length: 15
2502366 0x262EDE Certificate in DER format (x509 v3), header length: 4, sequence length: 11279
2502370 0x262EE2 Certificate in DER format (x509 v3), header length: 4, sequence length: 12305
2502374 0x262EE6 Certificate in DER format (x509 v3), header length: 4, sequence length: 19456
2502506 0x262F6A Certificate in DER format (x509 v3), header length: 4, sequence length: 18432
2503146 0x2631EA Certificate in DER format (x509 v3), header length: 4, sequence length: 19456
2503150 0x2631EE Certificate in DER format (x509 v3), header length: 4, sequence length: 12305
2503154 0x2631F2 Certificate in DER format (x509 v3), header length: 4, sequence length: 15377
2503158 0x2631F6 Certificate in DER format (x509 v3), header length: 4, sequence length: 21504
2503162 0x2631FA Certificate in DER format (x509 v3), header length: 4, sequence length: 20480
2507558 0x264326 Certificate in DER format (x509 v3), header length: 4, sequence length: 23040
2507562 0x26432A Certificate in DER format (x509 v3), header length: 4, sequence length: 22784
2507590 0x264346 Certificate in DER format (x509 v3), header length: 4, sequence length: 23040
2507594 0x26434A Certificate in DER format (x509 v3), header length: 4, sequence length: 22784
2507614 0x26435E Certificate in DER format (x509 v3), header length: 4, sequence length: 23040
2507638 0x264376 Certificate in DER format (x509 v3), header length: 4, sequence length: 23040
2507662 0x26438E Certificate in DER format (x509 v3), header length: 4, sequence length: 23040
2507690 0x2643AA Certificate in DER format (x509 v3), header length: 4, sequence length: 23040
2507694 0x2643AE Certificate in DER format (x509 v3), header length: 4, sequence length: 22784
2507718 0x2643C6 Certificate in DER format (x509 v3), header length: 4, sequence length: 23040
2507746 0x2643E2 Certificate in DER format (x509 v3), header length: 4, sequence length: 23040
2507782 0x264406 Certificate in DER format (x509 v3), header length: 4, sequence length: 23040
2507786 0x26440A Certificate in DER format (x509 v3), header length: 4, sequence length: 22784
2507814 0x264426 Certificate in DER format (x509 v3), header length: 4, sequence length: 23040
2507842 0x264442 Certificate in DER format (x509 v3), header length: 4, sequence length: 23040
2507878 0x264466 Certificate in DER format (x509 v3), header length: 4, sequence length: 23040
2507882 0x26446A Certificate in DER format (x509 v3), header length: 4, sequence length: 22784
2507910 0x264486 Certificate in DER format (x509 v3), header length: 4, sequence length: 23040
2507974 0x2644C6 Certificate in DER format (x509 v3), header length: 4, sequence length: 23552
2508598 0x264736 Certificate in DER format (x509 v3), header length: 4, sequence length: 19482
2509002 0x2648CA Certificate in DER format (x509 v3), header length: 4, sequence length: 25600
2509006 0x2648CE Certificate in DER format (x509 v3), header length: 4, sequence length: 26624
2509334 0x264A16 Certificate in DER format (x509 v3), header length: 4, sequence length: 28672
2510130 0x264D32 Certificate in DER format (x509 v3), header length: 4, sequence length: 27648
2511942 0x265446 Certificate in DER format (x509 v3), header length: 4, sequence length: 29696
2512082 0x2654D2 Certificate in DER format (x509 v3), header length: 4, sequence length: 26624
2512170 0x26552A Certificate in DER format (x509 v3), header length: 4, sequence length: 26880
2512450 0x265642 Certificate in DER format (x509 v3), header length: 4, sequence length: 23040
2512454 0x265646 Certificate in DER format (x509 v3), header length: 4, sequence length: 22784
2512458 0x26564A Certificate in DER format (x509 v3), header length: 4, sequence length: 24064
2512466 0x265652 Certificate in DER format (x509 v3), header length: 4, sequence length: 19481
2512474 0x26565A Certificate in DER format (x509 v3), header length: 4, sequence length: 22528
2519978 0x2673AA Certificate in DER format (x509 v3), header length: 4, sequence length: 7168
2522198 0x267C56 Certificate in DER format (x509 v3), header length: 4, sequence length: 15
2522418 0x267D32 Certificate in DER format (x509 v3), header length: 4, sequence length: 15
2522422 0x267D36 Certificate in DER format (x509 v3), header length: 4, sequence length: 14336
2522486 0x267D76 Certificate in DER format (x509 v3), header length: 4, sequence length: 13312
2522554 0x267DBA Certificate in DER format (x509 v3), header length: 4, sequence length: 15
2522602 0x267DEA Certificate in DER format (x509 v3), header length: 4, sequence length: 10240
2555366 0x26FDE6 Certificate in DER format (x509 v3), header length: 4, sequence length: 12316
2555370 0x26FDEA Certificate in DER format (x509 v3), header length: 4, sequence length: 30748
2555374 0x26FDEE Certificate in DER format (x509 v3), header length: 4, sequence length: 26658
2555382 0x26FDF6 Certificate in DER format (x509 v3), header length: 4, sequence length: 8219
2555386 0x26FDFA Certificate in DER format (x509 v3), header length: 4, sequence length: 3100
2560002 0x271002 Certificate in DER format (x509 v3), header length: 4, sequence length: 0
2613852 0x27E25C Private key in DER format (PKCS header length: 4, sequence length: 605
2614464 0x27E4C0 Certificate in DER format (x509 v3), header length: 4, sequence length: 600
2616272 0x27EBD0 SHA256 hash constants, little endian
2654964 0x2882F4 CRC32 polynomial table, little endian
2674860 0x28D0AC Neighborly text, "neighbor entryis required"
2718067 0x297973 PARity archive data - file number 19807
2726540 0x299A8C JPEG image data, JFIF standard 1.01
2754216 0x2A06A8 PEM RSA private key
2754280 0x2A06E8 PEM EC private key
2755731 0x2A0C93 Unix path: /./mbedtls/library/ssl_tls.c
2762952 0x2A28C8 PEM certificate
2777432 0x2A6158 SHA256 hash constants, little endian
2789263 0x2A8F8F Unix path: /./mbedtls/library/ssl_cli.c
2794408 0x2AA3A8 Base64 standard index table
2805117 0x2ACD7D Neighborly text, "NeighborCellInfo[%d] sMcc=%d%d%d,sMnc=%d%d%d,sLac=%x,sCellID=%x,iBsic=%d,iRxLev=%d,iRxLevSub=%d",iBsic=%d,iRxLev=%d,iRxLevSub=%d""
2924621 0x2CA04D Ubiquiti firmware header, third party, ~CRC32: 0x0, version: " SERVER),(1,65535)"
2936844 0x2CD00C Ubiquiti firmware header, third party, ~CRC32: 0x0, version: "NING"
2999300 0x2DC404 CRC32 polynomial table, little endian
3003651 0x2DD503 Unix path: /./mupnp/src/mupnp/http/http_packet.c
3004683 0x2DD90B Unix path: /./mupnp/src/mupnp/net/socket.c
3756544 0x395200 PC bitmap, Windows 3.x format,, 128 x 160 x 24
Dear Pulkin,
I am used to using an extension of Microsoft Visual Studio Code called PyMakr to develop MicroPython code more easily. It works fine with several boards such as the ESP8266.
There is a command to copy a .py file onto the board similarly to ampy.
But it doesn't work with the A9G board.
I believe it has to do with the A9G RX buffer being too small to store a big chunk of data.
If so, increasing the size of that buffer would solve my issue.
Could you tell me where to size that buffer in the code before building the A9G port?
Thanks,
Thanks for your great work!
Do you have any Micropython example code to share to simplify my understanding of your different APIs?
I would like to transmit regularly some GPS (together with some AGPS) coordinates to a MQTT broker using SSL/TLS and the cellular connection.
Maybe you already wrote such piece of software?
Dear pukin, here are some thoughts:
gps.get_location()
could yield (None, None)
if not capable of getting the current location?cellular.gprs(...)
would rather not throw an error if already connected as everything is fine,get_network_status()
?Analog-digital converter in machine.ADC
UART in machine.UART
Three hardware UARTs are present in the system: two of them are occupied (service and REPL ports). The third UART may be attached to GPS. Implement software UART?
Traceback (most recent call last):
File "", line 1, in
NotImplementedError: Not implemented yet
Do you plan to implement a standard IP GPS communication protocol to interface the A9G board with a standard GPS tracking server?
Available protocols supported by GPS tracking software Traccar are listed here.
Should this be implemented in C++ or in MicroPython?
Do you know the simplest standard protocol existing?
cellular.SMS.list
cellular.SMS.send
cellular.attach
cellular.activate
cellular.gprs
gps.on
On the A9G board, with s
being a Berkeley socket (import socket; s = socket.socket()
) entering the following commands yields errors:
s.recv(50)
when rx buffer is empty freezes the board, even after a s.settimeout(3)
,s.connect((url, port))
executed twice in a row freezes the board,s
yields <socket>
only.By comparison, behaviors of those commands on an ESP8266 with the latest firmware are:
s.recv(50)
when rx buffer is empty results in an OSError: [Errno 110] ETIMEDOUT
error, after having set s.settimeout(3)
,s.connect((url, port))
executed twice yields an OSError: 106 error
, and the socket remains connected,s
yields <socket state=0 timeout=-1 incoming=0 off=0>
which gives enhanced state of the socket (e.g., to track network errors).Hi,
thanks a lot for your work!
I tried Thonny IDE with your firmware.
REPL works flawlessly, but file upload/download is impossible, returning a lot of errors/exceptions.
If you are interested about fixing this behaviour, I'll be happy to test, if needed (I m afraid I couldn't do much more than that, because I'm a real newbie in python).
Thanks in advance.
I'm trying to update Micropython of this port to the last version.
I encountered this issue Micropython#6065 because of the way that errno is defined on the SDK. @pulkin any thoughts about how to solve this?
The Chinese API works with Chinese cellular operators only. Hack it and port to gps
.
Could you provide an example on how to automatically connect to the APN when booting?
I implemented a loop but often it just won't connect forever.
Make this work:
ampy
commandsvscode
pluginsocket.getaddrinfo
So, I don't really understand what's going on. I don't see anywhere on the code a way to sync the internal RTC to an external time value. This normally is done in mycropython via the ntptime module in this line:
We don't have a machine.RTC() function here like the ESP modules but is definitely possible to do one via https://ai-thinker-open.github.io/GPRS_C_SDK_DOC/en/c-sdk/function-api/timertc.html
What I don't understand is that sometimes it just automatically sync when i do some ntptime request/connect to the internet, don't really now when, and utime.time() start giving me the right value. Sometimes it jus't dont sync and I have to restart the module and keep trying.
If I restart the module, connect and try again and so, it will eventually sync and start giving the same right values of ntptime, and stay like this for a while even if the module is restarted.
Is there already a way to do tell the module to sync or it is necessary to change the modutime or modmachine to have access to TIME_SetRtcTime. Btw, I'm using A9 module, not A9G, so I don't have access to gps.time().
coolwatcher
interaction seems to be broken for a long time (no events being received, for example).
Pulse-width modulation in machine.PWM
Related to #6.
I'm trying to enable 1-Wire support on A9. For that it's necessary to implement Open-Drain GPIO Output somehow by software using SDK GPIO lib, doing something like this: https://embeddedartistry.com/blog/2018/06/11/simulating-open-drain-gpio-in-software/
From what I see, would be necessary to create a way to define a Pin in machine_pin as OpenDrain, to be able to call pin.init(pin.OPEN_DRAIN, pin.PULL_UP) on drivers/onewire/onewire.py. I've stumbled in how to do that, will try further but any help would be appreciated.
ESP8266/ESP32/STM32 are some ports that already support 1-Wire/OpenDrain.
SPI in machine.SPI
First, thanks a lot for this port.
i have a newbie question: Is possible to log gps data to sdcard ?
PM_SleepMode
PM_SetSysMinFreq
Здравствуйте.
Подскажите есть ли возможность полноценно работать с uart 0?
При попытке получить данные с другого устройства я получаю очень странные результаты. Возможно это связана с тем, что там постоянно работает REPL и пытается обрабатывать ввод? Есть ли возможность отключить REPL?
Consider implementing it with SYS_EnterCriticalSection
Currently, time.sleep
cannot be interrupted. Fix it.
Would it be possible to catch the CellularError in the futur?
Currently:
>>> import cellular
>>> try:
... cellular.gprs("not_a_real_apn", "", "")
... except CellularError as e:
... print(e)
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
NameError: name 'CellularError' isn't defined
>>>
Trying to autostart my code when the board starts or resets.
Looks like main.py is executed before the actual board is ready.
I can't find any example or docs for how to make the code autostart.
Remove cellular.gprs_attach
, cellular.gprs_activate
, cellular.gprs_detach
, cellular.gprs_deactivate
in favor of cellular.gprs()
.
Resolve issues with the build system and move MICROPY_*
variables from the Makefile
back to mpconfigport.h
. Enable uhashlib
which causes build failures at this point.
Is it possible to implement something like WebREPL on the A9g but over the GPRS instead of WIFI in the ESP8266. It will allow for sending remote updates to devices over the internet, it will be of great use in many projects. From what I have read a daemon running in the background which forwards the serial REPL through socket must be set. But initially we need to get the GPRS connected of course.
I think I successfully built the firmware despite getting some warnings:
../../py/nlrsetjmp.c: In function ‘nlr_jump’:
../../py/nlrsetjmp.c:41: warning: ‘noreturn’ function does return
../../py/modbuiltins.c: In function ‘mp_builtin_round’:../../py/modbuiltins.c:497: warning: declaration of ‘floor’ shadows a global declaration
/home/vagrant/A9G/micropython/lib/GPRS_C_SDK/include/std_inc/math.h:328: warning: shadowed declaration is here
../../py/modmath.c: In function ‘mp_math_frexp’:../../py/modmath.c:238: warning: declaration of ‘significand’ shadows a global declaration
/home/vagrant/A9G/micropython/lib/GPRS_C_SDK/include/std_inc/math.h:397: warning: shadowed declaration is here
main.c: In function ‘MicroPyTask’:main.c:161: warning: unused variable ‘event’
modcellular.c:636: warning: ‘modcellular_sms_from_raw’ defined but not usedCC modgps.c
AS gchelper.sCC ../../lib/axtls/ssl/asn1.c
../../lib/axtls/ssl/tls1.c: In function ‘add_hmac_digest’:../../lib/axtls/ssl/tls1.c:695: warning: incompatible implicit declaration of built-in function ‘alloca’
../../lib/axtls/ssl/tls1.c: In function ‘send_packet’:
../../lib/axtls/ssl/tls1.c:1177: warning: incompatible implicit declaration of built-in function ‘alloca’
../../lib/axtls/crypto/rsa.c: In function ‘RSA_decrypt’:../../lib/axtls/crypto/rsa.c:150: warning: incompatible implicit declaration of built-in function ‘alloca’
Indeed, in the end, I got BUILD OK
and the two .lod
files got available in the hex
folder.
Than, I believe I successfully burned both .lod
files using coolwatcher
as I didn't observe any error message.
But now, I cannot connect to the MicroPython REPL.
I only observe garbage in the console when running the miniterm.py /dev/ttyUSB1 115200 --raw
command and pressing on the board reset button.
What could be my issue?
Should I connect the serial adapter to other pins than HST_TX
and HST_RX
to access the REPL?
Thks,
There are no csdk
functions available, however, the module seems to support it while elf
/lod
contains hal_Usb*
functions (signatures are here). It would be nice to implement the serial port over USB as a start.
I have noticed that when rebooting the board with Ctrl-D
the watchdog remains on (if set before).
It might be the same with machine.reset()
.
If I remember well, this was also the case on some other MicroPython ports but got fixed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.