meta-udoo icon indicating copy to clipboard operation
meta-udoo copied to clipboard

upload scketch to udooneo not working

Open modjo756 opened this issue 8 years ago • 9 comments

Trying to load sketch from arduino ide (from host pc) over network not working (take long times to upload without errors but nothing change on the card, not update of M4 firmware) . If i'm connect to the card and see /var/log/udoofota-server.log i see this :

root@udooneo:/var/log# cat udoofota-server.log [2016-12-05 22:34:59 UTC] (sys) Starting

it seems to be ok, and on znmap i can see that port 5152 is open. After that i kill the service and restart it. On pc side relaunch the upload of the sketch, after some times i get this error :

root@udooneo:/var/log# udooserver Connection accepted on 5152 port Uploader command received Received fileSize = 110601 Command = udooneo-m4uploader M4_file.fw /usr/bin/udooneo-m4uploader: line 93: 522 Bus error $up "$INPUT" flash: uploading input firmware failed status = 34560 Remote Command [2] done Close connection on 5152 port

And this error in dmesg : Unhandled fault: external abort on non-linefetch (0x1818) at 0x76d4d000

Apparently an error with udooneo-m4uploader. Same procedure tested on udoobuntu2.1.1 give me a good result (upload sketch ok)

modjo756 avatar Dec 06 '16 21:12 modjo756

After some test, it seems that for yocto we need to use udooclient (udoofota) V1.0 and not V1.2 to load the code on the card. this work with the precedent build (kernel 3.14.28 and uboot udoo) but not with the last build

root@udooneo:~# udooserver Connection accepted on 5152 port Uploader command received Received fileSize = 110601 Command = udooneo-m4uploader M4_file.fw UDOONeo - Failed to Start M4 sketch: reboot system ! flash: uploading input firmware failed status = 768 Remote Command [2] done Close connection on 5152 port

modjo756 avatar Dec 07 '16 10:12 modjo756

Did you move forward to the last commits of both udoofota and m4uploader?

cyrilfr avatar Dec 08 '16 07:12 cyrilfr

yes you are right, we use an older version of this files ... I will update it and try a new build !

modjo756 avatar Dec 08 '16 08:12 modjo756

After a test (change SRCREV in .bb to lasted rev), we can use udooclientV1.2 but we yet have an error on the card : root@udooneo:~# udooserver Listening connections on port 5152 Connection accepted on port 5152 bytesReceived = 13 Uploader command received Received end of file Received fileSize = 110548 Command = udooneo-m4uploader M4_file.fw /usr/bin/udooneo-m4uploader: line 93: 444 Bus error $up "$INPUT" flash: uploading input firmware failed statusUploader = 135 Remote Command [2] done bytesReceived = 21 GET_M4_STATUS received Remote Command [3] done bytesReceived = 0 Closed connection on port 5152

and this on arduino ide :

Address: xxx.xxx.xxx.xxx Port: 5152 UDOONeo 110548 bytes sent UDOONeo Something went wrong: -121 - Try uploading again.

perhaps @fmntf can help us on it ...

modjo756 avatar Dec 08 '16 10:12 modjo756

Hi; don't know.. that script should not be used. I directly use mqx_upload_on_m4SoloX. In fact, in Android there is only mqx_upload_on_m4SoloX and not udooneo-m4uploader.

fmntf avatar Dec 09 '16 09:12 fmntf

@graugans , how we can modify the layer to use mqx_upload_on_m4SoloX instead of udooneo_m4uploader ?

modjo756 avatar Dec 09 '16 13:12 modjo756

In udooserver.c M4_FIRMWARE_RECEIVED_FILE should become /var/opt/m4/m4last.fw. Then mqx_upload_on_m4SoloX can be symlinked to udooneo-m4uploader, so the script will not be present at all in the rootfs.

That's how it is implemented on Android, by direct suggestion of the original mqx_upload_on_m4SoloX authors from Seco.

fmntf avatar Dec 09 '16 13:12 fmntf

make a patch to change M4_FIRMWARE_RECEIVED_FILE and works perfect ! i need to make some change before to pull the patch and close the issue. Thanks for your help fmntf

modjo756 avatar Dec 09 '16 17:12 modjo756

Add a pull request to correct this issue. Only one problem persist. At first boot we have the same error but after a reset we can upload the sketch ... perhaps a problem with the init script ?

modjo756 avatar Dec 09 '16 23:12 modjo756