tag:blogger.com,1999:blog-5598213388614630732.post6285162772465815163..comments2022-04-09T01:20:19.005-07:00Comments on KB7KMO Projects: ESP8266 Design Contest Entry NMEA Bridge for OpenCPNLarry Littlefieldhttp://www.blogger.com/profile/09083659166631020929noreply@blogger.comBlogger26125tag:blogger.com,1999:blog-5598213388614630732.post-28784944510130404482019-01-16T17:11:35.984-08:002019-01-16T17:11:35.984-08:00Thank you and you are welcome.
Another commenter...Thank you and you are welcome. <br /><br />Another commenter modified this to run on a -12E with 2 input channels for GPS and AIS. Also softAP to avoid having a router.Larry Littlefieldhttps://www.blogger.com/profile/09083659166631020929noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-70799644940966239172019-01-16T15:14:08.014-08:002019-01-16T15:14:08.014-08:00Outstanding! With those hints, and a few other ch...Outstanding! With those hints, and a few other changes, I was able to make it work using my home WiFi router, the GPS "data" coming from the Arduino Serial Monitor app. <br /><br />Many many thanks for taking the time to help!<br /><br />However, my boat has no Wifi networking, just a Windows tablet with Wifi capability.<br /><br />So I tweaked things to use the ESP8266 SoftAP capabilities (magic, if you ask me). I then hardcoded a couple of things, which meant I could remove all the web page stuff and tada, my tablet gets GPS info using nothing more than the onboard GPS and the 8266; no other electronics required.<br /><br />(Removing all your hard work to create the web servers felt .. wrong .. somehow, but I like simple.)<br /><br />Anyway, thanks again.<br /><br />AlanAlanhttps://www.blogger.com/profile/18137764922624799068noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-8180125666098145002019-01-12T19:08:32.967-08:002019-01-12T19:08:32.967-08:00Of course you can, simple matter of programming. I...Of course you can, simple matter of programming. I would try:<br />Comment out the if statement 136-152<br /><br />comment out the two calls 169-173<br /><br />After line 178 set the values of each variable that would have been retrieved from eprom with pfodWifiConfig.<br />ssid = "your ssid";<br />password = "your 8 char or more password";<br /><br />The variables of type uint16_t are numbers as is baudRate so without the quotes"<br />baudRate = 38400;<br /><br />That should give you a start. Any error you get from the Arduino IDE, you can paste into Google search and usually find the problem. Except for missing ";" at the end of a statement is usually a weird undefined error, so if looks strange check your semicolons.Larry Littlefieldhttps://www.blogger.com/profile/09083659166631020929noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-86766147187438094072019-01-12T18:36:54.041-08:002019-01-12T18:36:54.041-08:00Thanks for this project!
One question .. can I h...Thanks for this project! <br /><br />One question .. can I hard code the various setup parameters and then not bother with the switch, LED and that part of the code?<br /><br />If so, any hints as to how to do so? (Long time assembly programmer, newby C programmer.)<br /><br />Thanks again!<br /><br />Alanhttps://www.blogger.com/profile/18137764922624799068noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-8312857364160921762018-01-02T09:20:01.396-08:002018-01-02T09:20:01.396-08:00Larry... I was ecstatic to find this project.. How...Larry... I was ecstatic to find this project.. However I have ran into a wall. I have downloaded the versions of Arduino and the ESP addin you specified. The sketch compiles fine and appears to upload fine (whole bunch of red dots go by). However, the board does not seem to do anything. I have tried 2 different boards with the same results. I short the proper GPIO pins but I never get an AP advertised. Any ideas?travellerwhttps://www.blogger.com/profile/16141013921791002739noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-82492479308261039252017-08-05T06:34:55.483-07:002017-08-05T06:34:55.483-07:00No my implementation is one way only. It only rece...No my implementation is one way only. It only receives from the GPS or AIS and broadcasts over wifi. It does not receive from opencpn. The ESP-01 only has one port. You could add that capability if you used a module with more ports, like an ESP7 or 12e. or use a 3rd ESP-01 just for the autopilot, with new firmware of course.Larry Littlefieldhttps://www.blogger.com/profile/09083659166631020929noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-9438425523830905852017-08-05T04:33:55.849-07:002017-08-05T04:33:55.849-07:00Hello!
Does your NMEA bridge has capability to se...Hello!<br /><br />Does your NMEA bridge has capability to send data from nmea instrument and nmea ais via wifi to android phone running opencpn and receive nmea message from android phone opencpn for autopilot and output this message on nmea port?<br /><br />thanks and best regards!Dvorni urednikhttps://www.blogger.com/profile/00614112858699753545noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-30096745686753324552016-12-18T02:18:19.970-08:002016-12-18T02:18:19.970-08:00We are just launching the boat after 1 1/2 years i...We are just launching the boat after 1 1/2 years in the work yard so I will not have time to investigate this for a while. Forward Computing has had sereveal revisions since the version I chose. Possibly one addresses this. There were other incompatibilities reported however. The newer IDE is more strict about data type conversions. This is where i would start looking.Larry Littlefieldhttps://www.blogger.com/profile/09083659166631020929noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-76702657935884918462016-12-17T20:12:17.418-08:002016-12-17T20:12:17.418-08:00Hi again Larry. The problem is at the point of sa...Hi again Larry. The problem is at the point of saving the config. When you save it - the specified port changes.jmachttps://www.blogger.com/profile/17038149078760658416noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-71756007069203496912016-12-17T04:08:41.929-08:002016-12-17T04:08:41.929-08:00Looking at the code I don't see the problem. I...Looking at the code I don't see the problem. It starts as a unsigned int. Then converted to uint16_t then as a 5 char string in EEPROM and back. All of which should be 5 digits. Must be something other than data type issue. I only tested in Linux and with tp-link routers. I also only tested with ports around 10110. Other problems have been because the newer arduino IDE follows more strict c and c++ standards.Larry Littlefieldhttps://www.blogger.com/profile/09083659166631020929noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-27206257717366600152016-12-17T00:58:02.375-08:002016-12-17T00:58:02.375-08:00Hi Larry, Good to hear from you. Another questio...Hi Larry, Good to hear from you. Another question I had was that the patterns available for the customisation of the UDP port don't seem to work correctly on the higher numbered ports (e.g. 55556) required for some other projects like SignalK and freeboard. Perhaps you could suggest an alternative.<br /><br />Regarding the code, its really all yours with only a few modifications so I'm not sure it warrants me forking it. Perhaps you might want it as a separate version in your repository?jmachttps://www.blogger.com/profile/17038149078760658416noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-32573833607227834742016-12-16T03:14:13.518-08:002016-12-16T03:14:13.518-08:00Sorry to take so long to approve this comment...Sorry to take so long to approve this comment...Larry Littlefieldhttps://www.blogger.com/profile/09083659166631020929noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-36673745294789633722016-12-16T03:09:10.334-08:002016-12-16T03:09:10.334-08:00Hi John, If I remember correctly the delay was jus...Hi John, If I remember correctly the delay was just there to slow the spin when nothing else happened in the main loop during testing. I would replace it with another yield() instead of just deleting it. In the versions I tested with the cpu needs time to manage the wifi activities so the delay and the yield both give it time to run in a similar manor. With no real delay I thought that when the if statements were all false it would go through the loop too often. I was probably wrong.<br /><br />Don't be embarrassed about your code, nobody likes the code they wrote a few years ago. For new guys trying to learn code they need to read lots of code, good and bad, to learn. Github has ample provisions for documenting the quality of your code in the README.md and other notes. Just mark it temporary experimental and possibly ask for improvements in the readme.Larry Littlefieldhttps://www.blogger.com/profile/09083659166631020929noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-41225240992211711382016-12-15T21:22:00.953-08:002016-12-15T21:22:00.953-08:00Hi again Larry, I thought I had answered your last...Hi again Larry, I thought I had answered your last comment but as I return to the page I see that it is missing. I do document, from time to time, my projects. However, I'm so ashamed of my code that it doesn't appear on Git. <br />I have a question. I was starting to use the D1 mini running my version of your code (using SoftwareSerial for the port to the GPS) to feed my on board MQTT server. The code runs fine while feeding OpenCPN but, I found the messages became erratic at the node-red/MQTT end. (I want the time and a few other parameters to run stuff on-board).<br /><br />I was wondering about the purpose of the delay(10) in the main loop? Removing it and relying on the yield() statement further down seems to have solved the problem. jmachttps://www.blogger.com/profile/17038149078760658416noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-63673197891667345712016-10-29T06:13:21.519-07:002016-10-29T06:13:21.519-07:00I can do - I have some other projects at kk4oyj.wo...I can do - I have some other projects at kk4oyj.wordpress.com. Going to have a few frantic weeks of work but I will document it when I get time in December. I use the MQTT time from the GPS to drive a custom freezer controller so it switches off and, more importantly ON again after HF nets.jmachttps://www.blogger.com/profile/17038149078760658416noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-34224802099209015122016-10-27T15:39:37.410-07:002016-10-27T15:39:37.410-07:00Thanks John,
Glad it was a help. I had not noticed...Thanks John,<br />Glad it was a help. I had not noticed the D1 Mini before. Do you document your stuff somewhere?<br /><br />LarryLarry Littlefieldhttps://www.blogger.com/profile/09083659166631020929noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-29734508015229224172016-10-27T06:13:04.405-07:002016-10-27T06:13:04.405-07:00Nice work Larry. I have the code compiled and wor...Nice work Larry. I have the code compiled and working on a D1 Mini (please forgive my laziness :)). I needed to remove the second call to start the Serial interface as the most recent SDK seems to be intolerant and crashes. Works like a charm! <br />I also decided to use Software Serial - a trivial change.<br />I'm not breaking out position, time and speed and sending them via MQTT so that my other devices can use the information as necessary.<br /><br />Thanks again<br /><br />John<br />S/V Amazing Gracejmachttps://www.blogger.com/profile/17038149078760658416noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-55698977714445480602016-07-08T20:37:38.296-07:002016-07-08T20:37:38.296-07:00Long John, I also now get this error in the enviro...Long John, I also now get this error in the environment I had compiled OK before.<br />The problem is to convert a c++ string to STD c string.<br /><br />I do not have a board to test just now, but it compiles if I change the const char* scanForAPs() { function to<br />...<br />String ssid_scan = WiFi.SSID(i);<br />...<br />strncpy_safe((char*)ssid_found, ssid_scan.c_str(), MAX_SSID_LEN);<br /><br />Also see the later posts: http://kb7kmo.blogspot.com/2016/03/esp8266-design-contest-entry-nmea.html<br /><br />github updated June 30, 16Larry Littlefieldhttps://www.blogger.com/profile/09083659166631020929noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-78511125601462219242016-05-19T16:11:32.873-07:002016-05-19T16:11:32.873-07:00No I have not. First you will need to evaluate the...No I have not. First you will need to evaluate the need to change the buffer circuit for the transmit pin. See: http://www.scienceprog.com/alternatives-of-max232-in-low-budget-projects/ as noted in the github README. Then add the code for sending. It should not be too complicated. I just have no need in my setup. Also see the comments on my first post https://kb7kmo.blogspot.com/2015/09/nmea-wifi-bridge.htmlLarry Littlefieldhttps://www.blogger.com/profile/09083659166631020929noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-25084803427965079212016-05-19T12:15:31.013-07:002016-05-19T12:15:31.013-07:00Hello, very nice work. I was wondering if you supp...Hello, very nice work. I was wondering if you support bi-directional NMEA at this stage. Because I'd be interested to output data to my tillerpilot also. (My plan is to embed another ESP8266 within the tilletpilot case to make it a "wifi" tiller pilot :) )alexfrouarthttps://www.blogger.com/profile/13599470122326007307noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-84261387119473576542016-05-12T20:22:00.739-07:002016-05-12T20:22:00.739-07:00I documented a RS-422 version of this circuit I...I documented a RS-422 version of this circuit I'm using on an Lowrance Elite 7 Ti. Details on my blog<br /><br />The Netbook2Chartplotter Project<br />http://netbook2chartplotter.blogspot.com/Long Johnhttps://www.blogger.com/profile/10835162935515719974noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-44093771848280769062016-04-27T18:21:28.400-07:002016-04-27T18:21:28.400-07:00Long John, Glad you had success. Thanks for pointi...Long John, Glad you had success. Thanks for pointing out the resistors. Turns out that only the copy of the schematic here, in fritzing, is the only one I didn't remove the extra resistor. In the eagle files (even all my earlier revisions) it is not there. I need to update this copy.Larry Littlefieldhttps://www.blogger.com/profile/09083659166631020929noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-54199462541651460572016-04-27T15:55:26.365-07:002016-04-27T15:55:26.365-07:00I got this going finally, I forgot my laptop still...I got this going finally, I forgot my laptop still had 1.6.4 on it so I programmed it from there.<br /><br />One thing I did notice in the schematic is R2 should be dropped because R7 already pulls up the RX input and having R2 in parallel with it is not only redundant it lowers the resistance in half and thus doubles the current. Granted it still pretty small it's still bad design form especially if you are trying to go as low power as possible<br /><br />Just a tip from an Electronics Engineer .... Other than that, great idea providing pullups on all I/O so they don't end up in an undetermined state . It's a common design error by the lesser experienced to leave them out .... Once you spend days troubleshooting an intermittent problem caused by not using a pull up resistor you'll never forget to use one again. Of course I've never made that mistake myself, it's just what I heard (OK maybe it did happen to me .... but only once)<br /><br />Great project and worked flawlessly for me once I got around the programming glitch Long Johnhttps://www.blogger.com/profile/10835162935515719974noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-3928955884335754582016-04-21T03:34:47.949-07:002016-04-21T03:34:47.949-07:00Thanks for the fast reply
This seems to be a comm...Thanks for the fast reply<br /><br />This seems to be a common C++ error so maybe the IDE is more strictly enforcing the rules. (I hate C++ ... It's as strict as a spinster school teacher and even less forgiving) I'm going to see if I can rework the syntax in that line of code before I go to the trouble of installing another instance of the Arduino IDE and all of that. <br /><br />If I come up with something I'll let you know .... If you don't hear from me again then assume I went with your suggestion of installing the known working versions and didn't find a workaround/new syntax ... That doesn't mean one doesn't exist, just that I'm too much of a hack to figure it out myself ..... <br /><br />Thanks for the help and the code, this is a minor problem compared to me trying to hack all this code together myself .... When I looked into this a year ago everyone was still just trying to translate the Chinese datasheets and using these with an Arduino which is obviously redundant in most casesLong Johnhttps://www.blogger.com/profile/10835162935515719974noreply@blogger.comtag:blogger.com,1999:blog-5598213388614630732.post-77842970529004135642016-04-20T16:36:38.011-07:002016-04-20T16:36:38.011-07:00Hello Long John,
Not sure, but several things in ...Hello Long John, <br />Not sure, but several things in the environment are changing rapidly. Check the revisions of all the software. It still compiles OK with the Arduino IDE for ESP 1.6.5 and the board manager version 1.6.5-947-g39819f0. Also version 1.9 of the library pfodWifiConfig.zip. <br /><br />Other revisions get different compiler errors. For instance 1.6.8 doesn't like the SoftwareSerial in pfodWifiConfig.Larry Littlefieldhttps://www.blogger.com/profile/09083659166631020929noreply@blogger.com