Displaying some kind of data in fullcalendar with errors? - fullcalendar

I'm using full calendar to aggregate and show events added via CMS.
I have a problem with "0" before every entry and not parsing –
You can see it here in action:
http://www.florystyka.com/kalendarium
It's in polish language.
For example date 12.04.2016 (12th of April) looks like:
<div class="fc-content"><span class="fc-time">0</span> <span class="fc-title">Komunia święta &#8211; od wianuszka do dekoracji kościoła</span></div>
I can see that fc-time is 0, maybe this is bad configuration of plugin?
Here is the JS code:
<script>
jQuery(document).ready(function() {
jQuery('#calendar').fullCalendar({
timeFormat: 'H(:mm)',
nextDayThreshold: '00:00:00',
//allDay:false,
eventSources: [
{
events: [{"start":"2016-10-01","title":"Florysta","url":"http:\/\/www.florystyka.com\/kursy\/florysta","color":"#6390BE","description":""},{"start":"2016-10-01","title":"Florysta","url":"http:\/\/www.florystyka.com\/kursy\/florysta","color":"#6390BE","description":""},{"start":"2016-10-08","title":"Mistrz florystyki","url":"http:\/\/www.florystyka.com\/kursy\/mistrz-florystyki-kurs","color":"#6390BE","description":""},{"start":"2016-10-08","title":"Mistrz florystyki","url":"http:\/\/www.florystyka.com\/kursy\/mistrz-florystyki-kurs","color":"#6390BE","description":""}]
},
{
events: [{"start":"2016-05-16","end":"2016-05-19T23:59:00","title":"Pierwsze kroki z florystyk\u0105","url":"http:\/\/www.florystyka.com\/warsztaty\/pierwsze-kroki-z-florystyka","color":"#acd342","description":""},{"start":"2016-04-19","end":"2016-04-21T23:59:00","title":"Bukiety na ka\u017cd\u0105 okazj\u0119-klasyka i nowoczesno\u015b\u0107","url":"http:\/\/www.florystyka.com\/warsztaty\/bukiety-na-kazda-okazje","color":"#acd342","description":""},{"start":"2016-06-13","end":"2016-06-16T23:59:00","title":"\u015alub marze\u0144 – ameryka\u0144skie inspiracje","url":"http:\/\/www.florystyka.com\/warsztaty\/amerykanski-slub","color":"#acd342","description":""},{"start":"2016-05-31","end":"2016-06-02T23:59:00","title":"Wi\u0105zanki \u015blubne – klasyka i nowoczesno\u015b\u0107","url":"http:\/\/www.florystyka.com\/warsztaty\/nowoczesne-wiazanki-slubne","color":"#acd342","description":""},{"start":"2016-04-12","end":"2016-04-14T23:59:00","title":"Komunia \u015bwi\u0119ta – od wianuszka do dekoracji ko\u015bcio\u0142a","url":"http:\/\/www.florystyka.com\/warsztaty\/pierwsza-komunia","color":"#acd342","description":""},{"start":"2016-08-09","end":"2016-08-11T23:59:00","title":"Magia r\u00f3\u017c","url":"http:\/\/www.florystyka.com\/warsztaty\/magia-roz","color":"#acd342","description":""},{"start":"2016-08-23","end":"2016-08-25T23:59:00","title":"Florystyka \u017ca\u0142obna","url":"http:\/\/www.florystyka.com\/warsztaty\/7689-2","color":"#acd342","description":""},{"start":"2016-11-14","end":"2016-11-16T23:59:00","title":"Wianki i ozdoby adwentowe","url":"http:\/\/www.florystyka.com\/warsztaty\/7698-2","color":"#acd342","description":""}]
},
{
events: [{"start":"2014-09-27","end":"2014-09-29","title":"Dyplom Florysty 2014, wystawa prac dyplomowych w Wilanowie","url":"http:\/\/www.florystyka.com\/aktualnosci\/wystawa-prac-dyplomowych-florysta-2014","color":"#EA689C","description":""},{"start":"2015-11-14","title":"IPM 2013 Essen","url":"http:\/\/www.florystyka.com\/aktualnosci\/ipm-2013-essen","color":"#EA689C","description":""}]
},
{
events: [{"start":"2016-07-11","end":"2016-07-16","title":"Podstawy Florystyki PF\/07\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/podstawy-florystyki-pf072016","color":"#6390BE","description":"Zjazd 1\/2"},{"start":"2016-07-18","end":"2016-07-23","title":"Podstawy Florystyki PF\/07\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/podstawy-florystyki-pf072016","color":"#6390BE","description":"Zjazd 2\/2"},{"start":"2016-06-20","end":"2016-06-23","title":"Wpis pr\u00f3bny","url":"http:\/\/www.florystyka.com\/kalendarium\/wpis-probny","color":"#EA689C","description":""},{"start":"2016-07-06","end":"2016-07-11","title":"Florysta dzienny FD 03\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-dzienny-fd-032015","color":"#6390BE","description":"Ostatni zjazd"},{"start":"2016-07-06","end":"2016-07-11","title":"Florysta weekendowy FW 03\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-weekendowy-fw-032015","color":"#6390BE","description":"Ostatni zjazd"},{"start":"2015-10-03","end":"2015-10-05","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 1\/24"},{"start":"2015-10-10","end":"2015-10-12","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 2\/24"},{"start":"2015-10-17","end":"2015-10-19","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 3\/24"},{"start":"2015-11-14","end":"2015-11-16","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 4\/24"},{"start":"2015-11-21","end":"2015-11-23","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 5\/24"},{"start":"2015-12-05","end":"2015-12-07","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 6\/24"},{"start":"2015-12-12","end":"2015-12-14","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 7\/24"},{"start":"2016-01-09","end":"2016-01-11","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 8\/24"},{"start":"2016-01-16","end":"2016-01-18","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 9\/24"},{"start":"2016-02-06","end":"2016-02-08","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 10\/24"},{"start":"2016-03-12","end":"2016-03-14","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 11\/24"},{"start":"2016-03-19","end":"2016-03-21","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 12\/24"},{"start":"2016-04-09","end":"2016-04-11","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 13\/24"},{"start":"2016-04-23","end":"2016-04-25","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 14\/24"},{"start":"2016-05-07","end":"2016-05-09","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 15\/24"},{"start":"2016-05-14","end":"2016-05-16","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 16\/24"},{"start":"2016-06-04","end":"2016-06-06","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 17\/24"},{"start":"2016-06-11","end":"2016-06-13","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 18\/24"},{"start":"2016-06-18","end":"2016-06-20","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 19\/24"},{"start":"2016-07-02","end":"2016-07-04","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 20\/24"},{"start":"2016-08-06","end":"2016-08-08","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 21\/24"},{"start":"2016-08-13","end":"2016-08-15","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 22\/24"},{"start":"2016-08-18","end":"2016-08-22","title":"Florysta weekendowy FW 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-102015-4","color":"#6390BE","description":"Zjazd 23,24\/24 ostatni"},{"start":"2016-03-05","end":"2016-03-07","title":"Florysta weekendowy FW 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-032015-8","color":"#6390BE","description":"Zjazd 1\/24"},{"start":"2016-03-12","end":"2016-03-14","title":"Florysta weekendowy FW 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-032015-8","color":"#6390BE","description":"Zjazd 2\/24"},{"start":"2016-03-19","end":"2016-03-21","title":"Florysta weekendowy FW 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-032015-8","color":"#6390BE","description":"Zjazd 3\/24"},{"start":"2016-04-09","end":"2016-04-11","title":"Florysta weekendowy FW 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-032015-8","color":"#6390BE","description":"Zjazd 4\/24"},{"start":"2016-04-23","end":"2016-04-25","title":"Florysta weekendowy FW 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-032015-8","color":"#6390BE","description":"Zjazd 5\/24"},{"start":"2016-05-07","end":"2016-05-09","title":"Florysta weekendowy FW 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-032015-8","color":"#6390BE","description":"Zjazd 6\/24"},{"start":"2016-05-14","end":"2016-05-16","title":"Florysta weekendowy FW 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-032015-8","color":"#6390BE","description":"Zjazd 7\/24"},{"start":"2016-06-04","end":"2016-06-06","title":"Florysta weekendowy FW 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-032015-8","color":"#6390BE","description":"Zjazd 8\/24"},{"start":"2016-06-11","end":"2016-06-13","title":"Florysta weekendowy FW 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-032015-8","color":"#6390BE","description":"Zjazd 9\/24"},{"start":"2016-06-18","end":"2016-06-20","title":"Florysta weekendowy FW 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-032015-8","color":"#6390BE","description":"Zjazd 10\/24"},{"start":"2016-07-02","end":"2016-07-04","title":"Florysta weekendowy FW 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-032015-8","color":"#6390BE","description":"Zjazd 11\/24"},{"start":"2016-08-06","end":"2016-08-08","title":"Florysta weekendowy FW 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-032015-8","color":"#6390BE","description":"Zjazd 12\/24"},{"start":"2016-08-13","end":"2016-08-15","title":"Florysta weekendowy FW 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fw-032015-8","color":"#6390BE","description":"Zjazd 13\/24"},{"start":"2015-10-03","end":"2015-10-05","title":"Florysta dzienny FD 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-102015-4","color":"#6390BE","description":"Zjazd 1\/12"},{"start":"2015-10-12","end":"2015-10-16","title":"Florysta dzienny FD 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-102015-4","color":"#6390BE","description":"Zjazd 2\/12"},{"start":"2015-11-16","end":"2015-11-20","title":"Florysta dzienny FD 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-102015-4","color":"#6390BE","description":"Zjazd 3\/12"},{"start":"2015-12-07","end":"2015-12-11","title":"Florysta dzienny FD 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-102015-4","color":"#6390BE","description":"Zjazd 4\/12"},{"start":"2016-01-11","end":"2016-01-15","title":"Florysta dzienny FD 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-102015-4","color":"#6390BE","description":"Zjazd 5\/12"},{"start":"2016-02-01","end":"2016-02-05","title":"Florysta dzienny FD 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-102015-4","color":"#6390BE","description":"Zjazd 6\/12"},{"start":"2016-03-14","end":"2016-03-18","title":"Florysta dzienny FD 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-102015-4","color":"#6390BE","description":"Zjazd 7\/12"},{"start":"2016-04-04","end":"2016-04-08","title":"Florysta dzienny FD 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-102015-4","color":"#6390BE","description":"Zjazd 8\/12"},{"start":"2016-04-25","end":"2016-04-29","title":"Florysta dzienny FD 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-102015-4","color":"#6390BE","description":"Zjazd 9\/12"},{"start":"2016-05-09","end":"2016-05-13","title":"Florysta dzienny FD 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-102015-4","color":"#6390BE","description":"Zjazd 10\/12"},{"start":"2016-06-06","end":"2016-06-10","title":"Florysta dzienny FD 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-102015-4","color":"#6390BE","description":"Zjazd 11\/12"},{"start":"2016-08-01","end":"2016-08-05","title":"Florysta dzienny FD 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-102015-4","color":"#6390BE","description":"Zjazd 12\/12"},{"start":"2016-08-15","end":"2016-08-22","title":"Florysta dzienny FD 10\/2015","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-102015-4","color":"#6390BE","description":"Ostatni zjazd"},{"start":"2016-01-22","end":"2016-01-25","title":"Podstawy florystyki","url":"http:\/\/www.florystyka.com\/kalendarium\/podstawy-florystyki","color":"#6390BE","description":"Zjazd 1\/4"},{"start":"2016-01-29","end":"2016-02-01","title":"Podstawy florystyki","url":"http:\/\/www.florystyka.com\/kalendarium\/podstawy-florystyki","color":"#6390BE","description":"Zjazd 2\/4"},{"start":"2016-02-12","end":"2016-02-15","title":"Podstawy florystyki","url":"http:\/\/www.florystyka.com\/kalendarium\/podstawy-florystyki","color":"#6390BE","description":"Zjazd 3\/4"},{"start":"2016-02-26","end":"2016-02-29","title":"Podstawy florystyki","url":"http:\/\/www.florystyka.com\/kalendarium\/podstawy-florystyki","color":"#6390BE","description":"Zjazd 4\/4"},{"start":"2016-03-05","end":"2016-03-07","title":"Florysta dzienny FD 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-032015","color":"#6390BE","description":"Zjazd 1\/12 "},{"start":"2016-03-14","end":"2016-03-18","title":"Florysta dzienny FD 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-032015","color":"#6390BE","description":"Zjazd 2\/12"},{"start":"2016-04-04","end":"2016-04-08","title":"Florysta dzienny FD 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-032015","color":"#6390BE","description":"Zjazd 3\/12"},{"start":"2016-04-25","end":"2016-04-29","title":"Florysta dzienny FD 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-032015","color":"#6390BE","description":"Zjazd 4\/14"},{"start":"2016-05-09","end":"2016-05-13","title":"Florysta dzienny FD 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-032015","color":"#6390BE","description":"Zjazd 5\/14"},{"start":"2016-06-06","end":"2016-06-10","title":"Florysta dzienny FD 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-032015","color":"#6390BE","description":"Zjazd 6\/14"},{"start":"2016-08-01","end":"2016-08-05","title":"Florysta dzienny FD 03\/2016","url":"http:\/\/www.florystyka.com\/kalendarium\/florysta-fd-032015","color":"#6390BE","description":"Zjazd 7\/14"}]
}
],
eventRender: function(event, element) {
element.qtip({
content: event.description,
position: {
my: 'top center',
at: 'bottom center',
}
});
}
});
});
</script>

