Any people with iTracker RAK8212 here? #7348
Replies: 1 comment
-
Posted at 2018-09-18 by @gfwilliams Hi, There definitely are some people using RAK8212 - I'm not sure how many are looking/posting on the forum though.
This is just
It'd be great if you could let us know how you get on. There is no NB-IoT coverage here in the UK so I'm unable to test/develop anything :( Posted at 2018-09-24 by Kartman I got caught by this. Drove me crazy for a while until I dug a little deeper. The code turned on gps using AT+QGPS=4. This seems reasonable, but it doesn't work. I changed it to AT+QGPS=1. Seems for mode 4 you need to regularly upload the ephemeris and other data to the module for fast TTFF (time to first fix). Mode 1 is the bog standard mode, so it is a little slow to start up. Other issues I've found are: CREG? works for gsm but for CAT-M1 and CAT-NB1, CEREG? is the command to query if we are connected to the network. Interestingly, I have one BG96 module that works with CREG? and returns 0,1 when online, but two others that report 0,3 which translates to connection refused but CEREG returns 0,1. Somehow it seems GSM is not enabled in two of my modules - I'm not sure how I did this! Note that this was using the same or different SIMs, so not an account/SIM issue. There's some issues with the registered handlers being forgotten - the first http request works, but subsequent ones don't have the data and close handlers called - I see there's some changes to the AT and BG96 modules done recently, so I'll try that today. To configure the BG96 for CAT-M1 and CAT-NB1, do the following: AT+QCFG="nwscanmode",030201 to favour CAT-NB1 first then The commands only need to be sent once - the module remembers these settings. Posted at 2018-09-24 by @gfwilliams Thanks for the update! I've just tweaked the QGPS command as you suggest so new builds should have that fixed. Hopefully the AT library recent changes will help your issues with multiple requests - let me know how it goes! In terms of BG96 setup, how would you suggest we integrate that with the existing module? We could add extra options to @wklenk I'd be really interested to hear your experience with this - did you have code for NB-IoT that you used as well? But once connected to NB-IoT, does the HTTP functionality still work fine? Posted at 2018-09-24 by Kartman Gordon, thanks for the prompt response. As for selecting between CREG and CEREG - from what I've read, CAT-NB1 and CAT-M1 are E-UTRAN, so CEREG caters for those protocols. Maybe add a boolean param to connect() to select. I have a suspicion that the RAK hardware doesn't cope well with the gsm current requirements, so if you're using the RAK8212, then you're only going to be using CAT-NB1 or CAT-M1 methinks. I have a module that randomly shuts down that suggests a power problem and it's the one that works with CREG! Other features that the BG96 has are: Filesystem. It would be nice to have a wrapper around this to read/write files. The BG96 has around 14MB of storage! MQTT. This can be SSL or open. These are variations on the send() and recv() functions. A little quirk I've found annoying and I'm not sure what end is to blame - I'm using a macbook pro with the Chrome webide. Being able to simply connect to the module via bluetooth is brilliant but where it falls down is I'm think when the macbook goes to sleep, the bluetooth connect gets dropped (or at least as far as the ide is concerned as it reports 'disconnected') the trouble comes when you try to reconnect. From what I can gather, the module is not longer broadcasting, so it doesn't get detected and is unable to reconnect. Cycle power/reset and everything is good again. It would be super if something timed out when the connection drops and allows a reconnect. I tried build 204 this afternoon. The http operation seems to be more consistent, however, I need to send a AT+QICLOSE,0 to close the socket. From what I gather, this is supposed to be handled by the QIURC 'closed' callback. Posted at 2018-09-24 by @gfwilliams Thanks - so Good point about the cell changing - it'd def make sense as a method that could be called then. It'd be great if you were able to suggest what might be required. Odd about power - I've only had any luck running the boards directly off a LiPo, but when that's done it has been file.
Not sure what to suggest there - if it's not advertising it's because it thinks it is connected. It sounds like somewhere along the line Mac OS is probably still maintaining a connection but Web Bluetooth thinks it's lost - and I'm afraid all that code in the middle is very much out of my control. I know it's not a great solution but I'd say when you're developing and you want an active connection, maybe just don't let your Mac go to sleep?
Could you post a new issue here with the results of running something when
Or is it the case that Espruino gets a I should add that I have an agreement with RAK Wireless where I maintain the build of Espruino for the RAK8211/8212 - but I'm paid quite a small amount per month for that and it doesn't cover supporting RAK's customers. I'll try to help out and take in any changes you might suggest but I can't afford to offer the same level of support that I would to folks that were buying my own boards. Even so the Posted at 2018-09-25 by Kartman My proposal for selecting between CREG or CEREG is pass a key named 'lte' in options{}. If this is true, use CEREG, else CREG Hopefully I've used the correct javascript idiom for testing to see the key exists or default to false. If not, please correct me after you've stopped laughing. In the connect function:
Posted at 2018-09-25 by @gfwilliams Great - thanks! I'll get that in. Posted at 2018-09-26 by Kartman Gordon, the close issue seems to be sorted now. I see you used a ternary op to select the required string - I'm still a bit slow with the finer points of Javascript. I'm wanting to loop on the CREG/CEREG phase to detect when the module connects but I'm not sure how I would incorporate that into the promise chain - or whether to use a promise chain. My first thought is a finite state machine, but how would I have the callback call the state machine? My initial solution is to have an interval timer call the state machine that issues the command and the callback sets a flag then tells the code to clock the machine . Basically, issue CREG?/CEREG? at a regular interval until the module reports online or we try too many times and error out. The reason being the connect phase is power hungry and is variable so detecting it early is an advantage. The current 30 seconds seems to be either too long or not quite long enough. Posted at 2018-09-26 by @gfwilliams Ahh - yes, Promises can be a bit crazy... You can do something like this (this one just checks BTN1 and resolves if it was pressed when it checked, or times out after a while):
Basically when you do stuff like this you want to return a promise immediately (which you do with Posted at 2018-09-28 by MobiTech Hi Gordon, after updating AT+QGPS=4 -> AT+QGPS=1, the start up time is really slow. And it still throws the error 516 for this time. It is about 3-4 minutes direct at the window. Another question: Do you cut off the GPS data (latitude and longitude) to 5 decimal numbers? And are there reasons for it? More accurency would be nice. Posted at 2018-09-28 by Kartman That's the BG96 and many GPS receivers - it's called 'time to first fix'. You can download ephemeris and other data and load it into the BG96 for faster first fix. Again, error 516 is from the BG96 - it says it hasn't got a fix yet. I'm not sure what the BG96 does once its got a fix then you turn the GPS off then back on again - does it have to wait for a first fix or is it near immediate? Something I'll try in the next few days. Posted at 2018-09-28 by MobiTech AT+GPS=4 did not work for me as well. But I "only" waited 10 minutes. So you are right, your fix shows at least some data. Reading the documentation I found this: "The command is used to turn on GNSS function. Currently it only supports turning on GNSS in Stand-alone mode (that is, =1)" Posted at 2018-09-28 by @gfwilliams As @KarTmaN says I think that is to be expected. I don't limit the decimal places of GPS data, so I guess that's just what you're getting from the BG96 Posted at 2018-09-28 by Kartman AT+QGPSLOC=1 gives more precision methinks. Depends how you want the data. Posted at 2018-09-28 by MobiTech Just changed it before I read your Post. Should work nice. But I am currently wondering about the Format. It is Not the same like in the documentation. Posted at 2018-10-02 by MobiTech Might this solve the problem? Updating the BG96 firmware? There is a new post on RAK8212 website: Posted at 2018-10-02 by @gfwilliams @mobitech you can just run that command yourself via Espruino. It's all open source so you're welcome to contribute it if you want to :) Posted at 2018-10-03 by Kartman the code I used was: gprs.at.cmd('AT+QFOTADL="https://quectel.com:100/update.zip',1000,print); unfortunately, you need to host the file yourself - quectel don't do it - which is a pain. Posted at 2018-10-03 by MobiTech @KarTmaN
But how do I know that it worked? There is no console output. Or how much time does it need? Kind regards Posted at 2018-10-03 by Kartman Add gprs.at.debug() before so you get debug output. How long does it take? I've not done an update using this method before, but via USB to the module(I'm also using another BG96 based device that has a USB connector) it takes a couple of minutes to update. Posted at 2018-10-03 by MobiTech @KarTmaN
I tried many things like setting the port, changing the domain to http, removing the ", but nothing did work. I downloaded the zip provided on RAK's website. Any idea how to deal with this error? Posted at 2018-10-03 by Kartman It got the same error - but the site I pointed it to didn't have the file! You might want to double check you can access the file via the browser just to make sure it is actually accessible - you may have done this already. Posted at 2018-10-03 by MobiTech I had a website like this (http://partone-domain.de). I figured out that the dash (-) caused the problem. When I hosted the zip on a domain without a dash in the URL it worked well. Posted at 2018-10-03 by Kartman Great success! Did you get it up to the latest version? 7xxx was the last one I had used. The RAK's were 5xxx . Posted at 2018-10-03 by MobiTech Now it is Version 6. I did not find a newer version. Posted at 2018-10-03 by Kartman Gordon, thanks for the code snippet. I was able to incorporate the CEREG poll into the bg96 connect function. Now it powers the module, waits 5 seconds then polls the module for the cell to connect. This makes it startup a bit faster. Posted at 2018-10-03 by MobiTech @KarTmaN Posted at 2018-10-03 by Kartman The board i was using has a bg96 and the designers were kind enough to provide a usb connector. Yes, i was using qflash. As for the RAK modules, they’re still stuck with the version 5 firmware. Posted at 2018-10-13 by wklenk Just wrote a small blog entry at https://bit.ly/2Eq15Pk
Feel free to comment there if you like to give feedback. Posted at 2018-10-13 by @allObjects In regard to the sister blog entry about LoRa Gateway Antenna Upgrade: I'm surprised that the aerials are horizontal and the significant length difference between them and the wip. For regular 1/4 wave length ground plane antennas with standard impedance - 50R - the (four) aerials point about 45 degrees down and wip and aerials have about the same length. See M0UKD's 1/4 Wave Ground Plane Antenna Calculator. Do the supplier(s) of your upgrade antenna and the gateway mention:
Posted at 2018-10-13 by Kartman The horizontal members are most likely groundplane and not radiators. I gather the antenna was to be ultimately installed outdoors, so with any significant distance the loss of the coax becomes a consideration. Thankfully, with the advent of WiFi, the demand for cheap low loss coax was created and we got the likes of LDF400 that have significantly better performance than RG213 and also means we don't need to work with Heliax. (if you don't know what heliax is - Google it and compare the loss between RG213/LDF400 and Heliax at 800-900MHz) Posted at 2018-10-15 by @gfwilliams Nice - thanks for the write-up! That should be really helpful for others trying to get NB-IoT working. Once connected, did you have any luck transferring data? Or is that TCP send issue still blocking you? Posted at 2019-04-16 by techstudent Hi @wklenk, thanks for sharing this precious information. I was looking for using Bluetooth Low Energy connection and NB-IoT connection creation. Posted at 2020-01-01 by user107550 Hi, Has anyone come across waterproof cases for these? Posted at 2020-01-01 by Kartman Watch batteries have no hope of powering the cellular module. You need to use Lithium Ion batteries. Unfortunately the RAK8212 has a poor voltage regulator that draws more current than the cellular module in sleep, so this module is a poor choice for something that has to run for a long time. As for waterproof cases, there's many suppliers of IP rated enclosures. Posted at 2020-01-05 by user107550 Hi, Thank you very much for getting back to me. Given your reply I have decided this is not the tool for the job I have. Much appreciated. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-09-13 by wklenk
Today I wrote "getting started" instructions at my personal blog at https://bit.ly/2x6OdY8 . I tried to make it very easy even for a beginner to get the Espruino firmware on the RAK8212.
However, now that I go deeper, I would like to know if there are other people playing around with this device? If yes, please contact me.
I am connecting using the "native" Web IDE, using Bluetooth to connect to the device.
Issue #1:
I can't get the GPS example running at http://www.espruino.com/RAK8212#gps. I get ERROR: 516 again and again.
Issue #2:
I would like to share experience when it comes to sending/receiving messages via LTE NB-IoT.
Beta Was this translation helpful? Give feedback.
All reactions