First question : How Hackaday.io works ?

Our aim : Developing an app. with Eclipse on Linux and transferring it on the dev. board.


Linkit One is made for windows and ArduinoIDE. For consequent project, it is better to use Eclipse. For an other development board from Mediatek with the same main chip (ARM MT2502AV), Mediatek provides a plugin for Eclipse called "Linkit Assist 2502". But everything remains fuzzy and obscur...


If you go on the web, you can find some informations, it was mine:

http://www.instructables.com/id/Using-LinkIt-One-with-Arduino-in-Linux/?ALLSTEPS

http://www.instructables.com/id/Programming-LinkIt-One-in-Linux-no-WiNE/?ALLSTEPS

An own compilation report on my machine, but it doesn't matter, only the process in interesting: http://www.seeedstudio.com/forum/viewtopic.php?f=71&t=6616

http://www.github.com/v-i-s-h/LinkIt-One-Linux-Arduino-Support-

https://github.com/Seeed-Studio/Lua_for_RePhone/tree/master/tools


Summary:

  1. Linkit One and Serial
  2. Compilation process
  3. Eclipse Configuration
  4. Board configuration and transfer

I ] Linkit One and Serial

The dev. board has a boot process. First, it start a serial connection which is used to "flash" a new bootloader for example, with the "firmware updater" tool from Mediatek. We won't use it here, but anyway, for information it sends to linux things. This state is only during two or three seconds. With lsusb, it is recognised as:

$ lsusb
Bus 001 Device 009: ID 0e8d:0003 MediaTek Inc. MT6227 phone

It creates a serial port:

$ ls -lisah /dev/*ttyU*
844532 0 crw-rw---- 1 root dialout 188, 0 avril 18 14:36 /dev/ttyUSB0
And it sends through:
BUF2!F1
or in hex format:
42 55 46 32 21 46 31

Right after, it closes the connection. If the dev. board has its switch set on "UART" (and not on "MS" (mass-storage)), it opens two other serial ports.

On "UART" mode, and with lsusb, the device is recognised as:

$ lsusb
Bus 001 Device 020: ID 0e8d:0023 MediaTek Inc. S103

It creates two serial ports:

$ ls -lisah /dev/*ttyA*
835018 0 crw-rw---- 1 root dialout 166, 0 avril 18 14:32 /dev/ttyACM0
835019 0 crw-rw---- 1 root dialout 166, 1 avril 18 14:32 /dev/ttyACM1
Some time (mostly), we can interact with the first, and the second sends a kind of report with the time. Other time but more rarely, it is the opposite.

So, what are the interactions ?

When the dev. board start, it send on the serial port (often ACM0) what it does. First things we can see are the ATE1 and E0. The board works with AT commands. It we don't do anything, we can read:

ATE1 E0
OK
ERROR
+CGMM: MTK2
OK
OK
OK
OK
OK
+GCAP: +FCLASS, +CGSM
MTK2
MAUI.11CW1418SP5.W15.19
+CGMM: MTK2
OK
I want to note first that the E command is the Echo command. 0 resets and 1 sets it. At the boot-process, it sets and resets the echo. It means, everything we send is not see any more and the boot process don't show the command. If quickly during the boot process we write ate1 again (it isn't case sensitive), (and again because it writes automatically ate0...) it shows the command again. we can see:
AaTE1t Ee01ATE1 E0a
ERROR
OK
AT%IPSYS?AT%IPSYS?
ERROR
AT+CGMM
+CGMM: MTK2
OK
AT+GMM
+CGMM: MTK2
ATE0
OK
OK
ATI
MTK2
MAUI.11CW1418SP5.W15.19
OK
ATE0
OK
ATV1
OK
AT+CMEE=
OK
ATX4
OK
AT&C1ATE0
MTK2
MAUI.11CW1418SP5.W15.19
OK
ATX4AT&C1ATE0
+CGDCONT: (1),"IP",,,(0),(0)
OK
+CFUN: 1
OK
+CME ERROR: 10
I note some command and find no much significations:
AT A ???
B/C don't exist.
D ???
E 0-1 : Set or reset the Echo function.
F/G don't exist.
H 0-1
I no option : show the informations
J/K don't exist
L 0-1-2-3 ???
M 0-1-2 ???
N doesn't exist.
O ???
P no option : ???
Q 0-1 : Disable all returns and echo. I don't recommend. Way-out Z.
R/S/T/U don't exist.
V 0-1 : ???
W 2 : ???
X 0-1-2-3-4 : ???
Y doesn't exist.
Z 0-1 : Disable return code (not...
Read more »