Some of your event end values have a time component. This makes the guessing logic decide that it is not an all day event so it shows the hour of the start, which is zero because the start dates have no time component. You can resolve by making start and end consistent, either both have a time or neither has a time for any particular event.

Related

How is the btmgmt command used to set PHY?

When I run the command: btmgmt phy LE2MTX LE2MRX
It returns:
Could not set PHY Configuration with status 0x0d (Invalid Parameters)
btmon shows:
# MGMT Open: btmgmt
# MGMT Command: Set PHY Configuration (0x0045) plen 4
Selected PHYs: 0x1800
LE 2M TX
LE 2M RX
# MGMT Event: Command Status (0x0002) plen 3
Set PHY Configuration (0x0045)
Status: Invalid Parameters (0x0d)
# MGMT Close: btmgmt
I'm very unfamiliar with btmgmt, how do I specify that I want LE 2M PHY whenever possible?
If I run: btmgmt phy
I get the available PHYs which incudes the LE2MTX and LE2MRX (which I am after).
Supported phys: BR1M1SLOT BR1M3SLOT BR1M5SLOT EDR2M1SLOT EDR2M3SLOT EDR2M5SLOT EDR3M1SLOT EDR3M3SLOT EDR3M5SLOT LE1MTX LE1MRX LE2MTX LE2MRX
Configurable phys: BR1M3SLOT BR1M5SLOT EDR2M1SLOT EDR2M3SLOT EDR2M5SLOT EDR3M1SLOT EDR3M3SLOT EDR3M5SLOT LE2MTX LE2MRX
Selected phys: BR1M1SLOT BR1M3SLOT BR1M5SLOT EDR2M1SLOT EDR2M3SLOT EDR2M5SLOT EDR3M1SLOT EDR3M3SLOT EDR3M5SLOT LE2MTX LE2MRX
These can also be seen in btmon:
Get PHY Configuration (0x0044) plen 12
Status: Success (0x00)
Supported PHYs: 0x1fff
BR 1M 1SLOT
BR 1M 3SLOT
BR 1M 5SLOT
EDR 2M 1SLOT
EDR 2M 3SLOT
EDR 2M 5SLOT
EDR 3M 1SLOT
EDR 3M 3SLOT
EDR 3M 5SLOT
LE 1M TX
LE 1M RX
LE 2M TX
LE 2M RX
Configurable PHYs: 0x19fe
BR 1M 3SLOT
BR 1M 5SLOT
EDR 2M 1SLOT
EDR 2M 3SLOT
EDR 2M 5SLOT
EDR 3M 1SLOT
EDR 3M 3SLOT
EDR 3M 5SLOT
LE 2M TX
LE 2M RX
Selected PHYs: 0x19ff
BR 1M 1SLOT
BR 1M 3SLOT
BR 1M 5SLOT
EDR 2M 1SLOT
EDR 2M 3SLOT
EDR 2M 5SLOT
EDR 3M 1SLOT
EDR 3M 3SLOT
EDR 3M 5SLOT
LE 2M TX
LE 2M RX

