Jar,Jad files downloading with AT^SJDL | Telit Cinterion IoT Developer Community
March 16, 2017 - 8:31am, 5148 views
Hello,
I'm testing at^sjdl command for jar,jad files downloading to module ffs. (Module is BGS5)
I could download files with 2 interface, asc0 and usb. But download time of usb interface is not acceptable. It is too long.
My test results are below:
By using asc0 interface
244923 bytes of jar file downloading takes 27 seconds.
58204 bytes of jar file (obfuscated) downloading takes 5 seconds.
-----
By using usb interface:
244923 bytes of jar file downloading takes 4 minutes 50 seconds.
58204 bytes of jar file (obfuscated) downloading takes 1 minutes 7 seconds.
Why downloading via usb interface is so slow and takes too much time?
What can be the reason?
Best Regards,
Ergün.
Hello,
I have repeated your test with the file of 400162 bytes with the following results:
ASC0: 35 seconds
USB1: 22 seconds
Maybe you have problems with USB cable or the driver or some strange settings or some other problem in the system.
Best regards,
Bartłomiej
Hello Bartlomiej,
Thanks for answer and reproducing the problem.
USB cable works properly. I can download same file with same usb cable by using MES in 17 seconds.(Which takes 4-5 minutes with sjdl command.)
I have tested with another laptop and another module this morning. Results are same.
I have also tested with BGS5T instead of our own board. Results are same.
There is one thing that I haven't been able to test yet is PC Terminal program. One possibility it can cause the problem. I will try to test with another terminal program.
Did you test with BGS5 or any other Java module like EHS5,EHS6 etc?
Hello Bartlomiej,
I have made same test with an other PC Terminal program. It has worked properly.
Maybe some settings need to be changed when using usb connection on previous terminal program. Because it is working properly when using real com port (asc0) but not with usb com port.
With new terminal program, downloading ***** are below:
244923 bytes of jar file download takes 11 seconds via USB
Same file takes 22 seconds via ASC0.(115200 bps)
Thanks,
Best Regards,
So maybe it's the problem of the terminal.
I have tested with BGS5 module with my internal terminal.
Please try HTerm for example - I have also verified with this terminal.
Best regards,
Bartłomiej
Hello Bartlomiej,
I have tested it with HTerm today. It has also worked. It seems problem is related to terminal program.
Thanks for the support.
I have one more question about jar,jad file downloading to the module.
Now, after some search, I discovered there are 2 ways to download jar,jad files to module from a PC without using MES directly. That is, we will write a PC Desktop application software, it will download files to module itself.
1.Using at^sjdl command
2.Using MES commands(MESCopy, MESDel, MESDir etc.)
Is there any other way that I can think as an option? (OTAP excluded. It will be used for further updates.)
Best Regards,
Hello,
So it was only the terminal. Great that it's working.
As for the file system access there's one more command: AT^SFSA.
Regards,
Bartłomiej
Hello Bartlomiej,
Is it possible to load file from pc to module via at^sfsa? Or is this command only for internal operations in ffs?
I tried copy command as below. Only "ERROR" response returned. What can be the reason?
AT^SFSA="copy","D:\abc.txt","A:\abc.txt"
ERROR
Hello,
The "read" and "write" parameters should do the job. In case of "write" after entering the command, the module enters data entry mode and is ready to receive binary data over the serial interface. You need to open the file for writing before.
Regards,
Bartłomiej
Hello Bartlomiej,
Thanks for the answer.
It is written in at command manual that the number of bytes to be written to or read from a file at one cycle with this command is in the range 1-1500 bytes. This means that a file whose size is greater than 1500 bytes, will be downloaded to module partially by executing write/read command for 'n' *****. Let say a file with size 250 kB will be downloaded to module by executing the write command approximately 170 *****. Is this the only way? Is there a way of downloading/reading this kind of large files at one cycle with at^sfsa command?
I noticed that at^sfsa command functions are similar to functions of FileConnection interface at java side. I haven't used this interface yet but I will use. When using FileConnection and InputStream/OutputStream, do you know what is the limit of bytes to be written or read from a file at one cycle? I don't know buffer size of streams and maybe special to write/read operations to a file the limit can be less than buffer size.
Best Regards,
Hello,
It seems that you are right. That's how SFSA works. There's no other way. You can use SJDL instead.
There is a difference because with FileConnection interface you can read and write the files inside the MIDlet unlike with the SFSA command you read and write over the serial interface. The buffers size for serial is about 4kB. But when you write in the MIDlet to the file via the OutputStram you don't use the serial interface. You can create a byte array and pass it to the stream. Theoretically the size of an array is of type integer so you could create that big array. But I don't think that it would be good for performance. Probably the best way would be to test the performance.
Regards,
Bartłomiej
Pages