Jump to content
Forum sending old emails Read more... ×

chicken

Members
  • Content Count

    901
  • Joined

  • Last visited

  • Days Won

    83

chicken last won the day on March 7

chicken had the most liked content!

1 Follower

About chicken

  • Rank
    Level 4

Contact Methods

  • Website URL
    http://wegmatt.com

Profile Information

  • Gender
    Not Telling
  • Location
    Redmond, WA
  • Github
    https://github.com/astuder

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. chicken

    [POTM] dAISy - A Simple AIS Receiver

    Hi Ross, Yes, you can feed the serial data out of the HAT into an Arduino or ESP8266. It's 8N1 UART at 38400. You can expect a few hundred messages / minute in very busy areas down to a few per minute in quieter locations. The AIS payload is encoded into !AIVDM messages. If you want to do more with the AIS data than just forwarding it, you will have to decode the !AIVDM message and then make sense of the binary AIS payload embedded in them. You can find detailed documentation of !AIVDM and payload structure that here. As you can see, it's pretty exhaustive. If you want to process AIS messages on the Arduino/ESP8266, you likely will have to focus on a few message types. 1, 2, 3, 5, 18,19 are the most important for tracking ships. This here is an Arduino library for AIS decoding that I found, but I never used it so can't vouch for it. Happy to share logs of real-world AIS data if that's helpful. If interested, send me a PM. Regards, Adrian
  2. chicken

    [POTM] dAISy - A Simple AIS Receiver

    PS: Forgot to answer the second part of your question. All the variations of dAISy are suitable for something built around a Raspberry Pi. The HAT is the obvious fit, but the USB receivers work as well. The USB receivers have the added benefit, that you can also use them on a regular PC or laptop if you decide to move away from the Pi.
  3. chicken

    [POTM] dAISy - A Simple AIS Receiver

    Hi Ross, The best solution depends on what you want to achieve. If you want to build a chartplotter, then OpenPlotter or a standalone setup of OpenCPN would be a viable approach. Both will require a RPI 3 as the GUI of OpenCPN ps For OpenPlotter, I recommend the 1.0 image and not their latest alpha, unless you know what you're doing. For standalone OpenCPN, this tutorial worked for me. If you only want to track ships and may report to a website, then AISHub's rPiAIS is the quickest way to get up and running. More DIY alternatives are Kplex (which OpenPlotter uses under the hood) or some form of home-brew Python script. ais-forwarder to send received AIS messages over the network simpleAIS to decode AIS messages in your Python project You will find more AIS related projects under my Github stars. Best Regards, Adrian
  4. chicken

    [POTM] dAISy - A Simple AIS Receiver

    Hi @pileoni You can use a terminal program like Putty on Windows to connect to dAISy. Pressing ESC will bring up a debug/configuration menu. There, you can start a test mode by pressing T and then ENTER. dAISy will start outputting an AIS message every 5 seconds. Alternatively, while in regular receive mode, you can send & to get dAISy to respond with its serial number. Let me know if this helps. Best Regards, Adrian
  5. chicken

    [POTM] dAISy - A Simple AIS Receiver

    Hi @andimmike15 To debug the application, I'd go through the following steps: 1. Write something on the serial console to make sure that end works (uart_init, uart_send_string) If that doesn't work, search this forum for tips on setting up serial output from your model of the LaunchPad. 2. Read the Si4362's part information and compare it to what's expected per datasheet (radio_setup, radio_part_info, radio_buffer.part_info.part_msb, radio_buffer.part_info.part_lsb) If you don't get the expected values (e.g. 0x43 for the msb, 0x62 for the lsb if you're using an Si4362), then something with the SPI connections is wrong. 3. Toggle LEDs in strategic locations in the packet_handler ISR, to see whether raw data and clk bits from radio arrive at the MCU and the interrupt is invoked. If that doesn't work, check that the correct radio and GPIO pins are connected. If all the above works, then you're ready to worry about the actual AIS signal. That side is hard to simulate without an AIS target, but your transponder would be a good start. But be careful to not damage the Si4362 with a too strong signal. Directly connecting the transponder with the receiver will destroy the receiver. Let me know if this helps, or where on that list you get stuck.
  6. In case you need to stock up on MSP430 dev boards, it's MSP430 week in the TI store. http://www.ti.com/store/featured/msp430week18.html
  7. chicken

    [POTM] dAISy - A Simple AIS Receiver

    For all you AIS home-brewers out there: I've added the TAI-SAW TA0395A SAW filter to my Tindie store. https://www.tindie.com/products/astuder/tai-saw-ta0395a-saw-filter/ This bandpass filter covers 6 MHz in the marine VHF band and can be found in many commercial AIS receiver and related equipment. As often with parts from specialist vendors, it is hard to come by without writing an RFQ and/or begging for samples. So I thought I'd sell some of my stash to fellow tinkerers.
  8. chicken

    [POTM] dAISy - A Simple AIS Receiver

    Hi @andimmike15 AIS messages can be longer than 32 bytes, for example message type 5 which includes the ship's name is 424 bits / 53 bytes. http://catb.org/gpsd/AIVDM.html#_type_5_static_and_voyage_related_data You could filter messages to only receive the position messages (types 1, 2, 3, 4, 9 and 18) by evaluating the message type at line 261 and resetting the packet handler state machine in case of an unwanted message. Keep in mind, that while the received message is converted to NMEA0183, a new AIS message may start arriving. So allocate a few bytes more for the FIFO than the minimal message length (21 bytes for the above, so maybe make the FIFO 32 bytes long). Note that due to its current implementation, the FIFO length must be a power of two. Setting FIFO_PACKETS to 2 is the minimum, again because a new packet may arrive while the first isn't fully processed yet. Another big chunk of memory is in the NMEA encoding section. If filtering AIS messages, you can squeeze out a few bytes by limiting the maximum size of the NMEA payload to 21 bytes (nmea.c line 19), which translates to a NMEA output buffer of 43 bytes. You could shave of a few more bytes by not storing the AIVDM lead-in in the buffer but directly outputting it on serial. Still, squeezing everything into into 96 bytes of RAM will be quite a challenge. The MSP430G2553 has a luxurious 512 bytes.
  9. chicken

    [POTM] dAISy - A Simple AIS Receiver

    The radio will work with any MCU. But in my project, you will have to rewrite anything that's hardware dependent. From top of my mind, that's spi.c, serial.c, GPIO interrupts in packet_handler.c, plus any interaction with GPIO like LEDs etc.
  10. chicken

    [POTM] dAISy - A Simple AIS Receiver

    Yes, you can remove both and it will still work. #define TEST would enable extra code. I used that during development for testing the NMEA code without a radio. As long as the project does not define it, the test code will be skipped. It's not enabled in the code, so you don't have to worry about that. #define DEBUG_MESSAGES is useful to get more information about the radio communication. I would leave that in until you got the receiver working, as it will help you tracking down what's going on.
  11. chicken

    [POTM] dAISy - A Simple AIS Receiver

    @andimmike15 For debug messages, simply add a #define in main.c, like I did on line 20. For test mode, I made a separate profile in the CCS project, which sets the define with the -D compiler option.
  12. chicken

    [POTM] dAISy - A Simple AIS Receiver

    FYI @Fonsin and @GeoffH The NMEA adapter is now back in stock on Tindie and in our own store: https://www.tindie.com/products/astuder/nmea-0183--rs-422-adapter-for-daisy/ https://shop.wegmatt.com/products/nmea-0183-rs-422-adapter-for-daisy
  13. chicken

    [POTM] dAISy - A Simple AIS Receiver

    Hello @NsNcc I'm not much of a Linux wizard, so I don't have a better method to achieve this. There was a thread on the Kplex Google group about issues with the dAISy USB because Linux didn't initialize the USB ports early enough, but I wasn't aware that the same issue exists with the regular serial port. https://groups.google.com/forum/#!forum/kplex Kplex may be overkill if you just need to forward AIS data to a network address. Alternatives are: A simple python script: https://github.com/jaluebbe/ais-forwarder Or a shell script: But of course, that still leaves you with the "run at startup problem". As a Linux noob, I'd try this (which looks very similar to what you're already doing): https://superuser.com/questions/155476/how-do-i-make-a-script-run-upon-startup-of-the-ubuntu-machine
  14. chicken

    [POTM] dAISy - A Simple AIS Receiver

    Hi @GeoffH I just sent out a request for a quote for a few more of the NMEA add-ons for the small dAISy. It will probably be 4-6 weeks before they are back in stock. I tried to directly connect dAISy TX to the A2 and GND to B2 on the NMEA2WiFi, but it does not have enough power to drive the signal. If you are into tinkering, you can try something like this:
  15. Shouldn’t there be a special badge on 43oh for earning 430 reputation points? Well, congrats to my dear friend @Fmilburn for having crossed that line of 43oh awesomeness
×