RaspberryPi 4 - ADS1256 - The reading in registers don't work well

I have a project that includes a RaspberryPi 4 and an ADS1256 ADC converter.
It managed to implement as read and write functions of the registers, which are working almost in their entirety, on reading and writing, but reading only once, not repeating for the same register.
The problem is:
When it is tried to read in the second time, the data returned is zero (0x00), including the bits that have no writing enabled.
Do you have any idea what could be some?
Conections:
| Pi 4|Module ADS1256|
+-----+----------------------+
| 4 | 1 | 5v
| 6 | 2 | gnd
| 11 | 6 | DRDY
| 12 | 7 | CS - Chip Select
| 13 | 8 | PDWN - Power Down
| 19 | 4 | DIN - Data In (Slave)
| 21 | 5 | DOUT - Data Out (Slave)
| 23 | 3 | SCLK
Attachment:
Schematic of Module ADS1256.
Main Code:
import ClassADS1256_Question, time
ads = ClassADS1256_Question.ADS1256()
# ----- Configuração Inicial ----
read = 1
while True:
time.sleep(2)
print('----- Read {} ------'.format(read))
# Registers Adress - Name - default value - Result
print('00h STATUS 3xh ', ads.ReadReg(ads.REG_STATUS))
print('01h MUX 01h ', ads.ReadReg(ads.REG_MUX))
print('02h ADCON 20h ', ads.ReadReg(ads.REG_ADCON))
print('03h DRATE F0h ', ads.ReadReg(ads.REG_DRATE))
print('04h IO E0h ', ads.ReadReg(ads.REG_IO))
print('05h OFC0 xxh ', ads.ReadReg(ads.REG_OFC0))
print('06h OFC1 xxh ', ads.ReadReg(ads.REG_OFC1))
print('07h OFC2 xxh ', ads.ReadReg(ads.REG_OFC2))
print('08h FSC0 xxh ', ads.ReadReg(ads.REG_FSC0))
print('09h FSC1 xxh ', ads.ReadReg(ads.REG_FSC1))
print('0Ah FSC2 xxh ', ads.ReadReg(ads.REG_FSC2))
read += 1
Result:
[----- Read 1 ------
#Register Address- Register's Name- Default Value - Result
00h STATUS 3xh 0x30
01h MUX 01h 0x1
02h ADCON 20h 0x20
03h DRATE F0h 0xf0
04h IO E0h 0xff
05h OFC0 xxh 0x67
06h OFC1 xxh 0x1
07h OFC2 xxh 0x0
08h FSC0 xxh 0x9f
09h FSC1 xxh 0x0
0Ah FSC2 xxh 0x45
----- Read 2 ------
00h STATUS 3xh 0x0
01h MUX 01h 0x0
02h ADCON 20h 0x0
03h DRATE F0h 0x0
04h IO E0h 0x0
05h OFC0 xxh 0x0
06h OFC1 xxh 0x0
07h OFC2 xxh 0x0
08h FSC0 xxh 0x0
09h FSC1 xxh 0x0
0Ah FSC2 xxh 0x0
----- Read 3 ------
00h STATUS 3xh 0x0
01h MUX 01h 0x0
02h ADCON 20h 0x0
03h DRATE F0h 0x0
04h IO E0h 0x0
05h OFC0 xxh 0x0
06h OFC1 xxh 0x0
07h OFC2 xxh 0x0
08h FSC0 xxh 0x0
09h FSC1 xxh 0x0
0Ah FSC2 xxh 0x0
----- Read 4 ------
00h STATUS 3xh 0x0
01h MUX 01h 0x0
02h ADCON 20h 0x0
03h DRATE F0h 0x0
04h IO E0h 0x0
05h OFC0 xxh 0x0
06h OFC1 xxh 0x0
07h OFC2 xxh 0x0
08h FSC0 xxh 0x0
09h FSC1 xxh 0x0
0Ah FSC2 xxh 0x0
----- Read 5 ------
00h STATUS 3xh 0x0
01h MUX 01h 0x0
02h ADCON 20h 0x0
03h DRATE F0h 0x0
04h IO E0h 0x0
05h OFC0 xxh 0x0
06h OFC1 xxh 0x0
07h OFC2 xxh 0x0
08h FSC0 xxh 0x0
09h FSC1 xxh 0x0
0Ah FSC2 xxh 0x0
Class (arquivo ClassADS1256_Question)
#Imports -----------------------------------------------------
import wiringpi as wp
#Class -------------------------------------------------------
class ADS1256:
#Constantes da Classe -----------------------------------------
#Constantes de Configuração
SPI_MODE = 1 #There are nothing about this on datasheet but is 1 # nas internet diz que ele é modo 1, mas no datasheet não fala
SPI_CHANNEL = 1 # I don't know why #não sei o que significa
SPI_FREQUENCY = 1000000 # The ADS1256 supports 768kHz to 1.92MHz
DRDY_TIMEOUT = 0.5 # Seconds to wait for DRDY when communicating
DATA_TIMEOUT = 0.00001 # 10uS delay for sending data
SCLK_FREQUENCY = 7680000 # default clock rate is 7.68MHz
#PINOUT #Constantes de Conexão Elétrica
CS_PIN = 12 #29 # mudei pra 29 e testei que é esse mesmo!!!
DRDY_PIN = 11
RESET_PIN = 29 # There are not acess to this port on module # Esse pino não tem no módulo
PDWN_PIN = 13
#Register Adress #Endereço dos Registradores
REG_STATUS = 0x00
REG_MUX = 0x01
REG_ADCON = 0x02
REG_DRATE = 0x03
REG_IO = 0x04
REG_OFC0 = 0x05
REG_OFC1 = 0x06
REG_OFC2 = 0x07
REG_FSC0 = 0x08
REG_FSC1 = 0x09
REG_FSC2 = 0x0A
# Data Rate #Taxa de Amostragem
DRATE_30000 = 0b11110000 # 30,000SPS (default)
DRATE_15000 = 0b11100000 # 15,000SPS
DRATE_7500 = 0b11010000 # 7,500SPS
DRATE_3750 = 0b11000000 # 3,750SPS
DRATE_2000 = 0b10110000 # 2,000SPS
DRATE_1000 = 0b10100001 # 1,000SPS
DRATE_500 = 0b10010010 # 500SPS
DRATE_100 = 0b10000010 # 100SPS
DRATE_60 = 0b01110010 # 60SPS
DRATE_50 = 0b01100011 # 50SPS
DRATE_30 = 0b01010011 # 30SPS
DRATE_25 = 0b01000011 # 25SPS
DRATE_15 = 0b00110011 # 15SPS
DRATE_10 = 0b00100011 # 10SPS
DRATE_5 = 0b00010011 # 5SPS
DRATE_2_5 = 0b00000011 # 2.5SPS
# Comandos
CMD_WAKEUP = 0x00 # Completes SYNC and exits standby mode
CMD_RDATA = 0x01 # Read data
CMD_RDATAC = 0x03 # Start read data continuously
CMD_SDATAC = 0x0F # Stop read data continuously
CMD_RREG = 0x10 # Read from register
CMD_WREG = 0x50 # Write to register
CMD_SELFCAL = 0xF0 # Offset and gain self-calibration
CMD_SELFOCAL= 0xF1 # Offset self-calibration
CMD_SELFGCAL= 0xF2 # Gain self-calibration
CMD_SYSOCAL = 0xF3 # System offset calibration
CMD_SYSGCAL = 0xF4 # System gain calibration
CMD_SYNC = 0xFC # Synchronize the A/D conversion
CMD_STANDBY = 0xFD # Begin standby mode
CMD_RESET = 0xFE # Reset to power-on values
#Status
STATUS_BUFFER_ENABLE = 0x02
STATUS_AUTOCAL_ENABLE = 0x04
STATUS_ORDER_LSB = 0x08
#Gain
AD_GAIN_1 = 0x00
AD_GAIN_2 = 0x01
AD_GAIN_4 = 0x02
AD_GAIN_8 = 0x03
AD_GAIN_16 = 0x04
AD_GAIN_32 = 0x05
AD_GAIN_64 = 0x06
# Clock divider
AD_CLK_EQUAL = 0x20
AD_CLK_HALF = 0x40
AD_CLK_FOURTH = 0x60
#Funções da Classe ------------------------------------------------------
# Função Iniciar
def __init__(self): # Note: A função __init__() é chamada automaticamente toda vez que a Classe está sendo usada para criar um novo objeto.
wp.wiringPiSetupPhys() # Set up the wiringpi object to use physical pin numbers
wp.pinMode(self.DRDY_PIN, wp.INPUT)# Initialize the DRDY pin
wp.pinMode(self.RESET_PIN, wp.OUTPUT)# Initialize the reset pin
wp.digitalWrite(self.RESET_PIN, wp.HIGH)
wp.pinMode(self.PDWN_PIN, wp.OUTPUT)# Initialize PDWN pin
wp.digitalWrite(self.PDWN_PIN, wp.HIGH)
wp.pinMode(self.CS_PIN, wp.OUTPUT)# Initialize CS pin
wp.digitalWrite(self.CS_PIN, wp.HIGH)
wp.wiringPiSPISetupMode(self.SPI_CHANNEL, self.SPI_FREQUENCY,self.SPI_MODE) # Initialize the wiringpi SPI setup
def WaitDRDY(self):
drdy_level = wp.digitalRead(self.DRDY_PIN)
while (drdy_level == wp.HIGH):
drdy_level = wp.digitalRead(self.DRDY_PIN)
def ReadReg(self, registrador): #Figure 34, Page 33 of ADS1256 Datasheet Version SBAS288K − JUNE 2003 − REVISED SEPTEMBER 2013
wp.digitalWrite(self.CS_PIN, wp.LOW) #Select Slave to SPI comunication #liga o chip select
wp.wiringPiSPIDataRW(self.SPI_CHANNEL, bytes([self.CMD_RREG | registrador]))#1st Command Byte: Comand Read plus Register to read
wp.wiringPiSPIDataRW(self.SPI_CHANNEL, bytes([0x00]))#2nd Command Byte #Total register to read more that one
wp.delayMicroseconds(60) #t6
lido = wp.wiringPiSPIDataRW(self.SPI_CHANNEL, bytes(0x01))
wp.digitalWrite(self.CS_PIN, wp.HIGH)
lido = hex(lido[1][0])
return lido
#return hex(ord(lido[1]))
def ReadAllReg(self):
#self.WaitDRDY()
wp.digitalWrite(self.CS_PIN, wp.LOW) #liga o chip select
wp.wiringPiSPIDataRW(self.SPI_CHANNEL, bytes([self.CMD_RREG]))#manda o comando ler e o registrador a ser lido
wp.wiringPiSPIDataRW(self.SPI_CHANNEL, bytes([0x0A]))#quantos resgistradores a mais quer ser lido. Vai seguir a sequencia da tabela de registradores
#self.DataDelay()
wp.delayMicroseconds(60)
lido = wp.wiringPiSPIDataRW(self.SPI_CHANNEL, bytes(0x0B))
wp.digitalWrite(self.CS_PIN, wp.HIGH)
print(lido)
def WriteReg(self, registrador, dado):
wp.digitalWrite(self.CS_PIN, wp.LOW)
wp.wiringPiSPIDataRW(self.SPI_CHANNEL, bytes([self.CMD_WREG | registrador]))
wp.wiringPiSPIDataRW(self.SPI_CHANNEL, bytes([0x00]))
wp.wiringPiSPIDataRW(self.SPI_CHANNEL, bytes([dado]))
wp.digitalWrite(self.CS_PIN, wp.HIGH)
wp.delayMicroseconds(10)# t11 minimo 4*Tclkin, 4*1/7680000 = 0.5 uS
def Reset(self):
wp.digitalWrite(self.CS_PIN, wp.LOW)
wp.wiringPiSPIDataRW(self.SPI_CHANNEL, bytes([self.CMD_RESET]))
wp.digitalWrite(self.CS_PIN, wp.HIGH)
wp.delayMicroseconds(8)
def ReadCanal(self):
result = []
self.WaitDRDY()
#self.WaitDRDY() # Espera o aviso de que pode ler
wp.digitalWrite(self.CS_PIN, wp.LOW) #chip select iniciando a comunicação
wp.wiringPiSPIDataRW(self.SPI_CHANNEL, bytes([self.CMD_RDATA])) # Enviando o comando Ler Dado
wp.delayMicroseconds(50) # delay t6
result.append(wp.wiringPiSPIDataRW(self.SPI_CHANNEL, bytes(0x01))[1][0]) #Lendo o primeiro Bit do dado
result.append(wp.wiringPiSPIDataRW(self.SPI_CHANNEL, bytes(0x01))[1][0]) #Lendo o segundo Bit do dado
result.append(wp.wiringPiSPIDataRW(self.SPI_CHANNEL, bytes(0x01))[1][0]) #Lendo o terceiro Bit do dado
wp.digitalWrite(self.CS_PIN, wp.HIGH) # Chip Select Desativando a comunicação
total = result[0] * 65536 # 2 ^ 16, equivalente a deslocar 16 casas decimais
total += result[1] * 256 # 2 ^ 8, equivalente a deslocar 8 casas decimais
total += result[2]
'''
print(hex(result[0]))
print(hex(result[1]))
print(hex(result[2]))
print(hex(total))
'''
return total
def SetInputMux(self,possel,negsel): #corrigir
print("Mux P {} N {}".format(possel,negsel))
wp.digitalWrite(self.CS_PIN, wp.LOW) #chip select ativado
wp.wiringPiSPIDataRW(self.SPI_CHANNEL, bytes([self.CMD_WREG | self.REG_MUX]))
wp.wiringPiSPIDataRW(self.SPI_CHANNEL, [0x00])
wp.wiringPiSPIDataRW(self.SPI_CHANNEL, [(possel<<4) | (negsel<<0)] )#corrigir aqui
wp.digitalWrite(self.CS_PIN, wp.HIGH) #chip select desativado

Understanding IR codes for Samsung TV

Can somebody help me to understand how could I use RAW IR data in an project using ESP8266-HTTP-IR-Blaster library ?
I've created a NodeMCU board with an IR sender and receiver according to https://github.com/mdhiggins/ESP8266-HTTP-IR-Blaster
Everything is working fine as long as I'm using the captured codes for ex.:
http://NodeMCU-IP/msg?code=E0E040BF:SAMSUNG:32
This is the Code for the Power button (E0E040BF)
As I'm using it in a home automation system, it would very beneficial for me if I had a dedicated ON and OFF sequence, which I found here: http://www.remotecentral.com/cgi-bin/mboard/rc-discrete/thread.cgi?5780 , but unable to translate, modify, or send it via RAW data.
Using Node-red, tried many ways, also implemented a MQTT client to the original project, but did not accept these codes anyhow I try. Does not sends it.
Also tried as a JSON, didn't help.
[
{
"type":"raw",
"data":"[0000, 006D, 0000, 0022, 00AC, 00AC, 0015, 0040, 0015, 0040, 0015, 0040, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0040, 0015, 0040, 0015, 0040, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0015, 0040, 0015, 0040, 0015, 0015, 0015, 0015, 0015, 0040, 0015, 0040, 0015, 0040, 0015, 0040, 0015, 0015, 0015, 0015, 0015, 0040, 0015, 0040, 0015, 0015, 0015, 0689]",
"khz":38
}
]
Any idea what could I try next?
A good introduction to the 'Pronto format' that you show above is at Remote Central
For the specific example above, for a Samsung OFF code given at your remote central link, the full code is given as a sequence of 16-bit numbers represented in hexadecimal with spaces in between:
0000 006D 0000 0022 00AC 00AC 0015 0040 0015 0040 0015 0040 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0040 0015 0040 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0040 0015 0015 0015 0015 0015 0040 0015 0040 0015 0040 0015 0040 0015 0015 0015 0015 0015 0040 0015 0040 0015 0015 0015 0689
You can break that down as a preamble (broken out here for interest, but not needed if you already have a working Samsung code):
0x0000 - This is raw code format data
0x006D - Frequency 109 decimal = 38.028kHz (see above link for calculation)
0x0000 - No burst pairs in first sequence
0x0022 - 34 decimal - 34 burst pairs of signal follow
00AC 00AC - First burst of signal - on for 0xAC (172 decimal) cycles at 38kHz, off for the same amount
After that comes 32 pairs of data "burst pairs" (which is likely the only bit you need if you already have other codes for the same device)
0015 0689 - Final burst of signal - on for 0x15 (21 decimal) cycles, off for 0x689 (1673 decimal) cycles, guaranteeing 44ms without any IR before the next code can be transmitted
To interpret the data manually, copy it out (e.g. into a text editor) in groups of 8 numbers:
0015 0040 0015 0040 0015 0040 0015 0015
0015 0015 0015 0015 0015 0015 0015 0015
0015 0040 0015 0040 0015 0040 0015 0015
0015 0015 0015 0015 0015 0015 0015 0015
0015 0015 0015 0015 0015 0015 0015 0040
0015 0040 0015 0015 0015 0015 0015 0040
0015 0040 0015 0040 0015 0040 0015 0015
0015 0015 0015 0040 0015 0040 0015 0015
Then:
Ignore the columns where all the numbers are the same (even columns above, which represent the on time - 0x15 = 21 decimal cycles of IR at 38kHz )
For the remaining columns (which represent the off-time), replace the big numbers (0x40 in this case) with '1' and the small (0x15) with '0'.
For the first line
0015 0040 0015 0040 0015 0040 0015 0015
ignoring the even numbered columns leaves:
0040 0040 0040 0015
replacing those with 1's and 0's
1 1 1 0
and if you convert that into hexadecimal, it's 'E'
Next line is '0', then 'E' then '0' (already it's comforting to see it starting with the same E0E0 that starts your other Samsung code above...), and the remaining lines make it
E0E019E6
Doing the same with the ON code gives you
E0E09966
And as I've needed to solve the same problem just recently for the same codes, I can confirm that my Samsung TV responds to those codes as OFF and ON.
Not surprisingly, there are a variety of software tools to convert between formats, and a huge range of formats to describe the same signal (explained very well by xkcd). For example, irdb on GitHUB will decode the above string to "Protocol NECx2, device 7, subdevice 7, OBC 152". It's up to you to know that you have to
bit-reverse the device number '07' to get 'E0'
bit-reverse the subdevice number (also '07') to get 'E0'
convert 152 to hexadecimal and reverse the bits to get '19'
calculate the last two digits as ( 0xFF - the bit-reversed OBC ), 0xFF - 0x19 = 0xE6, giving the final 8 bits 'E6'

GoLang listen on port range

I'm trying to make a program listen on a port range in Go (520+ ports;TCP).
However, it doesn't seem to work. It listens on a few and then stops.
I was thinking to make a for loop increasing by one and then calling a listening function like so:
for i := <beginning port>; i <= <ending port>; i++ {
ipaddr := fmt.Sprintf("8.8.8.8:%d", i)
ipaddrnew, _ := parseAddress(ipaddr)
go listener(ipaddrnew)
}
That's what I've been trying to do but it stops after a few go through.
Update:
Here's a test I just ran:
I change the code to the following:
for i := 14480; i <= 15000; i++ {
ipaddr := fmt.Sprintf(":%d", i)
fmt.Println(i)
ipaddrnew, _ := parseAddress(ipaddr)
go listener(ipaddrnew)
}
and it gave the following response:
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
[TCP] Listening for connections on :14483.
14496
[TCP] Listening for connections on :14481.
14497
14498
14499
14500
14501
14502
14503
14504
14505
[TCP] Listening for connections on :14482.
14506
14507
14508
14509
14510
14511
14512
[TCP] Listening for connections on :14480.
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
[TCP] Listening for connections on :14501.
14524
14525
14526
14527
14528
14529
14530
[TCP] Listening for connections on :14484.
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
[TCP] Listening for connections on :14485.
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
[TCP] Listening for connections on :14486.
14555
14556
14557
14558
14559
14560
[TCP] Listening for connections on :14487.
14561
14562
14563
14564
14565
14566
14567
14568
14569
[TCP] Listening for connections on :14488.
14570
14571
14572
14573
14574
14575
14576
[TCP] Listening for connections on :14489.
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
[TCP] Listening for connections on :14490.
14587
14588
14589
14590
14591
14592
[TCP] Listening for connections on :14491.
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
[TCP] Listening for connections on :14492.
14606
14607
14608
14609
14610
14611
14612
[TCP] Listening for connections on :14493.
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
[TCP] Listening for connections on :14494.
[TCP] Listening for connections on :14562.
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
[TCP] Listening for connections on :14502.
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
[TCP] Listening for connections on :14503.
14673
14674
[TCP] Listening for connections on :14495.
14675
14676
14677
14678
14679
14680
14681
14682
[TCP] Listening for connections on :14504.
14683
14684
14685
14686
14687
14688
[TCP] Listening for connections on :14505.
14689
14690
[TCP] Listening for connections on :14496.
14691
14692
14693
14694
14695
[TCP] Listening for connections on :14506.
14696
14697
14698
14699
14700
14701
14702
[TCP] Listening for connections on :14507.
14703
[TCP] Listening for connections on :14497.
14704
14705
14706
14707
14708
14709
14710
14711
14712
[TCP] Listening for connections on :14508.
14713
14714
14715
14716
14717
14718
14719
14720
[TCP] Listening for connections on :14509.
14721
14722
14723
14724
14725
14726
[TCP] Listening for connections on :14510.
14727
14728
14729
14730
14731
14732
14733
14734
[TCP] Listening for connections on :14511.
14735
14736
14737
14738
14739
[TCP] Listening for connections on :14512.
14740
14741
14742
14743
14744
14745
14746
14747
[TCP] Listening for connections on :14513.
14748
14749
14750
14751
14752
[TCP] Listening for connections on :14514.
14753
14754
14755
14756
14757
[TCP] Listening for connections on :14515.
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
[TCP] Listening for connections on :14516.
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
[TCP] Listening for connections on :14517.
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
[TCP] Listening for connections on :14518.
14843
14844
14845
14846
14847
14848
[TCP] Listening for connections on :14519.
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
[TCP] Listening for connections on :14520.
14860
14861
14862
14863
14864
[TCP] Listening for connections on :14521.
[TCP] Listening for connections on :14522.
14865
14866
Go program ends when main function ends. Just wait indefinitely in main function.
func main() {
go listen()
select {}
}

Why TCPDUMP shows Ethernet packet when querying TCP packet?

I am using TCPDUMP to intercept the network traffic on an Android device.
The command I use is
./tcpdump -tt -nn -vv tcp > tcp.log
In the result file (tcp.log), I found that there are not only TCP packets, but also some others with Ethernet address. (Some IP and Ethernet addresses are obfuscated due to privacy purpose).
1410451676.980763 IP (tos 0x0, ttl 41, id 0, offset 0, flags [DF], proto TCP (6), length 60)
54.204.ABC.144.80 > 172.31.DEF.178.59949: Flags [S.], seq 572870324, ack 3778403975, win 17898, options [mss 1380,sackOK,TS[|tcp]>
1410451676.980916 IP (tos 0x0, ttl 64, id 44656, offset 0, flags [DF], proto TCP (6), length 52)
172.31.DEF.178.59949 > 54.204.ABC.144.80: Flags [.], seq 1, ack 1, win 1369, options [nop,nop,TS[|tcp]>
1410451676.982167 IP (tos 0x0, ttl 64, id 44657, offset 0, flags [DF], proto TCP (6), length 701)
172.31.DEF.178.59949 > 54.204.ABC.144.80: Flags [P.], seq 1:650, ack 1, win 1369, options [nop,nop,TS[|tcp]>
1410451676.996114 00:24:f9:c3:XX:00 > d8:50:e6:2b:YY:6a, ethertype IPv6 (0x86dd), length 86:
0x0000: 6000 0000 0020 0634 2607 f8b0 400d 0c03 `......4&...#...
0x0010: 0000 0000 0000 00bc 2001 0468 0c80 4340 ...........h..C#
0x0020: b040 b100 7831 4228 146c c1cc ceb8 fc7a .#..x1B(.l.....z
1410451677.000783 00:24:f9:c3:XX:00 > d8:50:e6:2b:YY:6a, ethertype IPv6 (0x86dd), length 535:
0x0000: 6000 0000 01e1 0634 2607 f8b0 400d 0c03 `......4&...#...
0x0010: 0000 0000 0000 00bc 2001 0468 0c80 4340 ...........h..C#
0x0020: b040 b100 7831 4228 146c c1cc ceb8 fc7a .#..x1B(.l.....z
1410451677.000935 d8:50:e6:2b:YY:6a > 00:24:f9:c3:XX:00, ethertype IPv6 (0x86dd), length 86:
0x0000: 6000 0000 0020 0640 2001 0468 0c80 4340 `......#...h..C#
0x0010: b040 b100 7831 4228 2607 f8b0 400d 0c03 .#..x1B(&...#...
0x0020: 0000 0000 0000 00bc c1cc 146c 3b74 2fa9 ...........l;t/.
1410451677.011006 IP (tos 0x0, ttl 41, id 62137, offset 0, flags [DF], proto TCP (6), length 52)
54.204.ABC.144.80 > 172.31.DEF.178.59949: Flags [.], seq 1, ack 650, win 75, options [nop,nop,TS[|tcp]>
In a regular TCP packet header, the result includes its timestamp (UNIX time), IP packet flag+options, source IP address+port, destination IP address+port, and TCP flags.
BUT, what I do not understand is that there are some Ethernet packets in between and according to the results, these packets include their MAC address, instead of IP address.
Why is the case? Are they TCP packets?
Thanks for your answers/insights.
All those packets are Ethernet packets.
The version of tcpdump you're using was apparently not built with IPv6 support, so, while it can recognize IPv4-over-Ethernet packets and printout the IP information, it can't recognize IPv6-over-Ethernet packets, and just prints out the Ethernet-layer information.
You should ask whoever built that version of tcpdump why it doesn't include IPv6 support.

Resources