Yusuf Goren

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • in reply to: Mdot pinout – associate and on/sleep #11822
    Yusuf Goren
    Participant

    Mike,

    Thanks a lot for the prompt reply, I got it now!

    Thanks,
    Yusuf

    in reply to: Mdot pinout – associate and on/sleep #11820
    Yusuf Goren
    Participant

    Dear Neil, Mike,

    Here is what I understand from mBed page
    (1) Pins 21-23 is for RF antenna only.
    (2) Pins 24-31 is for programming purpose only (i.e. I cannot use them for bus/IO operations in development).
    (3) Pin 1 is reserved for VIN, Pin 5 for reset, Pin 10 for ground, and Pin 12 for wake-up interrupt while Pin 8 and 14 are not connected (hence all these are out in development).
    (4) Any pin not mentioned above can be used as digital/analog IO.

    Could you tell if these are correct? Am I missing/overstating anything?

    Thanks a lot,
    Yusuf

    in reply to: Offline SDK build problems #11276
    Yusuf Goren
    Participant

    Mike,

    Found the problem! I was using 2015q4 for GCC ARM Embedded and now it compiles perfectly with 2015q3. Sorry about the trouble.

    Thanks,
    Yusuf

    • This reply was modified 8 years, 10 months ago by Yusuf Goren.
    in reply to: Offline SDK build problems #11271
    Yusuf Goren
    Participant

    Mike,

    First, I have tried to compile the mbed libraries using the arm-none-gcc that comes with Ubuntu, but that didn’t work (that was when I had to sudo the command). Then I downloaded the GCC ARM Embedded compiler that you linked on the Wiki page, but I forgot to remove sudo from the command. But after your comment on how sudo shouldn’t be required, I removed the whole git library, recloned it and recompiled without sudo and it worked.

    Let me recap my final setup with the toolchain: I have the GCC ARM Embedded toolchain from
    https://launchpad.net/gcc-arm-embedded
    that is located in /home/yugoren/bin/arm-none-eabi-2015q4/, the settings file (workspace_tools/private_settings.py) reads

    
    GCC_ARM_PATH = "/home/yugoren/bin/arm-none-eabi-2015q4/bin"
    

    The build using

    
    python workspace_tools/build.py -m MTS_MDOT_F411RE -t GCC_ARM -c -j 0 --rtos
    

    is successful (with Build successes: * GCC_ARM::MTS_MDOT_F411RE) but the make for the project using

    
    python workspace_tools/make.py -m MTS_MDOT_F411RE -t GCC_ARM -c -j 0 --rtos --source=/home/yugoren/OEA/git/multitech/mdot/ --build=/home/yugoren/OEA/git/multitech/mbed/build/loraTest/
    

    fails with the error message

    
    main.cpp:(.text.startup.main+0x28): undefined reference to "mDot::getId[abi:cxx11]()"
    main.cpp:(.text.startup.main+0x8c): undefined reference to "mDot::setNetworkName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)"
    main.cpp:(.text.startup.main+0xaa): undefined reference to "mDot::setNetworkPassphrase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)"
    main.cpp:(.text.startup.main+0x12a): undefined reference to "mDot::getReturnCodeString[abi:cxx11](long const&)"
    main.cpp:(.text.startup.main+0x1c0): undefined reference to "mDot::getReturnCodeString[abi:cxx11](long const&)"
    main.cpp:(.text.startup.main+0x240): undefined reference to "mDot::getReturnCodeString[abi:cxx11](long const&)"
    main.cpp:(.text.startup.main+0x26c): undefined reference to "mDot::getReturnCodeString[abi:cxx11](long const&)"
    main.cpp:(.text.startup.main+0x298): undefined reference to "mDot::getReturnCodeString[abi:cxx11](long const&)"
    /home/yugoren/OEA/git/multitech/mbed/build/loraTest/./main.o:main.cpp:(.text.startup.main+0x2c4): more undefined references to "mDot::getReturnCodeString[abi:cxx11](long const&)" follow
    

    Thanks a lot,
    Yusuf

    in reply to: Offline SDK build problems #11264
    Yusuf Goren
    Participant

    Mike,

    1,2) Yes I did the build following the git page for mbed. I bumped into a problem with the private settings first time I was running build.py, that’s why I had used sudo all over the place.

    Now I recloned the git library (mbedmicro/mbed), recompiled with build.py, and remake with make.py and I have still the same errors.

    ls -lR in the source directory yields

    
    /home/yugoren/OEA/git/multitech/mdot/:
    total 376
    -rw-rw-r-- 1 yugoren yugoren 338038 Sep  9 12:08 libmDot-0.0.9-1-ge7286ba-GCC_ARM.a
    -rw-rw-r-- 1 yugoren yugoren   4380 Jan 22 10:25 main.cpp
    -rw-rw-r-- 1 yugoren yugoren  29792 Sep  9 12:07 mDot.h
    drwxrwxr-x 2 yugoren yugoren   4096 Jan 22 10:00 MTS-Utils
    
    /home/yugoren/OEA/git/multitech/mdot/MTS-Utils:
    total 20
    -rw-rw-r-- 1 yugoren yugoren 5997 Sep  9 12:07 MTSCircularBuffer.h
    -rw-rw-r-- 1 yugoren yugoren 3465 Sep  9 12:07 MTSLog.h
    -rw-rw-r-- 1 yugoren yugoren 3104 Sep  9 12:07 MTSText.h
    -rw-rw-r-- 1 yugoren yugoren 1049 Sep  9 12:07 Utils.h
    

    Thanks a lot,
    Yusuf

    in reply to: Offline SDK build problems #11249
    Yusuf Goren
    Participant

    Mike,

    Here’s the `main.cpp’ file. It’s the LoRa Connect Example code here:
    https://developer.mbed.org/teams/MultiTech/code/mDot_LoRa_Connect_Example/

    
    #include "mbed.h"
    #include "mDot.h"
    #include "MTSLog.h"
    #include <string>
    #include <vector>
    #include <algorithm>
    
    // these options must match the settings on your Conduit
    // uncomment the following lines and edit their values to match your configuration
    static std::string config_network_name = "oeacnetw";
    static std::string config_network_pass = "oeacnetw";
    static uint8_t config_frequency_sub_band = 7;
    
    int main() {
        int32_t ret;
        mDot* dot;
        std::vector<uint8_t> data;
        std::string data_str = "hello!";
        
        // get a mDot handle
        dot = mDot::getInstance();
        
        // print library version information
        logInfo("version: %s", dot->getId().c_str());
    
        //*******************************************
        // configuration
        //*******************************************
        // reset to default config so we know what state we're in
        dot->resetConfig();
        
        dot->setLogLevel(mts::MTSLog::INFO_LEVEL);
    
        // set up the mDot with our network information: frequency sub band, network name, and network password
        // these can all be saved in NVM so they don't need to be set every time - see mDot::saveConfig()
        
        // frequency sub band is only applicable in the 915 (US) frequency band
        // if using a MultiTech Conduit gateway, use the same sub band as your Conduit (1-8) - the mDot will use the 8 channels in that sub band
        // if using a gateway that supports all 64 channels, use sub band 0 - the mDot will use all 64 channels
        logInfo("setting frequency sub band");
        if ((ret = dot->setFrequencySubBand(config_frequency_sub_band)) != mDot::MDOT_OK) {
            logError("failed to set frequency sub band %d:%s", ret, mDot::getReturnCodeString(ret).c_str());
        }
        
        logInfo("setting network name");
        if ((ret = dot->setNetworkName(config_network_name)) != mDot::MDOT_OK) {
            logError("failed to set network name %d:%s", ret, mDot::getReturnCodeString(ret).c_str());
        }
        
        logInfo("setting network password");
        if ((ret = dot->setNetworkPassphrase(config_network_pass)) != mDot::MDOT_OK) {
            logError("failed to set network password %d:%s", ret, mDot::getReturnCodeString(ret).c_str());
        }
        
        // a higher spreading factor allows for longer range but lower throughput
        // in the 915 (US) frequency band, spreading factors 7 - 10 are available
        // in the 868 (EU) frequency band, spreading factors 7 - 12 are available
        logInfo("setting TX spreading factor");
        if ((ret = dot->setTxDataRate(mDot::SF_10)) != mDot::MDOT_OK) {
            logError("failed to set TX datarate %d:%s", ret, mDot::getReturnCodeString(ret).c_str());
        }
        
        // request receive confirmation of packets from the gateway
        logInfo("enabling ACKs");
        if ((ret = dot->setAck(1)) != mDot::MDOT_OK) {
            logError("failed to enable ACKs %d:%s", ret, mDot::getReturnCodeString(ret).c_str());
        }
        
        // save this configuration to the mDot's NVM
        logInfo("saving config");
        if (! dot->saveConfig()) {
            logError("failed to save configuration");
        }
        //*******************************************
        // end of configuration
        //*******************************************
    
        // attempt to join the network
        logInfo("joining network");
        while ((ret = dot->joinNetwork()) != mDot::MDOT_OK) {
            logError("failed to join network %d:%s", ret, mDot::getReturnCodeString(ret).c_str());
            // in the 868 (EU) frequency band, we need to wait until another channel is available before transmitting again
            osDelay(std::max((uint32_t)1000, (uint32_t)dot->getNextTxMs()));
        }
    
        // format data for sending to the gateway
        for (std::string::iterator it = data_str.begin(); it != data_str.end(); it++)
            data.push_back((uint8_t) *it);
    
        while (true) {
            // send the data to the gateway
            if ((ret = dot->send(data)) != mDot::MDOT_OK) {
                logError("failed to send", ret, mDot::getReturnCodeString(ret).c_str());
            } else {
                logInfo("successfully sent data to gateway");
            }
    
            // in the 868 (EU) frequency band, we need to wait until another channel is available before transmitting again
            osDelay(std::max((uint32_t)5000, (uint32_t)dot->getNextTxMs()));
        }
    
        return 0;
    }
    

    Thanks,
    Yusuf

    • This reply was modified 8 years, 10 months ago by Yusuf Goren.
    in reply to: Offline SDK build problems #11247
    Yusuf Goren
    Participant

    Mike,

    I did downloaded libmDot-0.0.9-1 (270) from the developer page and that’s where main.cpp lives. Just to make sure, my directory tree looks like this

    
    /home/yugoren/OEA/git/multitech/mdot
    ├── libmDot-0.0.9-1-ge7286ba-GCC_ARM.a
    ├── main.cpp
    ├── mDot.h
    └── MTS-Utils
        ├── MTSCircularBuffer.h
        ├── MTSLog.h
        ├── MTSText.h
        └── Utils.h
    

    I have also tried renaming the archive to `libmDot.a’ with no avail.

    Thanks,
    Yusuf

    in reply to: Offline SDK build problems #11240
    Yusuf Goren
    Participant

    I’m having some related (I think) problems with offline builds.

    I have followed all the steps in the Wiki page, but when I want to build my own project (which is nothing but the LoRa Connect example) I get the following error:

    main.cpp:(.text.startup.main+0x18): undefined reference to "mDot::getId[abi:cxx11]()"
    main.cpp:(.text.startup.main+0x7e): undefined reference to "mDot::setNetworkName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)"
    main.cpp:(.text.startup.main+0x9c): undefined reference to "mDot::setNetworkPassphrase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)"
    main.cpp:(.text.startup.main+0x132): undefined reference to "mDot::getReturnCodeString[abi:cxx11](long const&)"
    main.cpp:(.text.startup.main+0x20e): undefined reference to "mDot::getReturnCodeString[abi:cxx11](long const&)"
    main.cpp:(.text.startup.main+0x272): undefined reference to "mDot::getReturnCodeString[abi:cxx11](long const&)"
    main.cpp:(.text.startup.main+0x29c): undefined reference to "mDot::getReturnCodeString[abi:cxx11](long const&)"
    main.cpp:(.text.startup.main+0x2c6): undefined reference to "mDot::getReturnCodeString[abi:cxx11](long const&)"

    I have the production library from the developer site and I’m invoking the build as
    sudo python workspace_tools/make.py -m MTS_MDOT_F411RE -t GCC_ARM -c -j 0 --rtos --source=/home/yugoren/OEA/git/multitech/mdot/ --build=/home/yugoren/OEA/git/multitech/mbed/build/loraTest/

    Could you tell me why the code is not compiling?

    Thanks!

Viewing 8 posts - 1 through 8 (of 8 total)