Wio LTE (4G) / I2C_LED Display

Hello,



I want to get the I2C_LED Display working with the Wio LTE 4G Cat.1 (EU version). According to the specifications this should be possible, even if the standard libraries do not directly support the board.



I am a total newbie when in comes to program with Arduino IDE and Grove products, just as I have no knowledge about using the I2C interface. Therefore I’m glad about any help or tips how to get this running.



What I have done / tried so far:

[list]

  • [*]set up the driver etc. for Windows 10 like described here and here
  • [*]flashed the Wio LTE board to the latest firmware v1.99 like described [url=http://wiki.seeedstudio.com/Wio_LTE_Cat.1/#update-firmware]here[/url]
  • [*]set up the Arduino development environment like described [url=http://wiki.seeedstudio.com/Wio_LTE_Cat.1/#play-with-arduino]here[/url]
  • [/list]

    Played a little bit with the example sketches (battery status, send sms etc.) - so far everything works well.



    After that i connected the I2C_LED Display with the Grove cable to the I2C pin on the Wio LTE board and loaded the example libraries for the display from <LINK_TEXT text=“https://github.com/SparkingStudio/I2C_L … /resources”>https://github.com/SparkingStudio/I2C_LCD/tree/master/resources</LINK_TEXT> and loaded the HelloWorld example into Ardunino IDE.



    To set up power for the I2C port I also incuded the <WioLTEforArduino.h>, initialized it within the void setup procedure and set the power to ON with Wio.PowerSupplyGrove(true); as you can see in the code:

    [code]#include <Wire.h>
    #include <I2C_LCD.h>
    #include <WioLTEforArduino.h>
    I2C_LCD LCD;
    WioLTE Wio;
    uint8_t I2C_LCD_ADDRESS = 0x51; //Device address configuration, the default value is 0x51.

    //For detials of the function useage, please refer to “I2C_LCD User Manual”.
    //You can download the “I2C_LCD User Manual” from I2C_LCD WIKI page: http://www.seeedstudio.com/wiki/I2C_LCD

    void setup(void)
    {
    delay(200);
    SerialUSB.println("### I/O Initialize.");
    Wio.Init();
    SerialUSB.println("### Power supply ON.");
    Wio.PowerSupplyGrove(true);
    delay(500);

    Wire.begin();         //I2C controller initialization.
    
    SerialUSB.println("### Setup completed.");
    

    }

    void loop(void)
    {
    SerialUSB.println("# debug 1");
    LCD.CleanAll(WHITE); //Clean the screen with black or white.
    delay(1000); //Delay for 1s.

    SerialUSB.println("# debug 2");
    //8*16 font size auto new line black character on white back ground.
    LCD.FontModeConf(Font_6x8, FM_ANL_AAA, BLACK_BAC); 
    
    SerialUSB.println("# debug 3");
    LCD.CharGotoXY(0,0);       //Set the start coordinate.
    LCD.print("Hello World!");  //Display "Hello World!" on coordinate of (0, 10).
    
    while(1);//Wait for ever. 
    

    }[/code]

    The sketch compiles without errors and after uploading it and resetting the board i have the following output on the serial monitor:
    [code]### I/O Initialize.

    Power supply ON.

    Setup completed.

    debug 1

    debug 2

    debug 3[/code]

    But nothing on the display.



    I have checked if the I2C interface even gets powered up by measuring the GND an 5V pins on the display and i get 3.3V of current which i think means that this can’t be the problem. Next thought was about the definition of the I2C-address (line 6 in the code):

    </s>uint8_t I2C_LCD_ADDRESS = 0x51; //Device address configuration, the default value is 0x51.<e>

    can someone confirm that this is correct?



    Otherwise I have no idea how to continue - will be thankful for any help provided :slight_smile:



    Best regards

    Patrick

    So, got it running after reading up a little bit about all this I2C stuff:



    Problem



    The Wio LTE board delivers like I mentioned before 3.3V on the I2C bus, but the I2C_LED display needs at least something about 4.5V to 5V to function.



    Solution



    I cut the red and black wires on the Grove cable, connected the red wire which leads to the display to the positive connector on an external power source with 4.5V.



    Important: make sure that it is the red wire which is connected to the display and not the one which is connected to the Wio LTE board. Otherwise this may kill the board.



    Then I connected the black wire which comes from the Wio LTE board, the black wire which leads to the display to the negative of the external power source.



    That’s it - the sketch posted above runs perfectly fine and the display shows “Hello World!”.

    Hi, thanks for the sharing. The wio lte Grove interfaces power with 3.3v. If we use any 5v devices(such as rgb lcd), we have to use the external power supply. we also have to share the GND between external power supply/wio lte/grove modules. thanks.



    Seeed techsupport team

    Bill

    Hi i saw you managed to program the LTE version , can you post a working sample for arduino ide that is able to connect to lte with a sim protected with a pin and the support for apn ?
    thank’s

    Hey,

    it’s roughly three years ago since I had my hands on the WIO board so I currently do not have any working code ready but I might have time on the weekend to check if I have still something in my repositories.

    If you are stuck because of the PIN protection you should be able to disable the PIN on the SIM by putting it in a mobile and check the SIM card settings there I think. If you disable the PIN protection on the phone it should also be disabled on the board because this settings are usually stored on the SIM card itself.

    I will come back at you on sunday after I’ve ckecked if I have some leftover code laying around somewhere.

    Greetings
    Patrick

    Hi , have you got a chance to find some code?

    Hey,

    unfortunately I don’t have any proper code anymore. But I had a look into the “TCPConnect” example provided by seeed (https://wiki.seeedstudio.com/Wio_LTE_Cat.1/#play-with-arduino).

    If I try the code example as it is with a SIM card with PIN protection I don’t get behind the “Accessing network…” status which is looping endless because there is no PIN authentication implemented by default, if I disabled the PIN protection on the SIM (like described before) it works fine.

    In my case I had to set the APN to “internet” but this depends on the provider. You can figure it out by putting the SIM in your phone and check the mobile connection settings after you are connected to the network.

    To use a SIM with PIN protection you have to add an additional AT command to unlock the SIM before the initialization is started:

    // Unlock SIM with PIN, replace "1234" with your actual PIN
    check_with_cmd("AT+CPIN=1234\r\n", "", CMD, 1);
    
    // Initialization
    while (!eth.init()) {
        delay(1000);
        SerialUSB.println("Accessing network...");
    }
    

    Be careful with this code because there is no protection to not enter your PIN wrong three times which will lead into a blocked SIM (best have your PUK code ready…).

    The whole script:

    #include "ethernet.h"
    
    Ethernet eth = Ethernet();
    
    // APN setting here
    const char apn[25] = "internet";
    
    const char URL[100] = "google.com";
    char http_cmd[100] = "HEAD / HTTP/1.0\r\n\r\n";
    
    int port = 80;
    int ret = 0;
    
    void setup() {
    
        // Power up the modem...
        SerialUSB.println("Begin...");
        eth.Power_On();
        while (false == eth.Check_If_Power_On()) {
            SerialUSB.println("Waitting for module to alvie...");
            delay(1000);
        }
    
        // Unlock SIM with PIN, replace "1234" with your actual PIN
        check_with_cmd("AT+CPIN=1234\r\n", "", CMD, 1);
    
        // Initialization
        while (!eth.init()) {
            delay(1000);
            SerialUSB.println("Accessing network...");
        }
    
        SerialUSB.println("Initialize done...");
    
        eth.join(apn);
        SerialUSB.print("\n\rIP: ");
        SerialUSB.print(eth.ip_string);
    
        if (eth.connect(URL, port, TCP)) {
            eth.write(http_cmd);
            while (MODULE_PORT.available()) {
                serialDebug.write(MODULE_PORT.read());
            }
            eth.close(1);
        } else {
            SerialUSB.println("Connect Error!");
        }
    
    }
    
    void loop() {
        /* Debug */
        AT_bypass();
    }
    

    If everything works you should get a result similar to if you check the serial port monitor:

    Waitting for module to alvie...
    Waitting for module to alvie...
    Waitting for module to alvie...
    
    
    
    
    Initialize done...
    
    
    
    
    IP: ##.###.169.137
    
    
    
    
    +QIURC: "recv",0,567
    HTTP/1.0 200 OK
    Content-Type: text/html; charset=ISO-8859-1
    P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info."
    Date: Wed, 12 May 2021 11:47:31 GMT
    Server: gws
    X-XSS-Protection: 0
    X-Frame-Options: SAMEORIGIN
    Expires: Wed, 12 May 2021 11:47:31 GMT
    Cache-Control: private
    Set-Cookie: NID=215=jzLvl3caiiscRCOzG-hiOitPen5gDJiSSQkLDsolhYQd_YAQDyt8X59HnUsawFJsNhO1zfQsLSWGUFagE1j9vyOkH4Oyo_cU2JpF5NPs9hA_Ssfp45O_Sgh2N0tendcGNF3kKGt89U2pR7Y2b0DMEmUNFfFu8ntdCfwz6azTE8Q; expires=Thu, 11-Nov-2021 11:47:31 GMT; path=/; domain=.google.com; HttpOnly
    
    
    
    +QIURC: "closed",0
    

    I hope this helps you!

    Greetings
    Patrick

    Hi , thank you very much for the example!
    just a question: is a strange thing we need to use an ethernet library to connect to a lte network…i’m using arduino boards and they divide what is 3G/4G connection between classic rj45 ethernet or wifi connection…but anyway if seeedstudio develop like this no problem :wink:

    Yep, that’s what i thought too. Probably it was just called that because no better term came to mind :smiley:

    One more thing which might be helpful here is this freeware (actually not a freeware but 7 day trial and only 10 $ to buy) to test cellular commands via serial port https://m2msupport.net/m2msupport/atcpin-enter-pin/

    Haven’t tried it because it’s only available on Windows and I don’t have a Windows machine on hand atm but it looks interesting and there are a lot of the AT commands and the response codes explained and documented.

    yes i know it , i’m using U-blox m-center which is free and i think 99% of the AT command are standard

    Actually, The link you provided for Update firmware [Here]([quote=“p.euerle, post:1, topic:5851”] http://wiki.seeedstudio.com/Wio_LTE_Cat.1/#update-firmware [/quote]) which is the main wiki for Wio LTE does not contain information about how to update the firmware.

    This information is needed, but not provided. The firmware provided on the Seeed WIO LTE for Quectel EC21 is out of date and buggy (quite a few AT Codes do not work as documented)

    By the way there are two firmwares, and both of them need to be updated.

    1. Firmware for the SAMD51
    2. Firmware for the Quectel Modem. The firmware update can be obtained from Quectel support forum, but Users of WIO LTE Need instructions on how to set up the USB Port reserved to allow the update procedure to work, and how to reset the uSB Port afterward so it can be used for debugging and DFU modes.

    Hey,

    jep, seems like they have edited this page in the last three years sometime…

    If you check this readme in the WIO LTE repository from seeed there is a basic description about how to upgrade the firmware: https://github.com/SeeedDocument/Wio_LTE#software-updates

    I’m not sure if it’s a good idea to use the firmware provided by the hardware manufacturers instead of the published firmware from seeed provided here: http://www.espruino.com/binaries/ (I think the one to use are the espruino_#v##_Wio_LTE.bin ones, the latest seems to be espruino_2v09_Wio_LTE.bin, uploaded 2021-04-19)

    Hope this helps you a bit

    Edit: nearly forgot that back then I created an issue regarding to the firmware flashing process, there is a litte bit more information about how I was able to set the board in DFU mode on a Windows PC: https://github.com/SeeedDocument/Wio_LTE/issues/1

    1 Like

    That looks good for the SAMD51 firmware, and the version dated 2021-04-19 is more recent than the manufacturing date of my Board (2020-04-30), so its likely to be worthwhile to update.

    Seed likely remove the link to that information because Espruino is no longer available. So they threw out the baby with the bath water. Who knows how Seeed think ?

    Unfortunately that doesn’t help with update of the Quectel Modem. Which also has updated firmware available, and I have myself found a few bugs with it. As mentioned, I see a possible pathway to loading it (and the Quectel support guy informed me that I have to “reserve” the USB Port. for this task…). I will wait to see if someone else can help on this count.

    The trick with the Boot + Reset button is now well enough known that someone else told me about that one, and I use it regularly.

    Thanks for your help , and thanks to you I am one step closer.

    Cheers

    There are snippets of information available.
    Here is a document link from Quectel on how to download and install firmware update over the air (DFOTA). It is applicable to the EC21 modem.
    Quectel Procedure Document Link

    Unfortunately, Quectel themselves do not provide an FTP/HTTP server on which to host the file. They just send it to you via Email. And my problems is that the darned modem does not work properly anyway, so getting it to go online via 4G is a distant goal, not an established possibility. It is WHY I need to do the update.

    I think you found a possibility there, the DFOTA method should work I think. If you don’t have a web or ftp server on hand I can help out on that or you also should be able to use a free github account for that purpose.

    And my problems is that the darned modem does not work properly anyway, so getting it to go online via 4G is a distant goal, not an established possibility. It is WHY I need to do the update.

    Does this mean that you are not able to get a connection up running at all?

    I also searched a bit about the Quectel modem, bit annoying that all their which can be downloaded only available to “Premium Users”…

    I found this PDF which offers a bit of information about how to update the firmware via USB: QuectelEC2526EC2126EC2020R20QFlashLinux26AndroidUserGuideV10.770967582.zip (782.4 KB) (can not upload a PDF so it’s a *.zip…).

    Seems like there are USB drivers and a tool needed, maybe the guy who sent you the firmware could give you access to those. Still not sure if or how it’s possible to set the WIO board in a mode to actually get the needed USB access to the EC21 and this method seems to be far more complicated than the DFOTA method.

    Well so far I am still waiting for a response from quectel that exceeds one line. Actually I am still waiting for the firmware and the windows tool to load it.
    I will look at that first, including study any instructions it comes with to see if I am any the wiser.

    Thanks for your offer re FTP server, the GitHub idea looks good, but I will need to establish a repository just for that purpose. And go through the entering of AT commands by hand one at a time…

    It’s looking a bit hard for my feeble brain to handle just at the moment.
    It’s a lot to go through to upload just one miserable file once and never again. Which is why loading it via USB is best if it can be made to work.

    This all makes me wonder how other seeed Wio lte customers got on ? Is it just me ?

    Good still hunting….
    Cheers

    Jep, that makes sense.

    Kind of understand your point here, on the other hand for me it’s a two minute thing to put the firmware file on a public available web / ftp server or a repo and leave it there forever, so don’t hesitate to ask for it :slight_smile:

    I believe there are not much people which use the WIO LTE module for more than tinkering around anyway. And to be honest if I would take a look in some microcontroller / LTE / GPS project today I would propably choose another platform since there a lot more available today which have better support and a bigger community (like Arduino with some heads etc.) but here we are :smiley:

    I thought that too, until I went looking for one. A few I found had gone out of production.
    What I am looking for is a low power (ie SAMD21/51) 4G radio. I do not need the GPS, as I have a better one (the Neo M8U). already, and the firmware is already integrated for that one.
    Its for adding on to a project that has only WiFi at this stage, and I need to be mobile. [ Please do not mention the words Lora or LTE Cat M1/NB1 to me (!) ]
    Can suggest ?

    I recently heard about Sixfab (https://sixfab.com/), they mainly concentrate on rapsberry pi hats, don’t know if that would fit your need, but they offer a lot of information in their docs.

    If you are not on a raspberry the Base HAT (https://sixfab.com/product/raspberry-pi-base-hat-3g-4g-lte-minipcie-cards/) can be used by micro USB instead of the GPIO pins (feature no. 7) and you can choose between different PCIe modules (https://sixfab.com/product-category/cellular-modems/) which is a nice feature in my opinion. Overall their solutions seem much more thought through to me but I haven’t used them so far.

    Ok. It looks like a good unit but the power consumption would warm your hands on a cold night.

    Of course you are unaware of my use case.

    The modem I am looking for is an add-on to my Smart Citizen Station
    Smart Citizen found here.
    Broadly this is a MCU system based on Samd21 low power tech. Not a raspberry in sight. Mine will be outdoor portable running on solar power with a battery so low power consumption is essential.
    4G generally is not known for its low power consumption (the Wio lte draws 700mA when it’s running) but mine will run at most 10 seconds every 5 mins when it needs to send a bunch of readings. The frequency can be varied if consumption gets too high.
    I have also looked at both Lora and LTE Cat M1/NB1 that are attractive from a power consumption viewpoint; but from a practical standpoint they have issues in Taiwan. I can look at them later.
    Really I have only limited time and my game is about integrating sensors not developing modem software. The seeed Wio lte offered the Arduino library making it easy (or so I thought)

    I did look at a few of the mini pcie modems but they all need a base hat to run …